|
def | __init__ (self, butler=None, refSchema=None, kwds) |
|
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) |
|
A base class for command-line forced measurement drivers.
Parameters
----------
butler : `lsst.daf.persistence.butler.Butler`, optional
A Butler which will be passed to the references subtask to allow it to
load its schema from disk. Optional, but must be specified if
``refSchema`` is not; if both are specified, ``refSchema`` takes
precedence.
refSchema : `lsst.afw.table.Schema`, optional
The schema of the reference catalog, passed to the constructor of the
references subtask. Optional, but must be specified if ``butler`` is
not; if both are specified, ``refSchema`` takes precedence.
**kwds
Keyword arguments are passed to the supertask constructor.
Notes
-----
This is a an abstract class, which is the common ancestor for
`ForcedPhotCcdTask` and `ForcedPhotCoaddTask`. It provides the
`runDataRef` method that does most of the work, while delegating a few
customization tasks to other methods that are overridden by subclasses.
This task is not directly usable as a command line task. Subclasses must:
- Set the `_DefaultName` class attribute;
- Implement `makeIdFactory`;
- Implement `fetchReferences`;
- Optionally, implement `attachFootprints`.
Definition at line 79 of file forcedPhotImage.py.
def lsst.meas.base.forcedPhotImage.ForcedPhotImageTask.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 232 of file forcedPhotImage.py.
def lsst.meas.base.forcedPhotImage.ForcedPhotImageTask.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 126 of file forcedPhotImage.py.