ProcessCcdWithVariableFakesTask#

class lsst.pipe.tasks.processCcdWithFakes.ProcessCcdWithVariableFakesTask(*args, **kwargs)#

Bases: ProcessCcdWithFakesTask

As 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_injection tasks.

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#

fakeCatpandas.DataFrame

Catalog of fakes to modify magnitudes of.

bandstr

Current observing band to modify.

exposurelsst.afw.image.ExposureF

Exposure fakes will be added to.

photoCaliblsst.afw.image.PhotoCalib

Photometric calibration object of exposure.

rngSeedint

Random number generator seed.

Returns#

dataFramepandas.DataFrame

DataFrame containing the values of the magnitudes to that will be inserted into this ccdVisit.

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#

fakeCatpandas.core.frame.DataFrame

The catalog of fake sources to add to the exposure.

exposurelsst.afw.image.exposure.exposure.ExposureF

The exposure to add the fake sources to.

skyMaplsst.skymap.SkyMap

SkyMap defining the tracts and patches the fakes are stored over.

wcslsst.afw.geom.SkyWcs, optional

WCS to use to add fake sources.

photoCaliblsst.afw.image.photoCalib.PhotoCalib, optional

Photometric calibration to be used to calibrate the fake sources.

icSourceCatlsst.afw.table.SourceCatalog, optional

Catalog to take the information about which sources were used for calibration from.

sfdSourceCatlsst.afw.table.SourceCatalog, optional

Catalog produced by singleFrameDriver, needed to copy some calibration flags from.

idGeneratorlsst.meas.base.IdGenerator, optional

Object that generates Source IDs and random seeds.

Returns#

resultStructlsst.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 called x and y and are in pixels.

Adds the Fake mask plane to the exposure 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 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.