Skip to content

Commit

Permalink
Merge bdb023d into ec9055e
Browse files Browse the repository at this point in the history
  • Loading branch information
cwwalter committed Aug 20, 2018
2 parents ec9055e + bdb023d commit 6944fe7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions python/desc/imsim/flats.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ def make_flat(gs_det, counts_per_iter, niter, rng, buf=2, logger=None,
-------
galsim.ImageF
"""
config = desc.imsim.read_config()

if logger is None:
logger = desc.imsim.get_logger('DEBUG', name='make_flat')
if wcs is None:
Expand All @@ -49,6 +51,7 @@ def make_flat(gs_det, counts_per_iter, niter, rng, buf=2, logger=None,
nrow = gs_det.yMaxPix - gs_det.yMinPix + 1
flat = galsim.ImageF(ncol, nrow, wcs=wcs)
sensor = galsim.SiliconSensor(rng=rng,
strength=config['ccd']['bf_strength'],
treering_center=gs_det.tree_rings.center,
treering_func=gs_det.tree_rings.func,
transpose=True)
Expand Down
7 changes: 6 additions & 1 deletion python/desc/imsim/skyModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,11 @@ def addNoiseAndBackground(self, image, bandpass=None, m5=None,
# Use the transpose=True option since "eimages" of LSST sensors
# follow the Camera Coordinate System convention where the
# parallel transfer direction is along the x-axis.
nrecalc = 1e300 # disable pixel boundary updating.
config = get_config()
nrecalc = 1e300 # disable pixel boundary updating.
sensor = galsim.SiliconSensor(rng=self.randomNumbers,
nrecalc=nrecalc,
strength=config['ccd']['bf_strength'],
treering_func=detector.tree_rings.func,
treering_center=detector.tree_rings.center,
transpose=True)
Expand Down Expand Up @@ -462,11 +464,14 @@ def process_photons(self, image, skyCounts, detector, chunk_size=int(5e6)):
nrow, ncol = image.array.shape
dx = ncol//nx # number of pixels in x for an amp
dy = nrow//ny # number of pixels in y

config = get_config()
# Disable the updating of the pixel boundaries by
# setting nrecalc to 1e300
nrecalc = 1e300
sensor = galsim.SiliconSensor(rng=self.randomNumbers,
nrecalc=nrecalc,
strength=config['ccd']['bf_strength'],
treering_center=tree_rings.center,
treering_func=tree_rings.func,
transpose=True)
Expand Down

0 comments on commit 6944fe7

Please sign in to comment.