lsst.pipe.tasks  18.1.0-15-gc153667b+1
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
lsst.pipe.tasks.processCcdWithFakes.ProcessCcdWithFakesTask Class Reference
Inheritance diagram for lsst.pipe.tasks.processCcdWithFakes.ProcessCcdWithFakesTask:

Public Member Functions

def __init__ (self, schema=None, kwargs)
 
def runDataRef (self, dataRef)
 
def runQuantum (self, butlerQC, inputRefs, outputRefs)
 
def run (self, fakeCat, exposure, wcs=None, photoCalib=None, exposureIdInfo=None)
 

Public Attributes

 schema
 
 algMetadata
 

Static Public Attributes

 ConfigClass
 

Detailed Description

Insert fake objects into calexps.

Add fake stars and galaxies to the given calexp, specified in the dataRef. Galaxy parameters are read in
from the specified file and then modelled using galsim. Re-runs characterize image and calibrate image to
give a new background estimation and measurement of the calexp.

`ProcessFakeSourcesTask` inherits six functions from insertFakesTask that make images of the fake
sources and then add them to the calexp.

`addPixCoords`
    Use the WCS information to add the pixel coordinates of each source
    Adds an ``x`` and ``y`` column to the catalog of fake sources.
`trimFakeCat`
    Trim the fake cat to about the size of the input image.
`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 calexp 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 calexp.

Notes
-----
The ``calexp`` with fake souces added to it is written out as the datatype ``calexp_fakes``.

Definition at line 135 of file processCcdWithFakes.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.pipe.tasks.processCcdWithFakes.ProcessCcdWithFakesTask.__init__ (   self,
  schema = None,
  kwargs 
)
Initalize tings! This should go above in the class docstring

Definition at line 169 of file processCcdWithFakes.py.

Member Function Documentation

◆ run()

def lsst.pipe.tasks.processCcdWithFakes.ProcessCcdWithFakesTask.run (   self,
  fakeCat,
  exposure,
  wcs = None,
  photoCalib = None,
  exposureIdInfo = 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
wcs : `lsst.afw.geom.SkyWcs`
    WCS to use to add fake sources
photoCalib : `lsst.afw.image.photoCalib.PhotoCalib`
    Photometric calibration to be used to calibrate the fake sources
exposureIdInfo : `lsst.obs.base.ExposureIdInfo`

Returns
-------
resultStruct : `lsst.pipe.base.struct.Struct`
    contains : outputExposure : `lsst.afw.image.exposure.exposure.ExposureF`
       outputCat : `lsst.afw.table.source.source.SourceCatalog`

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.

If exposureIdInfo is not provided then the SourceCatalog IDs will not be globally unique.

Definition at line 252 of file processCcdWithFakes.py.

◆ runDataRef()

def lsst.pipe.tasks.processCcdWithFakes.ProcessCcdWithFakesTask.runDataRef (   self,
  dataRef 
)
Read in/write out the required data products and add fake sources to the calexp.

Parameters
----------
dataRef : `lsst.daf.persistence.butlerSubset.ButlerDataRef`
    Data reference defining the ccd to have fakes added to it.
    Used to access the following data products:
calexp
jointcal_wcs
jointcal_photoCalib

Notes
-----
Uses the calibration and WCS information attached to the calexp for the posistioning and calibration
of the sources unless the config option config.useUpdatedCalibs is set then it uses the
meas_mosaic/jointCal outputs. The config defualts for the column names in the catalog of fakes are
taken from the University of Washington simulations database. Operates on one ccd at a time.

Definition at line 186 of file processCcdWithFakes.py.

◆ runQuantum()

def lsst.pipe.tasks.processCcdWithFakes.ProcessCcdWithFakesTask.runQuantum (   self,
  butlerQC,
  inputRefs,
  outputRefs 
)

Definition at line 229 of file processCcdWithFakes.py.

Member Data Documentation

◆ algMetadata

lsst.pipe.tasks.processCcdWithFakes.ProcessCcdWithFakesTask.algMetadata

Definition at line 179 of file processCcdWithFakes.py.

◆ ConfigClass

lsst.pipe.tasks.processCcdWithFakes.ProcessCcdWithFakesTask.ConfigClass
static

Definition at line 167 of file processCcdWithFakes.py.

◆ schema

lsst.pipe.tasks.processCcdWithFakes.ProcessCcdWithFakesTask.schema

Definition at line 177 of file processCcdWithFakes.py.


The documentation for this class was generated from the following file: