lsst.meas.algorithms  19.0.0-21-gf63060fa+1
Public Member Functions | Static Public Attributes | List of all members
lsst.meas.algorithms.flaggedSourceSelector.FlaggedSourceSelectorTask Class Reference
Inheritance diagram for lsst.meas.algorithms.flaggedSourceSelector.FlaggedSourceSelectorTask:
lsst.meas.algorithms.sourceSelector.BaseSourceSelectorTask

Public Member Functions

def selectSources (self, sourceCat, matches=None, exposure=None)
 
def run (self, sourceCat, sourceSelectedField=None, matches=None, exposure=None)
 

Static Public Attributes

 ConfigClass = FlaggedSourceSelectorConfig
 
bool usesMatches = False
 

Detailed Description

A trivial SourceSelector that simply uses an existing flag field to filter
a SourceCatalog.

This is most frequently used in steps that occur after the a PSF model has
been built, to allow other procedures that need Sources to use the set of
Sources used to determine the PSF.

Attributes
----------
usesMatches : `bool`
    A boolean variable specify if the inherited source selector uses
    matches.

Definition at line 41 of file flaggedSourceSelector.py.

Member Function Documentation

◆ run()

def lsst.meas.algorithms.sourceSelector.BaseSourceSelectorTask.run (   self,
  sourceCat,
  sourceSelectedField = None,
  matches = None,
  exposure = None 
)
inherited
Select sources and return them.

The input catalog must be contiguous in memory.

Parameters:
-----------
sourceCat : `lsst.afw.table.SourceCatalog` or `pandas.DataFrame`
    or `astropy.table.Table`
    Catalog of sources to select from.
sourceSelectedField : `str` or None
    Name of flag field in sourceCat to set for selected sources.
    If set, will modify sourceCat in-place.
matches : `list` of `lsst.afw.table.ReferenceMatch` or None
    List of matches to use for source selection.
    If usesMatches is set in source selector this field is required.
    If not, it is ignored.
exposure : `lsst.afw.image.Exposure` or None
    The exposure the catalog was built from; used for debug display.

Return
------
struct : `lsst.pipe.base.Struct`
    The struct contains the following data:

    - sourceCat : `lsst.afw.table.SourceCatalog` or `pandas.DataFrame`
          or `astropy.table.Table`
The catalog of sources that were selected.
(may not be memory-contiguous)
    - selected : `numpy.ndarray` of `bool``
Boolean array of sources that were selected, same length as
sourceCat.

Raises
------
RuntimeError
    Raised if ``sourceCat`` is not contiguous.

Definition at line 71 of file sourceSelector.py.

◆ selectSources()

def lsst.meas.algorithms.flaggedSourceSelector.FlaggedSourceSelectorTask.selectSources (   self,
  sourceCat,
  matches = None,
  exposure = None 
)
Return a bool array representing which sources to select from
sourceCat.

The input catalog must be contiguous in memory.

Parameters
----------
sourceCat : `lsst.afw.table.SourceCatalog`
    Catalog of sources to select from.
matches : `list` of `lsst.afw.table.ReferenceMatch` or None
    Ignored in this SourceSelector.
exposure : `lsst.afw.image.Exposure` or None
    The exposure the catalog was built from; used for debug display.

Return
------
struct : `lsst.pipe.base.Struct`
    The struct contains the following data:

    - selected : `array` of `bool`
Boolean array of sources that were selected, same length as
``sourceCat``.

Reimplemented from lsst.meas.algorithms.sourceSelector.BaseSourceSelectorTask.

Definition at line 60 of file flaggedSourceSelector.py.

Member Data Documentation

◆ ConfigClass

lsst.meas.algorithms.flaggedSourceSelector.FlaggedSourceSelectorTask.ConfigClass = FlaggedSourceSelectorConfig
static

Definition at line 57 of file flaggedSourceSelector.py.

◆ usesMatches

bool lsst.meas.algorithms.sourceSelector.BaseSourceSelectorTask.usesMatches = False
staticinherited

Definition at line 66 of file sourceSelector.py.


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