Skip to content

Commit

Permalink
handle the case for SourceNotVisible exception (#386)
Browse files Browse the repository at this point in the history
Co-authored-by: Ismael Mendoza <[email protected]>
  • Loading branch information
2 people authored and thuiop committed Mar 8, 2023
1 parent 2e062c9 commit cb58019
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions btk/draw_blends.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,11 @@ def render_blend(self, blend_catalog, psf, filt, survey, seedseq_blend, extra_da

for k, entry in enumerate(blend_catalog):
single_image = self.render_single(entry, filt, psf, survey, extra_data[k])
iso_image[k] = single_image.array
_blend_image += single_image
if single_image is None:
iso_image[k] = np.zeros(single_image)
else:
iso_image[k] = single_image.array
_blend_image += single_image

# add noise.
if self.add_noise in ("galaxy", "all"):
Expand Down

0 comments on commit cb58019

Please sign in to comment.