Skip to content

Commit

Permalink
Merge pull request #218 from LSSTDESC/u/jchiang/roll-back_observatory…
Browse files Browse the repository at this point in the history
…_setting

undo the changes to set the GalSimInterpreter._observatory attribute
  • Loading branch information
jchiang87 committed Jun 5, 2019
2 parents 292c988 + 8a06b8a commit d0231cc
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions python/desc/imsim/ImageSimulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from lsst.sims.photUtils import BandpassDict
from lsst.sims.GalSimInterface import make_galsim_detector
from lsst.sims.GalSimInterface import make_gs_interpreter
from lsst.sims.GalSimInterface import LSSTCameraWrapper, LsstObservatory
from lsst.sims.GalSimInterface import LSSTCameraWrapper
from .imSim import read_config, parsePhoSimInstanceFile, add_cosmic_rays,\
add_treering_info, get_logger, TracebackDecorator
from .bleed_trails import apply_channel_bleeding
Expand Down Expand Up @@ -100,10 +100,6 @@ def __init__(self, instcat, psf, numRows=None, config=None, seed=267,
self.gs_obj_dict = sources[1]
self.apply_sensor_model = apply_sensor_model
self.file_id = file_id
# Create an LsstObservatory object to be shared among the
# GalSimInterpeter objects to avoid the computational cost in
# making one for each.
self.lsstObservatory = LsstObservatory()
self._make_gs_interpreters(seed, sensor_list, file_id)
self.log_level = log_level
self.logger = get_logger(self.log_level, name='ImageSimulator')
Expand Down Expand Up @@ -154,7 +150,6 @@ def _make_gs_interpreters(self, seed, sensor_list, file_id):
apply_sensor_model=self.apply_sensor_model,
bf_strength=self.config['ccd']['bf_strength'])

self.gs_interpreters[det_name]._observatory = self.lsstObservatory
self.gs_interpreters[det_name].sky_bg_per_pixel \
= noise_and_background.sky_counts(det_name)
self.gs_interpreters[det_name].setPSF(PSF=self.psf)
Expand Down

0 comments on commit d0231cc

Please sign in to comment.