Skip to content

Commit

Permalink
Remove adding noise on fake objects
Browse files Browse the repository at this point in the history
Images processed using the LSST software stack are expected to be
background noise dominated for faint objects. As such their is no
reason to add additional noise to fake objects inserted. This also
takes care of a problem where the noise being inserted was
artificially too large due to a bug where the gain was not taken
into account
  • Loading branch information
natelust committed Nov 17, 2017
1 parent d74812f commit 7215e68
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
4 changes: 1 addition & 3 deletions python/lsst/synpipe/positionGalSimFakes.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,7 @@ def run(self, exposure, background):
PARENT)
galBBox = newBBox

# Add Noise: Optional?
galMaskedImage = fsl.addNoise(galImage, exposure.getDetector(),
rand_gen=self.npRand)
galMaskedImage = lsst.afw.image.MaskedImageF(galImage)

# Put information of the added fake galaxies into the header
md.set("FAKE%s" % str(galident), "%.3f, %.3f" % (galXY.getX(),
Expand Down
4 changes: 1 addition & 3 deletions python/lsst/synpipe/positionStarFakes.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,7 @@ def run(self, exposure, background):
starImage = starImage.Factory(starImage, newBBox, PARENT)
starBBox = newBBox

starMaskedImage = fsl.addNoise(starImage.convertF(),
exposure.getDetector(),
rand_gen=self.npRand)
starMaskedImage = afwImage.MaskedImageF(starImage)

starMaskedImage.getMask().set(self.bitmask)

Expand Down
3 changes: 2 additions & 1 deletion python/lsst/synpipe/randomGalSimFakes.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ def run(self, exposure, background):
galImage = galImage.Factory(galImage, newBBox, lsst.afw.image.PARENT)
galBBox = newBBox

galMaskedImage = fsl.addNoise(galImage, exposure.getDetector(), rand_gen=self.npRand)
galMaskedImage = lsst.afw.image.MaskedImageF(galImage)

mask = galMaskedImage.getMask()
mask.set(self.bitmask)

Expand Down
3 changes: 2 additions & 1 deletion python/lsst/synpipe/randomStarFakes.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ def run(self, exposure, background):
self.log.info("Adding fake at: %.1f,%.1f" % (x, y))
psfImage = psf.computeImage(lsst.afw.geom.Point2D(x, y))
psfImage *= flux
psfMaskedImage = fsl.addNoise(psfImage.convertF(), exposure.getDetector(), rand_gen=self.npRand)

psfMaskedImage = lsst.afw.image.MaskedImageF(psfImage.convertF())

mask = psfMaskedImage.getMask()
mask.set(self.bitmask)
Expand Down

0 comments on commit 7215e68

Please sign in to comment.