Skip to content

Commit

Permalink
Use obj_num in sky tag as well, in case doing sky on stamps
Browse files Browse the repository at this point in the history
  • Loading branch information
rmjarvis committed Sep 26, 2023
1 parent c66181b commit 8ae8647
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion galsim/config/noise.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def GetSky(config, base, logger=None, full=False):
return sky_level_pixel
elif full:
# This calculation is non-trivial, so store this in case we need it again.
tag = (id(base), base['file_num'], base['image_num'])
tag = (id(base), base.get('file_num',0), base.get('image_num',0), base.get('obj_num',0))
if config.get('_current_sky_tag',None) == tag:
logger.debug('image %d, obj %d: Using saved sky image',
base.get('image_num',0),base.get('obj_num',0))
Expand Down

0 comments on commit 8ae8647

Please sign in to comment.