lsst.meas.base  17.0.1-6-gaad6eea+19
Public Member Functions | Static Public Attributes | List of all members
lsst.meas.base.forcedPhotCoadd.ForcedPhotCoaddTask Class Reference
Inheritance diagram for lsst.meas.base.forcedPhotCoadd.ForcedPhotCoaddTask:
lsst.meas.base.forcedPhotImage.ForcedPhotImageTask

Public Member Functions

def getExposure (self, dataRef)
 
def makeIdFactory (self, dataRef)
 
def getExposureId (self, dataRef)
 
def fetchReferences (self, dataRef, exposure)
 
def attachFootprints (self, sources, refCat, exposure, refWcs, dataRef)
 
def getInitOutputDatasets (self)
 
def adaptArgsAndRun (self, inputData, inputDataIds, outputDataIds, butler)
 
def generateMeasCat (self, exposureDataId, exposure, refCat, refWcs, idPackerName, butler)
 
def runDataRef (self, dataRef, psfCache=None)
 
def run (self, measCat, exposure, refCat, refWcs, exposureId=None)
 
def writeOutput (self, dataRef, sources)
 
def getSchemaCatalogs (self)
 

Static Public Attributes

 ConfigClass = ForcedPhotCoaddConfig
 
 RunnerClass = lsst.pipe.base.ButlerInitializedTaskRunner
 
string dataPrefix = "deepCoadd_"
 

Detailed Description

A command-line driver for performing forced measurement on coadd images.

Notes
-----
In addition to the run method, `ForcedPhotCcdTask` overrides several
methods of `ForcedPhotImageTask` to specialize it for coadd processing,
including `~ForcedPhotImageTask.makeIdFactory` and
`~ForcedPhotImageTask.fetchReferences`. None of these should be called
directly by the user, though it may be useful to override them further in
subclasses.

Definition at line 72 of file forcedPhotCoadd.py.

Member Function Documentation

◆ adaptArgsAndRun()

def lsst.meas.base.forcedPhotImage.ForcedPhotImageTask.adaptArgsAndRun (   self,
  inputData,
  inputDataIds,
  outputDataIds,
  butler 
)
inherited

Definition at line 180 of file forcedPhotImage.py.

◆ attachFootprints()

def lsst.meas.base.forcedPhotCoadd.ForcedPhotCoaddTask.attachFootprints (   self,
  sources,
  refCat,
  exposure,
  refWcs,
  dataRef 
)
Attach Footprints to source records.

For coadd forced photometry, we use the deblended "heavy"
`~lsst.afw.detection.Footprint`\ s from the single-band measurements
of the same band - because we've guaranteed that the peaks (and hence
child sources) will be consistent across all bands before we get to
measurement, this should yield reasonable deblending for most sources.
It's most likely limitation is that it will not provide good flux
upper limits for sources that were not detected in this band but were
blended with sources that were.

Definition at line 145 of file forcedPhotCoadd.py.

◆ fetchReferences()

def lsst.meas.base.forcedPhotCoadd.ForcedPhotCoaddTask.fetchReferences (   self,
  dataRef,
  exposure 
)
Return an iterable of reference sources which overlap the exposure.

Parameters
----------
dataRef : `lsst.daf.persistence.ButlerDataRef`
    Butler data reference corresponding to the image to be measured;
    should have tract, patch, and filter keys.

exposure : `lsst.afw.image.Exposure`
    Unused.

Notes
-----
All work is delegated to the references subtask; see
`CoaddSrcReferencesTask` for information about the default behavior.

Definition at line 120 of file forcedPhotCoadd.py.

◆ generateMeasCat()

def lsst.meas.base.forcedPhotImage.ForcedPhotImageTask.generateMeasCat (   self,
  exposureDataId,
  exposure,
  refCat,
  refWcs,
  idPackerName,
  butler 
)
inherited
Generate a measurement catalog for Gen3.

Parameters
----------
exposureDataId : `DataId`
    Butler dataId for this exposure.
exposure : `lsst.afw.image.exposure.Exposure`
    Exposure to generate the catalog for.
refCat : `lsst.afw.table.SourceCatalog`
    Catalog of shapes and positions at which to force photometry.
refWcs : `lsst.afw.image.SkyWcs`
    Reference world coordinate system.
idPackerName : `str`
    Type of ID packer to construct from the registry.
butler : `lsst.daf.persistence.butler.Butler`
    Butler to use to construct id packer.

Returns
-------
measCat : `lsst.afw.table.SourceCatalog`
    Catalog of forced sources to measure.

Definition at line 189 of file forcedPhotImage.py.

◆ getExposure()

def lsst.meas.base.forcedPhotCoadd.ForcedPhotCoaddTask.getExposure (   self,
  dataRef 
)

Definition at line 90 of file forcedPhotCoadd.py.

◆ getExposureId()

def lsst.meas.base.forcedPhotCoadd.ForcedPhotCoaddTask.getExposureId (   self,
  dataRef 
)

Definition at line 117 of file forcedPhotCoadd.py.

◆ getInitOutputDatasets()

def lsst.meas.base.forcedPhotImage.ForcedPhotImageTask.getInitOutputDatasets (   self)
inherited

Definition at line 177 of file forcedPhotImage.py.

◆ getSchemaCatalogs()

def lsst.meas.base.forcedPhotImage.ForcedPhotImageTask.getSchemaCatalogs (   self)
inherited
The schema catalogs that will be used by this task.

Returns
-------
schemaCatalogs : `dict`
    Dictionary mapping dataset type to schema catalog.

Notes
-----
There is only one schema for each type of forced measurement. The
dataset type for this measurement is defined in the mapper.

Definition at line 370 of file forcedPhotImage.py.

◆ makeIdFactory()

def lsst.meas.base.forcedPhotCoadd.ForcedPhotCoaddTask.makeIdFactory (   self,
  dataRef 
)
Create an object that generates globally unique source IDs.

Source IDs are created based on a per-CCD ID and the ID of the CCD
itself.

Parameters
----------
dataRef : `lsst.daf.persistence.ButlerDataRef`
    Butler data reference. The "CoaddId_bits" and "CoaddId" datasets
    are accessed. The data ID must have tract and patch keys.

Definition at line 94 of file forcedPhotCoadd.py.

◆ run()

def lsst.meas.base.forcedPhotImage.ForcedPhotImageTask.run (   self,
  measCat,
  exposure,
  refCat,
  refWcs,
  exposureId = None 
)
inherited
Perform forced measurement on a single exposure.

Parameters
----------
measCat : `lsst.afw.table.SourceCatalog`
    The measurement catalog, based on the sources listed in the
    reference catalog.
exposure : `lsst.afw.image.Exposure`
    The measurement image upon which to perform forced detection.
refCat : `lsst.afw.table.SourceCatalog`
    The reference catalog of sources to measure.
refWcs : `lsst.afw.image.SkyWcs`
    The WCS for the references.
exposureId : `int`
    Optional unique exposureId used for random seed in measurement
    task.

Returns
-------
result : `lsst.pipe.base.Struct`
    Structure with fields:

    ``measCat``
Catalog of forced measurement results
(`lsst.afw.table.SourceCatalog`).

Definition at line 263 of file forcedPhotImage.py.

◆ runDataRef()

def lsst.meas.base.forcedPhotImage.ForcedPhotImageTask.runDataRef (   self,
  dataRef,
  psfCache = None 
)
inherited
Perform forced measurement on a single exposure.

Parameters
----------
dataRef : `lsst.daf.persistence.ButlerDataRef`
    Passed to the ``references`` subtask to obtain the reference WCS,
    the ``getExposure`` method (implemented by derived classes) to
    read the measurment image, and the ``fetchReferences`` method to
    get the exposure and load the reference catalog (see
    :lsst-task`lsst.meas.base.references.CoaddSrcReferencesTask`).
    Refer to derived class documentation for details of the datasets
    and data ID keys which are used.
psfCache : `int`, optional
    Size of PSF cache, or `None`. The size of the PSF cache can have
    a significant effect upon the runtime for complicated PSF models.

Notes
-----
Sources are generated with ``generateMeasCat`` in the ``measurement``
subtask. These are passed to ``measurement``'s ``run`` method, which
fills the source catalog with the forced measurement results. The
sources are then passed to the ``writeOutputs`` method (implemented by
derived classes) which writes the outputs.

Definition at line 221 of file forcedPhotImage.py.

◆ writeOutput()

def lsst.meas.base.forcedPhotImage.ForcedPhotImageTask.writeOutput (   self,
  dataRef,
  sources 
)
inherited
Write forced source table

Parameters
----------
dataRef : `lsst.daf.persistence.ButlerDataRef`
    Butler data reference. The forced_src dataset (with
    self.dataPrefix prepended) is all that will be modified.
sources : `lsst.afw.table.SourceCatalog`
    Catalog of sources to save.

Definition at line 357 of file forcedPhotImage.py.

Member Data Documentation

◆ ConfigClass

lsst.meas.base.forcedPhotCoadd.ForcedPhotCoaddTask.ConfigClass = ForcedPhotCoaddConfig
static

Definition at line 85 of file forcedPhotCoadd.py.

◆ dataPrefix

string lsst.meas.base.forcedPhotCoadd.ForcedPhotCoaddTask.dataPrefix = "deepCoadd_"
static

Definition at line 88 of file forcedPhotCoadd.py.

◆ RunnerClass

lsst.meas.base.forcedPhotCoadd.ForcedPhotCoaddTask.RunnerClass = lsst.pipe.base.ButlerInitializedTaskRunner
static

Definition at line 86 of file forcedPhotCoadd.py.


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