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
|
Base class for forced photometry subtask that retrieves reference sources. More...
Public Member Functions | |
def | __init__ |
Initialize the task. More... | |
def | getSchema |
Return the schema for the reference sources. More... | |
def | getWcs |
Return the WCS for reference sources. More... | |
def | fetchInBox |
Return reference sources that overlap a region defined by a pixel-coordinate bounding box and corresponding Wcs. More... | |
def | fetchInPatches |
Return reference sources that overlap a region defined by one or more SkyMap patches. More... | |
def | subset |
Filter sources to contain only those within the given box, defined in the coordinate system defined by the given Wcs. More... | |
Static Public Attributes | |
ConfigClass = BaseReferencesConfig | |
Base class for forced photometry subtask that retrieves reference sources.
BaseReferencesTask defines the required API for the references task, which includes:
It also provides the subset() method, which may be of use to derived classes when reimplementing fetchInBox.
Definition at line 45 of file references.py.
def lsst.meas.base.references.BaseReferencesTask.__init__ | ( | self, | |
butler = None , |
|||
schema = None , |
|||
kwargs | |||
) |
Initialize the task.
BaseReferencesTask and its subclasses take two keyword arguments beyond the usual Task arguments:
Definition at line 61 of file references.py.
def lsst.meas.base.references.BaseReferencesTask.fetchInBox | ( | self, | |
dataRef, | |||
bbox, | |||
wcs | |||
) |
Return reference sources that overlap a region defined by a pixel-coordinate bounding box and corresponding Wcs.
[in] | dataRef | ButlerDataRef; the implied data ID must contain the 'tract' key. |
[in] | bbox | a afw.geom.Box2I or Box2D that defines the region in pixel coordinates |
[in] | wcs | afw.image.Wcs that maps the bbox to sky coordinates |
It is not required that the returned object be a SourceCatalog; it may be any Python iterable containing SourceRecords (including a lazy iterator).
The returned set of sources should be complete and close to minimal.
Definition at line 85 of file references.py.
def lsst.meas.base.references.BaseReferencesTask.fetchInPatches | ( | self, | |
dataRef, | |||
patchList | |||
) |
Return reference sources that overlap a region defined by one or more SkyMap patches.
[in] | dataRef | ButlerDataRef; the implied data ID must contain the 'tract' key. |
[in] | patchList | list of skymap.PatchInfo instances for which to fetch reference sources |
It is not required that the returned object be a SourceCatalog; it may be any Python sequence containing SourceRecords (including a lazy iterator).
The returned set of sources should be complete and close to minimal. If config.removePatchOverlaps is True, only sources within each patch's "inner" bounding box should be returned.
Definition at line 103 of file references.py.
def lsst.meas.base.references.BaseReferencesTask.getSchema | ( | self, | |
butler | |||
) |
Return the schema for the reference sources.
Must be available even before any data has been processed.
Definition at line 71 of file references.py.
def lsst.meas.base.references.BaseReferencesTask.getWcs | ( | self, | |
dataRef | |||
) |
Return the WCS for reference sources.
The given dataRef must include the tract in its dataId.
Definition at line 79 of file references.py.
def lsst.meas.base.references.BaseReferencesTask.subset | ( | self, | |
sources, | |||
bbox, | |||
wcs | |||
) |
Filter sources to contain only those within the given box, defined in the coordinate system defined by the given Wcs.
[in] | sources | input iterable of SourceRecords |
[in] | bbox | bounding box with which to filter reference sources (Box2I or Box2D) |
[in] | wcs | afw.image.Wcs that defines the coordinate system of bbox |
Instead of filtering sources directly via their positions, we filter based on the positions of parent objects, then include or discard all children based on their parent's status. This is necessary to support ReplaceWithNoise in measurement, which requires all child sources have their parent present.
This is not a part of the required BaseReferencesTask interface; it's a convenience function used in implementing fetchInBox that may be of use to subclasses.
Definition at line 121 of file references.py.
|
static |
Definition at line 59 of file references.py.