Skip to content

Commit

Permalink
Merge d3b0d15 into 97056a3
Browse files Browse the repository at this point in the history
  • Loading branch information
jchiang87 committed Oct 19, 2018
2 parents 97056a3 + d3b0d15 commit 3e750e9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions data/default_imsim_configs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ scti = 1e-6
[ccd]
full_well = 1e5
bf_strength = 1.0
# Use a flat SED approximation and omit sensor effects for objects
# with fluxes below max_flux_simple.
max_flux_simple = 100
# If the existing flux in the postage stamp for the object to be drawn
# is above sensor_limit, then use of the SiliconSensor model is
# forced, no matter what the object flux is.
sensor_limit = 200

[persistence]
eimage_prefix = lsst_e_
Expand Down
6 changes: 5 additions & 1 deletion python/desc/imsim/ImageSimulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,8 @@ def __call__(self, gs_objects):

# IMAGE_SIMULATOR must be a variable declared in the
# outer scope and set to an ImageSimulator instance.
max_flux_simple = IMAGE_SIMULATOR.config['ccd']['max_flux_simple']
sensor_limit = IMAGE_SIMULATOR.config['ccd']['sensor_limit']
gs_interpreter = IMAGE_SIMULATOR.gs_interpreters[self.sensor_name]
with warnings.catch_warnings():
warnings.filterwarnings('ignore', 'Automatic n_photons',
Expand All @@ -359,7 +361,9 @@ def __call__(self, gs_objects):
if not np.isnan(flux):
logger.debug("%s %s %s", gs_obj.uniqueId, flux,
gs_obj.galSimType)
gs_interpreter.drawObject(gs_obj)
gs_interpreter.drawObject(gs_obj,
max_flux_simple=max_flux_simple,
sensor_limit=sensor_limit)
# Ensure the object's id is added to the drawn
# object set.
gs_interpreter.drawn_objects.add(gs_obj.uniqueId)
Expand Down

0 comments on commit 3e750e9

Please sign in to comment.