|
lsst.meas.base
17.0.1-6-gaad6eea+30
|
Public Member Functions | |
| def | __init__ (self, butler=None, refSchema=None, initInputs=None, kwds) |
| 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 | 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 | |
| ConfigClass = ForcedPhotImageConfig | |
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 126 of file forcedPhotImage.py.
| def lsst.meas.base.forcedPhotImage.ForcedPhotImageTask.__init__ | ( | self, | |
butler = None, |
|||
refSchema = None, |
|||
initInputs = None, |
|||
| kwds | |||
| ) |
Definition at line 161 of file forcedPhotImage.py.
| def lsst.meas.base.forcedPhotImage.ForcedPhotImageTask.adaptArgsAndRun | ( | self, | |
| inputData, | |||
| inputDataIds, | |||
| outputDataIds, | |||
| butler | |||
| ) |
Definition at line 180 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 327 of file forcedPhotImage.py.
| def lsst.meas.base.forcedPhotImage.ForcedPhotImageTask.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 314 of file forcedPhotImage.py.
| def lsst.meas.base.forcedPhotImage.ForcedPhotImageTask.generateMeasCat | ( | self, | |
| exposureDataId, | |||
| exposure, | |||
| refCat, | |||
| refWcs, | |||
| idPackerName, | |||
| butler | |||
| ) |
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.
| def lsst.meas.base.forcedPhotImage.ForcedPhotImageTask.getExposure | ( | self, | |
| dataRef | |||
| ) |
Read input exposure on which measurement will be performed.
Parameters
----------
dataRef : `lsst.daf.persistence.ButlerDataRef`
Butler data reference.
Definition at line 347 of file forcedPhotImage.py.
| def lsst.meas.base.forcedPhotImage.ForcedPhotImageTask.getExposureId | ( | self, | |
| dataRef | |||
| ) |
Definition at line 311 of file forcedPhotImage.py.
| def lsst.meas.base.forcedPhotImage.ForcedPhotImageTask.getInitOutputDatasets | ( | self | ) |
Definition at line 177 of file forcedPhotImage.py.
| def lsst.meas.base.forcedPhotImage.ForcedPhotImageTask.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 370 of file forcedPhotImage.py.
| def lsst.meas.base.forcedPhotImage.ForcedPhotImageTask.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 300 of file forcedPhotImage.py.
| def lsst.meas.base.forcedPhotImage.ForcedPhotImageTask.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 263 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 221 of file forcedPhotImage.py.
| def lsst.meas.base.forcedPhotImage.ForcedPhotImageTask.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 357 of file forcedPhotImage.py.
|
static |
Definition at line 158 of file forcedPhotImage.py.
1.8.13