LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
|
A base class for command-line forced measurement drivers. More...
Public Member Functions | |
def | __init__ |
def | run |
Measure a single exposure using forced detection for a reference catalog. More... | |
def | makeIdFactory |
Hook for derived classes to define how to make an IdFactory for forced sources. More... | |
def | fetchReferences |
Hook for derived classes to define how to get references objects. More... | |
def | attachFootprints |
Hook for derived classes to define how to attach Footprints to blank sources prior to measurement. More... | |
def | getExposure |
Read input exposure on which to perform the measurements. More... | |
def | writeOutput |
Write forced source table. More... | |
def | getSchemaCatalogs |
Get a dict of Schema catalogs that will be used by this Task. More... | |
Static Public Attributes | |
ConfigClass = ProcessImageForcedConfig | |
Private Member Functions | |
def | _getConfigName |
Return the name of the config dataset. More... | |
def | _getMetadataName |
Return the name of the metadata dataset. More... | |
Static Private Attributes | |
string | _DefaultName = "processImageForcedTask" |
A base class for command-line forced measurement drivers.
This is a an abstract class, which is the common ancestor for ForcedPhotCcdTask and ForcedPhotCoaddTask. It provides the run() 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 CmdLineTask; subclasses must:
Definition at line 71 of file forcedPhotImage.py.
def lsst.meas.base.forcedPhotImage.ProcessImageForcedTask.__init__ | ( | self, | |
butler = None , |
|||
refSchema = None , |
|||
kwds | |||
) |
Initialize the task. ForcedPhotImageTask takes two keyword arguments beyond the usual CmdLineTask arguments: - refSchema: the Schema of the reference catalog, passed to the constructor of the references subtask - butler: a butler that will be passed to the references subtask to allow it to load its Schema from disk At least one of these arguments must be present; if both are, schema takes precedence.
Definition at line 88 of file forcedPhotImage.py.
|
private |
Return the name of the config dataset.
Forces config comparison from run-to-run
Definition at line 190 of file forcedPhotImage.py.
|
private |
Return the name of the metadata dataset.
Forced metadata to be saved
Definition at line 195 of file forcedPhotImage.py.
def lsst.meas.base.forcedPhotImage.ProcessImageForcedTask.attachFootprints | ( | self, | |
sources, | |||
refCat, | |||
exposure, | |||
refWcs, | |||
dataRef | |||
) |
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 148 of file forcedPhotImage.py.
def lsst.meas.base.forcedPhotImage.ProcessImageForcedTask.fetchReferences | ( | self, | |
dataRef, | |||
exposure | |||
) |
Hook for derived classes to define how to get references objects.
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 138 of file forcedPhotImage.py.
def lsst.meas.base.forcedPhotImage.ProcessImageForcedTask.getExposure | ( | self, | |
dataRef | |||
) |
Read input exposure on which to perform the measurements.
dataRef | Data reference from butler. |
Definition at line 163 of file forcedPhotImage.py.
def lsst.meas.base.forcedPhotImage.ProcessImageForcedTask.getSchemaCatalogs | ( | self | ) |
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 179 of file forcedPhotImage.py.
def lsst.meas.base.forcedPhotImage.ProcessImageForcedTask.makeIdFactory | ( | self, | |
dataRef | |||
) |
Hook for derived classes to define how to make an IdFactory for forced sources.
Note that this is for forced source IDs, not object IDs, which are usually handled by the copyColumns config option.
Definition at line 130 of file forcedPhotImage.py.
def lsst.meas.base.forcedPhotImage.ProcessImageForcedTask.run | ( | self, | |
dataRef | |||
) |
Measure a single exposure using forced detection for a reference catalog.
[in] | dataRef | An 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 104 of file forcedPhotImage.py.
def lsst.meas.base.forcedPhotImage.ProcessImageForcedTask.writeOutput | ( | self, | |
dataRef, | |||
sources | |||
) |
Write forced source table.
dataRef | Data reference from butler; the forced_src dataset (with self.dataPrefix included) is all that will be modified. |
sources | SourceCatalog to save |
Definition at line 170 of file forcedPhotImage.py.
|
staticprivate |
Definition at line 86 of file forcedPhotImage.py.
|
static |
Definition at line 85 of file forcedPhotImage.py.