ProcessCcdWithVariableFakesTask#
- class lsst.pipe.tasks.processCcdWithFakes.ProcessCcdWithVariableFakesTask(*args, **kwargs)#
Bases:
ProcessCcdWithFakesTaskAs ProcessCcdWithFakes except add variablity to the fakes catalog magnitude in the observed band for this ccdVisit.
Additionally, write out the modified magnitudes to the Butler.
Deprecated since version v28.0: This task will be removed in v28.0 as it is replaced by
source_injectiontasks.Methods Summary
addVariability(fakeCat, band, exposure, ...)Add scatter to the fake catalog visit magnitudes.
run(fakeCats, exposure, skyMap[, wcs, ...])Add fake sources to a calexp and then run detection, deblending and measurement.
Methods Documentation
- addVariability(fakeCat, band, exposure, photoCalib, rngSeed)#
Add scatter to the fake catalog visit magnitudes.
Currently just adds a simple Gaussian scatter around the static fake magnitude. This function could be modified to return any number of fake variability.
Parameters#
- fakeCat
pandas.DataFrame Catalog of fakes to modify magnitudes of.
- band
str Current observing band to modify.
- exposure
lsst.afw.image.ExposureF Exposure fakes will be added to.
- photoCalib
lsst.afw.image.PhotoCalib Photometric calibration object of
exposure.- rngSeed
int Random number generator seed.
Returns#
- dataFrame
pandas.DataFrame DataFrame containing the values of the magnitudes to that will be inserted into this ccdVisit.
- fakeCat
- run(fakeCats, exposure, skyMap, wcs=None, photoCalib=None, icSourceCat=None, sfdSourceCat=None, idGenerator=None)#
Add fake sources to a calexp and then run detection, deblending and measurement.
Parameters#
- fakeCat
pandas.core.frame.DataFrame The catalog of fake sources to add to the exposure.
- exposure
lsst.afw.image.exposure.exposure.ExposureF The exposure to add the fake sources to.
- skyMap
lsst.skymap.SkyMap SkyMap defining the tracts and patches the fakes are stored over.
- wcs
lsst.afw.geom.SkyWcs, optional WCS to use to add fake sources.
- photoCalib
lsst.afw.image.photoCalib.PhotoCalib, optional Photometric calibration to be used to calibrate the fake sources.
- icSourceCat
lsst.afw.table.SourceCatalog, optional Catalog to take the information about which sources were used for calibration from.
- sfdSourceCat
lsst.afw.table.SourceCatalog, optional Catalog produced by singleFrameDriver, needed to copy some calibration flags from.
- idGenerator
lsst.meas.base.IdGenerator, optional Object that generates Source IDs and random seeds.
Returns#
- resultStruct
lsst.pipe.base.struct.Struct Results struct containing:
outputExposure : Exposure with added fakes (
lsst.afw.image.exposure.exposure.ExposureF)outputCat : Catalog with detected fakes (
lsst.afw.table.source.source.SourceCatalog)ccdVisitFakeMagnitudes : Magnitudes that these fakes were inserted with after being scattered (
pandas.DataFrame)
Notes#
Adds pixel coordinates for each source to the fakeCat and removes objects with bulge or disk half light radius = 0 (if
config.cleanCat = True). These columns are calledxandyand are in pixels.Adds the
Fakemask plane to the exposure which is then set byaddFakeSourcesto mark where fake sources have been added. Uses the information in thefakeCatto make fake galaxies (using galsim) and fake stars, using the PSF models from the PSF information for the calexp. These are then added to the calexp and the calexp 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.
- fakeCat