lsst.meas.base  18.1.0-3-g62b5e86+15
Public Member Functions | Static Public Attributes | List of all members
lsst.meas.base.forcedPhotImage.attribute Class Reference
Inheritance diagram for lsst.meas.base.forcedPhotImage.attribute:

Public Member Functions

def runQuantum (self, butlerQC, inputRefs, outputRefs)
 
def generateMeasCat (self, exposureDataId, exposure, refCat, refWcs, idPackerName, registry)
 
def runDataRef (self, dataRef, psfCache=None)
 
def run (self, measCat, exposure, refCat, refWcs, exposureId=None)
 
def makeIdFactory (self, dataRef)
 
def getExposureId (self, dataRef)
 
def fetchReferences (self, dataRef, exposure)
 
def attachFootprints (self, sources, refCat, exposure, refWcs, dataRef)
 
def getExposure (self, dataRef)
 
def writeOutput (self, dataRef, sources)
 
def getSchemaCatalogs (self)
 

Static Public Attributes

 refSchema
 
 butler
 
 schema
 
 outputSchema
 

Detailed Description

Definition at line 159 of file forcedPhotImage.py.

Member Function Documentation

◆ attachFootprints()

def lsst.meas.base.forcedPhotImage.attribute.attachFootprints (   self,
  sources,
  refCat,
  exposure,
  refWcs,
  dataRef 
)
Attach footprints to blank sources prior to measurements.

Notes
-----
`~lsst.afw.detection.Footprint`\ s for forced photometry must be in the
pixel coordinate system of the image being measured, while the actual
detections may start out in a different coordinate system.

Subclasses of this class must implement this method to define how
those `~lsst.afw.detection.Footprint`\ s should be generated.

This default implementation transforms the
`~lsst.afw.detection.Footprint`\ s from the reference catalog from the
reference WCS to the exposure's WcS, which downgrades
`lsst.afw.detection.heavyFootprint.HeavyFootprint`\ s into regular
`~lsst.afw.detection.Footprint`\ s, destroying deblend information.

Definition at line 323 of file forcedPhotImage.py.

◆ fetchReferences()

def lsst.meas.base.forcedPhotImage.attribute.fetchReferences (   self,
  dataRef,
  exposure 
)
Hook for derived classes to define how to get reference objects.

Notes
-----
Derived classes should call one of the ``fetch*`` methods on the
``references`` subtask, but which one they call depends on whether the
region to get references for is a easy to describe in patches (as it
would be when doing forced measurements on a coadd), or is just an
arbitrary box (as it would be for CCD forced measurements).

Definition at line 310 of file forcedPhotImage.py.

◆ generateMeasCat()

def lsst.meas.base.forcedPhotImage.attribute.generateMeasCat (   self,
  exposureDataId,
  exposure,
  refCat,
  refWcs,
  idPackerName,
  registry 
)
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.
registry : `lsst.daf.persistence.butler.Registry`
    Registry to use to construct id packer.

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

Definition at line 185 of file forcedPhotImage.py.

◆ getExposure()

def lsst.meas.base.forcedPhotImage.attribute.getExposure (   self,
  dataRef 
)
Read input exposure on which measurement will be performed.

Parameters
----------
dataRef : `lsst.daf.persistence.ButlerDataRef`
    Butler data reference.

Definition at line 343 of file forcedPhotImage.py.

◆ getExposureId()

def lsst.meas.base.forcedPhotImage.attribute.getExposureId (   self,
  dataRef 
)

Definition at line 307 of file forcedPhotImage.py.

◆ getSchemaCatalogs()

def lsst.meas.base.forcedPhotImage.attribute.getSchemaCatalogs (   self)
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 366 of file forcedPhotImage.py.

◆ makeIdFactory()

def lsst.meas.base.forcedPhotImage.attribute.makeIdFactory (   self,
  dataRef 
)
Hook for derived classes to make an ID factory for forced sources.

Notes
-----
That this applies to forced *source* IDs, not object IDs, which are
usually handled by the ``measurement.copyColumns`` config option.

Definition at line 296 of file forcedPhotImage.py.

◆ run()

def lsst.meas.base.forcedPhotImage.attribute.run (   self,
  measCat,
  exposure,
  refCat,
  refWcs,
  exposureId = None 
)
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 259 of file forcedPhotImage.py.

◆ runDataRef()

def lsst.meas.base.forcedPhotImage.attribute.runDataRef (   self,
  dataRef,
  psfCache = None 
)
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 217 of file forcedPhotImage.py.

◆ runQuantum()

def lsst.meas.base.forcedPhotImage.attribute.runQuantum (   self,
  butlerQC,
  inputRefs,
  outputRefs 
)

Definition at line 176 of file forcedPhotImage.py.

◆ writeOutput()

def lsst.meas.base.forcedPhotImage.attribute.writeOutput (   self,
  dataRef,
  sources 
)
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 353 of file forcedPhotImage.py.

Member Data Documentation

◆ butler

lsst.meas.base.forcedPhotImage.attribute.butler
static

Definition at line 165 of file forcedPhotImage.py.

◆ outputSchema

lsst.meas.base.forcedPhotImage.attribute.outputSchema
static

Definition at line 174 of file forcedPhotImage.py.

◆ refSchema

lsst.meas.base.forcedPhotImage.attribute.refSchema
static

Definition at line 163 of file forcedPhotImage.py.

◆ schema

lsst.meas.base.forcedPhotImage.attribute.schema
static

Definition at line 165 of file forcedPhotImage.py.


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