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.
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`
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`
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 69 of file sourceSelector.py.