lsst.meas.base  19.0.0-9-g463f923+1
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
lsst.meas.base.references.CoaddSrcReferencesTask Class Reference
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)
 
def getWcs (self, dataRef)
 
def fetchInPatches (self, dataRef, patchList)
 
def fetchInBox (self, dataRef, bbox, wcs, pad=0)
 
def getSchema (self, butler)
 
def fetchInBox (self, dataRef, bbox, wcs)
 
def subset (self, sources, bbox, wcs)
 

Public Attributes

 schema
 

Static Public Attributes

 ConfigClass = CoaddSrcReferencesConfig
 
string datasetSuffix = "src"
 

Detailed Description

Select reference sources by loading the “coadd source” dataset directly.

The name of the dataset to read is generated by appending the
`datasetSuffix` attribute to the string ``Coadd_``. The dataset is then
read directly from disk using the Butler.

Parameters
----------
schema : `lsst.afw.table.Schema`, optional
    The schema of the detection catalogs used as input to this one.
butler : `lsst.daf.persistence.butler.Butler`, optional
    A Butler used to read the input schema from disk. Required if
    ``schema`` is `None`.

Notes
-----
The task will set its own ``self.schema`` attribute to the schema of the
output merged catalog.

Definition at line 236 of file references.py.

Constructor & Destructor Documentation

◆ __init__()

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

Reimplemented from lsst.meas.base.references.BaseReferencesTask.

Definition at line 265 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 within a given bounding box.

Reference sources are selected if they overlap a region defined by a
pixel-coordinate bounding box and corresponding WCS.

Parameters
----------
dataRef : `lsst.daf.persistence.ButlerDataRef`
    Butler data reference. The implied data ID must contain the
    ``tract`` key.
bbox : `lsst.afw.geom.Box2I` or `lsst.afw.geom.Box2D`
    Defines the selection region in pixel coordinates.
wcs : `lsst.afw.image.SkyWcs`
    Maps ``bbox`` to sky coordinates.

Returns
-------
sources : iterable of `~lsst.afw.table.SourceRecord`
    Reference sources. May be any Python iterable, including a lazy
    iterator.

Notes
-----
The returned set of sources should be complete and close to minimal.

Definition at line 108 of file references.py.

◆ fetchInBox() [2/2]

def lsst.meas.base.references.CoaddSrcReferencesTask.fetchInBox (   self,
  dataRef,
  bbox,
  wcs,
  pad = 0 
)
Return reference sources within a given bounding box.

Reference sources are selected if they overlap a region defined by a
pixel-coordinate bounding box and corresponding WCS.

Parameters
----------
dataRef : `lsst.daf.persistence.ButlerDataRef`
    Butler data reference. The implied data ID must contain the
    ``tract`` key.
bbox : `lsst.afw.geom.Box2I` or `lsst.afw.geom.Box2D`
    Defines the selection region in pixel coordinates.
wcs : `lsst.afw.image.SkyWcs`
    Maps ``bbox`` to sky coordinates.
pad : `int`
    a buffer to grow the bounding box by after catalogs have been loaded, but
    before filtering them to include just the given bounding box.

Returns
-------
sources : iterable of `~lsst.afw.table.SourceRecord`
    Reference sources. May be any Python iterable, including a lazy
    iterator.

Definition at line 329 of file references.py.

◆ fetchInPatches()

def lsst.meas.base.references.CoaddSrcReferencesTask.fetchInPatches (   self,
  dataRef,
  patchList 
)
Fetch the source catalog using the Butler.

Parameters
----------
dataRef : `lsst.daf.persistence.ButlerDataRef`
    Butler data reference. The implied data ID must contain the
    ``tract`` key.
patchList : `list` of `lsst.skymap.PatchInfo`
    Patches for which to fetch reference sources.

Returns
-------
sources : iterable of `~lsst.afw.table.SourceRecord`
    Reference sources. May be any Python iterable, including a lazy
    iterator.

Notes
-----
An implementation of `BaseReferencesTask.fetchInPatches` that loads
``Coadd_`` + `datasetSuffix` catalogs using the butler.

Reimplemented from lsst.meas.base.references.BaseReferencesTask.

Definition at line 284 of file references.py.

◆ getSchema()

def lsst.meas.base.references.BaseReferencesTask.getSchema (   self,
  butler 
)
inherited
Return the schema for the reference sources.

Parameters
----------
butler : `lsst.daf.persistence.butler.Butler`
    Data butler from which the schema will be fetched.

Notes
-----
Must be available even before any data has been processed.

Definition at line 83 of file references.py.

◆ getWcs()

def lsst.meas.base.references.CoaddSrcReferencesTask.getWcs (   self,
  dataRef 
)
Return the WCS for reference sources.

Parameters
----------
dataRef : `lsst.daf.persistence.ButlerDataRef`
    Butler data reference. Must includ the trac in its dataId.

Reimplemented from lsst.meas.base.references.BaseReferencesTask.

Definition at line 273 of file references.py.

◆ subset()

def lsst.meas.base.references.BaseReferencesTask.subset (   self,
  sources,
  bbox,
  wcs 
)
inherited
Filter a list of sources to only those within the bounding box.

Parameters
----------
sources : iterable of `~lsst.afw.table.SourceRecord`
    Reference sources. May be any Python iterable, including a lazy
    iterator.
bbox : `lsst.afw.geom.Box2I` or `lsst.afw.geom.Box2D`
    Defines the selection region.
wcs : `lsst.afw.image.SkyWcs`
    Maps ``bbox`` to sky coordinates.

Returns
-------
sources : iterable of `~lsst.afw.table.SourceRecord`
    Filtered sources. May be any Python iterable, including a lazy
    iterator.

Notes
-----
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
replacement with noise 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 162 of file references.py.

Member Data Documentation

◆ ConfigClass

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

Definition at line 257 of file references.py.

◆ datasetSuffix

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

Definition at line 261 of file references.py.

◆ schema

lsst.meas.base.references.CoaddSrcReferencesTask.schema

Definition at line 271 of file references.py.


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