LSSTApplications
19.0.0-14-gb0260a2+72efe9b372,20.0.0+7927753e06,20.0.0+8829bf0056,20.0.0+995114c5d2,20.0.0+b6f4b2abd1,20.0.0+bddc4f4cbe,20.0.0-1-g253301a+8829bf0056,20.0.0-1-g2b7511a+0d71a2d77f,20.0.0-1-g5b95a8c+7461dd0434,20.0.0-12-g321c96ea+23efe4bbff,20.0.0-16-gfab17e72e+fdf35455f6,20.0.0-2-g0070d88+ba3ffc8f0b,20.0.0-2-g4dae9ad+ee58a624b3,20.0.0-2-g61b8584+5d3db074ba,20.0.0-2-gb780d76+d529cf1a41,20.0.0-2-ged6426c+226a441f5f,20.0.0-2-gf072044+8829bf0056,20.0.0-2-gf1f7952+ee58a624b3,20.0.0-20-geae50cf+e37fec0aee,20.0.0-25-g3dcad98+544a109665,20.0.0-25-g5eafb0f+ee58a624b3,20.0.0-27-g64178ef+f1f297b00a,20.0.0-3-g4cc78c6+e0676b0dc8,20.0.0-3-g8f21e14+4fd2c12c9a,20.0.0-3-gbd60e8c+187b78b4b8,20.0.0-3-gbecbe05+48431fa087,20.0.0-38-ge4adf513+a12e1f8e37,20.0.0-4-g97dc21a+544a109665,20.0.0-4-gb4befbc+087873070b,20.0.0-4-gf910f65+5d3db074ba,20.0.0-5-gdfe0fee+199202a608,20.0.0-5-gfbfe500+d529cf1a41,20.0.0-6-g64f541c+d529cf1a41,20.0.0-6-g9a5b7a1+a1cd37312e,20.0.0-68-ga3f3dda+5fca18c6a4,20.0.0-9-g4aef684+e18322736b,w.2020.45
LSSTDataManagementBasePackage
|
Classes | |
class | InsertFakesConnections |
Functions | |
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, starCheckVal) |
def | addFakeSources (self, image, fakeImages, sourceType) |
Variables | |
correctedFlux | |
psfKernel | |
psfIm | |
galsimIm | |
convIm | |
outIm | |
imSum | |
divIm | |
flux | |
imWithFlux | |
def lsst.pipe.tasks.insertFakes.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 : `typing.Iterator` [`tuple` ['lsst.afw.image.ImageF`, `lsst.geom.Point2d`]] An iterator of tuples that contains (or generates) images of fake sources, 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 711 of file insertFakes.py.
def lsst.pipe.tasks.insertFakes.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` 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 468 of file insertFakes.py.
def lsst.pipe.tasks.insertFakes.cleanCat | ( | self, | |
fakeCat, | |||
starCheckVal | |||
) |
Remove rows from the fakes catalog which have HLR = 0 for either the buldge or disk component, also remove galaxies that have Sersic index outside the galsim min and max allowed (0.3 <= n <= 6.2). Parameters ---------- fakeCat : `pandas.core.frame.DataFrame` The catalog of fake sources to be input starCheckVal : `str`, `bytes` or `int` The value that is set in the sourceType column to specifiy an object is a star. Returns ------- fakeCat : `pandas.core.frame.DataFrame` The input catalog of fake sources but with the bad objects removed Notes ----- If the config option sourceSelectionColName is set then only objects with this column set to True will be added.
Definition at line 660 of file insertFakes.py.
def lsst.pipe.tasks.insertFakes.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 Yields ------- galImages : `generator` A generator of tuples of `lsst.afw.image.exposure.exposure.ExposureF` and `lsst.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. See mkFakeStars doc string for an explanation of calibration to instrumental flux.
Definition at line 530 of file insertFakes.py.
def lsst.pipe.tasks.insertFakes.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 Yields ------- starImages : `generator` A generator of tuples of `lsst.afw.image.ImageF` of fake stars and `lsst.geom.Point2D` of their locations. Notes ----- To take a given magnitude and translate to the number of counts in the image we use photoCalib.magnitudeToInstFlux, which returns the instrumental flux for the given calibration radius used in the photometric calibration step. Thus `calibFluxRadius` should be set to this same radius so that we can normalize the PSF model to the correct instrumental flux within calibFluxRadius.
Definition at line 605 of file insertFakes.py.
def lsst.pipe.tasks.insertFakes.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` 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 500 of file insertFakes.py.
lsst.pipe.tasks.insertFakes.convIm |
Definition at line 444 of file insertFakes.py.
lsst.pipe.tasks.insertFakes.correctedFlux |
raColName = pexConfig.Field( doc="RA column name used in the fake source catalog.", dtype=str, default="raJ2000", ) decColName = pexConfig.Field( doc="Dec. column name used in the fake source catalog.", dtype=str, default="decJ2000", ) doCleanCat = pexConfig.Field( doc="If true removes bad sources from the catalog.", dtype=bool, default=True, ) diskHLR = pexConfig.Field( doc="Column name for the disk half light radius used in the fake source catalog.", dtype=str, default="DiskHalfLightRadius", ) bulgeHLR = pexConfig.Field( doc="Column name for the bulge half light radius used in the fake source catalog.", dtype=str, default="BulgeHalfLightRadius", ) magVar = pexConfig.Field( doc="The column name for the magnitude calculated taking variability into account. In the format " "``filter name``magVar, e.g. imagVar for the magnitude in the i band.", dtype=str, default="%smagVar", ) nDisk = pexConfig.Field( doc="The column name for the sersic index of the disk component used in the fake source catalog.", dtype=str, default="disk_n", ) nBulge = pexConfig.Field( doc="The column name for the sersic index of the bulge component used in the fake source catalog.", dtype=str, default="bulge_n", ) aDisk = pexConfig.Field( doc="The column name for the semi major axis length of the disk component used in the fake source" "catalog.", dtype=str, default="a_d", ) aBulge = pexConfig.Field( doc="The column name for the semi major axis length of the bulge component.", dtype=str, default="a_b", ) bDisk = pexConfig.Field( doc="The column name for the semi minor axis length of the disk component.", dtype=str, default="b_d", ) bBulge = pexConfig.Field( doc="The column name for the semi minor axis length of the bulge component used in the fake source " "catalog.", dtype=str, default="b_b", ) paDisk = pexConfig.Field( doc="The column name for the PA of the disk component used in the fake source catalog.", dtype=str, default="pa_disk", ) paBulge = pexConfig.Field( doc="The column name for the PA of the bulge component used in the fake source catalog.", dtype=str, default="pa_bulge", ) sourceType = pexConfig.Field( doc="The column name for the source type used in the fake source catalog.", dtype=str, default="sourceType", ) fakeType = pexConfig.Field( doc="What type of fake catalog to use, snapshot (includes variability in the magnitudes calculated " "from the MJD of the image), static (no variability) or filename for a user defined fits" "catalog.", dtype=str, default="static", ) calibFluxRadius = pexConfig.Field( doc="Aperture radius (in pixels) that was used to define the calibration for this image+catalog. " "This will be used to produce the correct instrumental fluxes within the radius. " "This value should match that of the field defined in slot_CalibFlux_instFlux.", dtype=float, default=12.0, ) coaddName = pexConfig.Field( doc="The name of the type of coadd used", dtype=str, default="deep", ) doSubSelectSources = pexConfig.Field( doc="Set to True if you wish to sub select sources to be input based on the value in the column" "set in the sourceSelectionColName config option.", dtype=bool, default=False ) sourceSelectionColName = pexConfig.Field( doc="The name of the column in the input fakes catalogue to be used to determine which sources to" "add, default is none and when this is used all sources are added.", dtype=str, default="templateSource" ) insertImages = pexConfig.Field( doc="Insert images directly? True or False.", dtype=bool, default=False, ) doProcessAllDataIds = pexConfig.Field( doc="If True, all input data IDs will be processed, even those containing no fake sources.", dtype=bool, default=False, ) class InsertFakesTask(PipelineTask, CmdLineTask):
Definition at line 434 of file insertFakes.py.
lsst.pipe.tasks.insertFakes.divIm |
Definition at line 452 of file insertFakes.py.
lsst.pipe.tasks.insertFakes.flux |
Definition at line 455 of file insertFakes.py.
lsst.pipe.tasks.insertFakes.galsimIm |
Definition at line 443 of file insertFakes.py.
lsst.pipe.tasks.insertFakes.imSum |
Definition at line 451 of file insertFakes.py.
lsst.pipe.tasks.insertFakes.imWithFlux |
Definition at line 459 of file insertFakes.py.
lsst.pipe.tasks.insertFakes.outIm |
Definition at line 447 of file insertFakes.py.
lsst.pipe.tasks.insertFakes.psfIm |
Definition at line 442 of file insertFakes.py.
lsst.pipe.tasks.insertFakes.psfKernel |
Definition at line 435 of file insertFakes.py.