lsst.pipe.tasks
17.0.1-27-g9f381ddd
|
Public Member Functions | |
def | runDataRef (self, dataRef) |
def | adaptArgsAndRun (self, inputData, inputDataIds, outputDataIds, butler) |
def | run (self, fakeCat, image, wcs, photoCalib) |
def | addPixCoords (self, fakeCat, wcs) |
def | trimFakeCat (self, fakeCat, image, wcs) |
def | mkFakeGalsimGalaxies (self, fakeCat, band, photoCalib, pixelScale, psf, image) |
def | mkFakeStars (self, fakeCat, band, photoCalib, psf, image) |
def | cleanCat (self, fakeCat) |
def | addFakeSources (self, image, fakeImages, sourceType) |
Public Attributes | |
fakeSourceCatType | |
bitmask | |
Static Public Attributes | |
ConfigClass = InsertFakesConfig | |
Insert fake objects into images. Add fake stars and galaxies to the given image, read in through the dataRef. Galaxy parameters are read in from the specified file and then modelled using galsim. `InsertFakesTask` has five functions that make images of the fake sources and then add them to the image. `addPixCoords` Use the WCS information to add the pixel coordinates of each source. `mkFakeGalsimGalaxies` Use Galsim to make fake double sersic galaxies for each set of galaxy parameters in the input file. `mkFakeStars` Use the PSF information from the image to make a fake star using the magnitude information from the input file. `cleanCat` Remove rows of the input fake catalog which have half light radius, of either the bulge or the disk, that are 0. `addFakeSources` Add the fake sources to the image.
Definition at line 188 of file insertFakes.py.
def lsst.pipe.tasks.insertFakes.InsertFakesTask.adaptArgsAndRun | ( | self, | |
inputData, | |||
inputDataIds, | |||
outputDataIds, | |||
butler | |||
) |
Definition at line 244 of file insertFakes.py.
def lsst.pipe.tasks.insertFakes.InsertFakesTask.addFakeSources | ( | self, | |
image, | |||
fakeImages, | |||
sourceType | |||
) |
Add the fake sources to the given image Parameters ---------- image : `lsst.afw.image.exposure.exposure.ExposureF` The image into which the fake sources should be added fakeImages : `list` A list of tuples of `lsst.afw.image.image.image.ImageF` and `lsst.afw.geom.Point2D, the images and the locations they are to be inserted at. sourceType : `str` The type (star/galaxy) of fake sources input Returns ------- image : `lsst.afw.image.exposure.exposure.ExposureF` Notes ----- Uses the x, y information in the ``fakeCat`` to position an image of the fake interpolated onto the pixel grid of the image. Sets the ``FAKE`` mask plane for the pixels added with the fake source.
Definition at line 526 of file insertFakes.py.
def lsst.pipe.tasks.insertFakes.InsertFakesTask.addPixCoords | ( | self, | |
fakeCat, | |||
wcs | |||
) |
Add pixel coordinates to the catalog of fakes. Parameters ---------- fakeCat : `pandas.core.frame.DataFrame` The catalog of fake sources to be input wcs : `lsst.afw.geom.skyWcs.skyWcs.SkyWcs` WCS to use to add fake sources Returns ------- fakeCat : `pandas.core.frame.DataFrame` Notes ----- The default option is to use the WCS information from the image. If the ``useUpdatedCalibs`` config option is set then it will use the updated WCS from jointCal.
Definition at line 315 of file insertFakes.py.
def lsst.pipe.tasks.insertFakes.InsertFakesTask.cleanCat | ( | self, | |
fakeCat | |||
) |
Remove rows from the fakes catalog which have HLR = 0 for either the buldge or disk component Parameters ---------- fakeCat : `pandas.core.frame.DataFrame` The catalog of fake sources to be input Returns ------- fakeCat : `pandas.core.frame.DataFrame` The input catalog of fake sources but with the bad objects removed
Definition at line 505 of file insertFakes.py.
def lsst.pipe.tasks.insertFakes.InsertFakesTask.mkFakeGalsimGalaxies | ( | self, | |
fakeCat, | |||
band, | |||
photoCalib, | |||
pixelScale, | |||
psf, | |||
image | |||
) |
Make images of fake galaxies using GalSim. Parameters ---------- band : `str` pixelScale : `float` psf : `lsst.meas.extensions.psfex.psfexPsf.PsfexPsf` The PSF information to use to make the PSF images fakeCat : `pandas.core.frame.DataFrame` The catalog of fake sources to be input photoCalib : `lsst.afw.image.photoCalib.PhotoCalib` Photometric calibration to be used to calibrate the fake sources Returns ------- galImages : `list` A list of tuples of `lsst.afw.image.exposure.exposure.ExposureF` and `lsst.afw.geom.Point2D` of their locations. Notes ----- Fake galaxies are made by combining two sersic profiles, one for the bulge and one for the disk. Each component has an individual sersic index (n), a, b and position angle (PA). The combined profile is then convolved with the PSF at the specified x, y position on the image. The names of the columns in the ``fakeCat`` are configurable and are the column names from the University of Washington simulations database as default. For more information see the doc strings attached to the config options.
Definition at line 377 of file insertFakes.py.
def lsst.pipe.tasks.insertFakes.InsertFakesTask.mkFakeStars | ( | self, | |
fakeCat, | |||
band, | |||
photoCalib, | |||
psf, | |||
image | |||
) |
Make fake stars based off the properties in the fakeCat. Parameters ---------- band : `str` psf : `lsst.meas.extensions.psfex.psfexPsf.PsfexPsf` The PSF information to use to make the PSF images fakeCat : `pandas.core.frame.DataFrame` The catalog of fake sources to be input image : `lsst.afw.image.exposure.exposure.ExposureF` The image into which the fake sources should be added photoCalib : `lsst.afw.image.photoCalib.PhotoCalib` Photometric calibration to be used to calibrate the fake sources Returns ------- starImages : `list` A list of tuples of `lsst.afw.image.image.image.ImageF` of fake stars and `lsst.afw.geom.Point2D` of their locations.
Definition at line 454 of file insertFakes.py.
def lsst.pipe.tasks.insertFakes.InsertFakesTask.run | ( | self, | |
fakeCat, | |||
image, | |||
wcs, | |||
photoCalib | |||
) |
Add fake sources to an image. Parameters ---------- fakeCat : `pandas.core.frame.DataFrame` The catalog of fake sources to be input image : `lsst.afw.image.exposure.exposure.ExposureF` The image into which the fake sources should be added wcs : `lsst.afw.geom.skyWcs.skyWcs.SkyWcs` WCS to use to add fake sources photoCalib : `lsst.afw.image.photoCalib.PhotoCalib` Photometric calibration to be used to calibrate the fake sources Returns ------- resultStruct : `lsst.pipe.base.struct.Struct` contains : image : `lsst.afw.image.exposure.exposure.ExposureF` Notes ----- Adds pixel coordinates for each source to the fakeCat and removes objects with bulge or disk half light radius = 0 (if ``config.doCleanCat = True``). Adds the ``Fake`` mask plane to the image which is then set by `addFakeSources` to mark where fake sources have been added. Uses the information in the ``fakeCat`` to make fake galaxies (using galsim) and fake stars, using the PSF models from the PSF information for the image. These are then added to the image and the image with fakes included returned. The galsim galaxies are made using a double sersic profile, one for the bulge and one for the disk, this is then convolved with the PSF at that point.
Definition at line 258 of file insertFakes.py.
def lsst.pipe.tasks.insertFakes.InsertFakesTask.runDataRef | ( | self, | |
dataRef | |||
) |
Read in/write out the required data products and add fake sources to the deepCoadd. Parameters ---------- dataRef : `lsst.daf.persistence.butlerSubset.ButlerDataRef` Data reference defining the image to have fakes added to it Used to access the following data products: deepCoadd
Definition at line 215 of file insertFakes.py.
def lsst.pipe.tasks.insertFakes.InsertFakesTask.trimFakeCat | ( | self, | |
fakeCat, | |||
image, | |||
wcs | |||
) |
Trim the fake cat to about the size of the input image. Parameters ---------- fakeCat : `pandas.core.frame.DataFrame` The catalog of fake sources to be input image : `lsst.afw.image.exposure.exposure.ExposureF` The image into which the fake sources should be added wcs : `lsst.afw.geom.skyWcs.skyWcs.SkyWcs` WCS to use to add fake sources Returns ------- fakeCat : `pandas.core.frame.DataFrame` The original fakeCat trimmed to the area of the image
Definition at line 347 of file insertFakes.py.
lsst.pipe.tasks.insertFakes.InsertFakesTask.bitmask |
Definition at line 292 of file insertFakes.py.
|
static |
Definition at line 213 of file insertFakes.py.
lsst.pipe.tasks.insertFakes.InsertFakesTask.fakeSourceCatType |
Definition at line 232 of file insertFakes.py.