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

A references task implementation that loads the coadd_datasetSuffix dataset directly from disk using the butler. More...

Inheritance diagram for lsst.meas.base.references.CoaddSrcReferencesTask:
lsst.meas.base.references.BaseReferencesTask lsst.meas.base.references.MultiBandReferencesTask

Public Member Functions

def __init__ (self, butler=None, schema=None, kwargs)
 Initialize the task. More...
 
def getWcs (self, dataRef)
 
def fetchInPatches (self, dataRef, patchList)
 An implementation of BaseReferencesTask.fetchInPatches that loads 'coadd_' + datasetSuffix catalogs using the butler. More...
 
def fetchInBox (self, dataRef, bbox, wcs, pad=0)
 Return reference sources that overlap a region defined by a pixel-coordinate bounding box and corresponding Wcs. More...
 
def getSchema (self, butler)
 Return the schema for the reference sources. More...
 
def fetchInBox (self, dataRef, bbox, wcs)
 Return reference sources that overlap a region defined by a pixel-coordinate bounding box and corresponding Wcs. More...
 
def 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. More...
 

Public Attributes

 schema
 

Static Public Attributes

 ConfigClass = CoaddSrcReferencesConfig
 
string datasetSuffix = "src"
 

Detailed Description

A references task implementation that loads the coadd_datasetSuffix dataset directly from disk using the butler.

Definition at line 179 of file references.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.meas.base.references.CoaddSrcReferencesTask.__init__ (   self,
  butler = None,
  schema = None,
  kwargs 
)

Initialize the task.

Additional keyword arguments (forwarded to BaseReferencesTask.__init__):

  • schema: the schema of the detection catalogs used as input to this one
  • butler: a butler used to read the input schema from disk, if schema is None The task will set its own self.schema attribute to the schema of the output merged catalog.

Definition at line 188 of file references.py.

Member Function Documentation

◆ fetchInBox() [1/2]

def lsst.meas.base.references.BaseReferencesTask.fetchInBox (   self,
  dataRef,
  bbox,
  wcs 
)
inherited

Return reference sources that overlap a region defined by a pixel-coordinate bounding box and corresponding Wcs.

Parameters
[in]dataRefButlerDataRef; the implied data ID must contain the 'tract' key.
[in]bboxa afw.geom.Box2I or Box2D that defines the region in pixel coordinates
[in]wcsafw.image.Wcs that maps the bbox to sky coordinates
Returns
an iterable of reference sources

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 87 of file references.py.

◆ fetchInBox() [2/2]

def lsst.meas.base.references.CoaddSrcReferencesTask.fetchInBox (   self,
  dataRef,
  bbox,
  wcs,
  pad = 0 
)

Return reference sources that overlap a region defined by a pixel-coordinate bounding box and corresponding Wcs.

Parameters
[in]dataRefButlerDataRef; the implied data ID must contain the 'tract' key.
[in]bboxa afw.geom.Box2I or Box2D that defines the region in pixel coordinates
[in]wcsafw.image.Wcs that maps the bbox to sky coordinates
[in]pada buffer to grow the bounding box by after catalogs have been loaded, but before filtering them to include just the given bounding box.
Returns
an iterable of reference sources

Definition at line 238 of file references.py.

◆ fetchInPatches()

def lsst.meas.base.references.CoaddSrcReferencesTask.fetchInPatches (   self,
  dataRef,
  patchList 
)

An implementation of BaseReferencesTask.fetchInPatches that loads 'coadd_' + datasetSuffix catalogs using the butler.

The given dataRef must include the tract in its dataId.

Definition at line 208 of file references.py.

◆ getSchema()

def lsst.meas.base.references.BaseReferencesTask.getSchema (   self,
  butler 
)
inherited

Return the schema for the reference sources.

Must be available even before any data has been processed.

Definition at line 73 of file references.py.

◆ getWcs()

def lsst.meas.base.references.CoaddSrcReferencesTask.getWcs (   self,
  dataRef 
)
Return the WCS for reference sources.  The given dataRef must include the tract in its dataId.

Definition at line 202 of file references.py.

◆ subset()

def lsst.meas.base.references.BaseReferencesTask.subset (   self,
  sources,
  bbox,
  wcs 
)
inherited

Filter sources to contain only those within the given box, defined in the coordinate system defined by the given Wcs.

Parameters
[in]sourcesinput iterable of SourceRecords
[in]bboxbounding box with which to filter reference sources (Box2I or Box2D)
[in]wcsafw.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.

Returns
an iterable of filtered reference sources

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 123 of file references.py.

Member Data Documentation

◆ ConfigClass

lsst.meas.base.references.CoaddSrcReferencesTask.ConfigClass = CoaddSrcReferencesConfig
static

Definition at line 185 of file references.py.

◆ datasetSuffix

string lsst.meas.base.references.CoaddSrcReferencesTask.datasetSuffix = "src"
static

Definition at line 186 of file references.py.

◆ schema

lsst.meas.base.references.CoaddSrcReferencesTask.schema

Definition at line 200 of file references.py.


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