lsst.meas.base  14.0-16-g7a4f44b+1
Public Member Functions | Static Public Attributes | List of all members
lsst.meas.base.forcedPhotCcd.ForcedPhotCcdTask Class Reference

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

Inheritance diagram for lsst.meas.base.forcedPhotCcd.ForcedPhotCcdTask:
lsst.meas.base.forcedPhotImage.ForcedPhotImageTask

Public Member Functions

def makeIdFactory (self, dataRef)
 
def getExposureId (self, dataRef)
 
def fetchReferences (self, dataRef, exposure)
 
def getExposure (self, dataRef)
 
def run (self, dataRef)
 Measure a single exposure using forced detection for a reference catalog. More...
 
def attachFootprints (self, sources, refCat, exposure, refWcs, dataRef)
 Hook for derived classes to define how to attach Footprints to blank sources prior to measurement. More...
 
def writeOutput (self, dataRef, sources)
 Write forced source table. More...
 
def getSchemaCatalogs (self)
 Get a dict of Schema catalogs that will be used by this Task. More...
 

Static Public Attributes

 ConfigClass = ForcedPhotCcdConfig
 
 RunnerClass = lsst.pipe.base.ButlerInitializedTaskRunner
 
string dataPrefix = ""
 

Detailed Description

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

This task is a subclass of ForcedPhotImageTask which is specifically for doing forced measurement on a single CCD exposure, using as a reference catalog the detections which were made on overlapping coadds.

The run method (inherited from ForcedPhotImageTask) takes a lsst.daf.persistence.ButlerDataRef argument that corresponds to a single CCD. This should contain the data ID keys that correspond to the "forced_src" dataset (the output dataset for ForcedPhotCcdTask), which are typically all those used to specify the "calexp" dataset (e.g. visit, raft, sensor for LSST data) as well as a coadd tract. The tract is used to look up the appropriate coadd measurement catalogs to use as references (e.g. deepCoadd_src; see CoaddSrcReferencesTask for more information). While the tract must be given as part of the dataRef, the patches are determined automatically from the bounding box and WCS of the calexp to be measured, and the filter used to fetch references is set via config (BaseReferencesConfig.filter).

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

Definition at line 147 of file forcedPhotCcd.py.

Member Function Documentation

◆ attachFootprints()

def lsst.meas.base.forcedPhotImage.ForcedPhotImageTask.attachFootprints (   self,
  sources,
  refCat,
  exposure,
  refWcs,
  dataRef 
)
inherited

Hook for derived classes to define how to attach Footprints to blank sources prior to measurement.

Footprints 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 for ForcedPhotImageTask must implement this method to define how those Footprints should be generated.

The default implementation (defined in forcedMeasurement.py) transforms the Footprints from the reference catalog from the refWcs to the exposure's Wcs, which downgrades HeavyFootprints into regular Footprints, destroying deblend information.

Definition at line 179 of file forcedPhotImage.py.

◆ fetchReferences()

def lsst.meas.base.forcedPhotCcd.ForcedPhotCcdTask.fetchReferences (   self,
  dataRef,
  exposure 
)
Return a SourceCatalog of sources which overlap the exposure.

The returned catalog is sorted by ID and guarantees that all included children have their
parent included and that all Footprints are valid.

@param dataRef       Data reference from butler corresponding to the image to be measured;
             should have tract, patch, and filter keys.
@param exposure      lsst.afw.image.Exposure to be measured (used only to obtain a Wcs and
             bounding box).

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

Definition at line 190 of file forcedPhotCcd.py.

◆ getExposure()

def lsst.meas.base.forcedPhotCcd.ForcedPhotCcdTask.getExposure (   self,
  dataRef 
)
Read input exposure to measure

@param dataRef       Data reference from butler.  Only the 'calexp' dataset is used,
             unless config.doApplyUberCal is true, in which case the corresponding
             meas_mosaic outputs are used as well.

Definition at line 221 of file forcedPhotCcd.py.

◆ getExposureId()

def lsst.meas.base.forcedPhotCcd.ForcedPhotCcdTask.getExposureId (   self,
  dataRef 
)

Definition at line 187 of file forcedPhotCcd.py.

◆ getSchemaCatalogs()

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

Get a dict of Schema catalogs that will be used by this Task.

In the case of forced taks, 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 210 of file forcedPhotImage.py.

◆ makeIdFactory()

def lsst.meas.base.forcedPhotCcd.ForcedPhotCcdTask.makeIdFactory (   self,
  dataRef 
)
Create an object that generates globally unique source IDs from per-CCD IDs and the CCD ID.

@param dataRef       Data reference from butler.  The "ccdExposureId_bits" and "ccdExposureId"
             datasets are accessed.  The data ID must have the keys that correspond
             to ccdExposureId, which is generally the same that correspond to "calexp"
             (e.g. visit, raft, sensor for LSST data).

Definition at line 175 of file forcedPhotCcd.py.

◆ run()

def lsst.meas.base.forcedPhotImage.ForcedPhotImageTask.run (   self,
  dataRef 
)
inherited

Measure a single exposure using forced detection for a reference catalog.

Parameters
[in]dataRefAn lsst.daf.persistence.ButlerDataRef. It is passed to the references subtask to obtain the reference WCS, the getExposure() method (implemented by derived classes) to read the measurement image, and the fetchReferences() method (implemented by derived classes) to get the exposure and load the reference catalog (see the CoaddSrcReferencesTask for more information). 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. See derived class documentation for which datasets and data ID keys are used.

Definition at line 123 of file forcedPhotImage.py.

◆ writeOutput()

def lsst.meas.base.forcedPhotImage.ForcedPhotImageTask.writeOutput (   self,
  dataRef,
  sources 
)
inherited

Write forced source table.

Parameters
dataRefData reference from butler; the forced_src dataset (with self.dataPrefix included) is all that will be modified.
sourcesSourceCatalog to save

Definition at line 201 of file forcedPhotImage.py.

Member Data Documentation

◆ ConfigClass

lsst.meas.base.forcedPhotCcd.ForcedPhotCcdTask.ConfigClass = ForcedPhotCcdConfig
static

Definition at line 170 of file forcedPhotCcd.py.

◆ dataPrefix

string lsst.meas.base.forcedPhotCcd.ForcedPhotCcdTask.dataPrefix = ""
static

Definition at line 173 of file forcedPhotCcd.py.

◆ RunnerClass

lsst.meas.base.forcedPhotCcd.ForcedPhotCcdTask.RunnerClass = lsst.pipe.base.ButlerInitializedTaskRunner
static

Definition at line 171 of file forcedPhotCcd.py.


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