lsst.meas.algorithms gb90eeb9370+0c538a9c5a
Loading...
Searching...
No Matches
lsst.meas.algorithms.matcherSourceSelector.MatcherSourceSelectorTask Class Reference
Inheritance diagram for lsst.meas.algorithms.matcherSourceSelector.MatcherSourceSelectorTask:
lsst.meas.algorithms.sourceSelector.BaseSourceSelectorTask

Public Member Functions

 __init__ (self, *args, **kwargs)
 
 selectSources (self, sourceCat, matches=None, exposure=None)
 
 run (self, sourceCat, sourceSelectedField=None, matches=None, exposure=None)
 

Public Attributes

 parentKey = schema["parent"].asKey()
 
 centroidXKey = schema["slot_Centroid_x"].asKey()
 
 centroidYKey = schema["slot_Centroid_y"].asKey()
 
 centroidFlagKey = schema["slot_Centroid_flag"].asKey()
 
str fluxField = fluxPrefix + "instFlux"
 
 fluxKey = schema[fluxPrefix + "instFlux"].asKey()
 
 fluxFlagKey = schema[fluxPrefix + "flag"].asKey()
 
 fluxErrKey = schema[fluxPrefix + "instFluxErr"].asKey()
 
 edgeKey = schema["base_PixelFlags_flag_edge"].asKey()
 
 interpolatedCenterKey = schema["base_PixelFlags_flag_interpolatedCenter"].asKey()
 
 saturatedKey = schema["base_PixelFlags_flag_saturated"].asKey()
 

Static Public Attributes

 ConfigClass = BaseSourceSelectorConfig
 
bool usesMatches = False
 

Protected Member Functions

 _getSchemaKeys (self, schema)
 
 _isParent (self, sourceCat)
 
 _hasCentroid (self, sourceCat)
 
 _goodSN (self, sourceCat)
 
 _isUsable (self, sourceCat)
 
 _isGood (self, sourceCat)
 

Static Protected Attributes

str _DefaultName = "sourceSelector"
 

Detailed Description

Select sources that are useful for matching.

Good matching sources have high signal/noise, are non-blended. They need not
be PSF sources, just have reliable centroids.

Distinguished from astrometrySourceSelector because it is more lenient
(i.e. not checking footprints or bad flags).

Definition at line 59 of file matcherSourceSelector.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.meas.algorithms.matcherSourceSelector.MatcherSourceSelectorTask.__init__ ( self,
* args,
** kwargs )

Definition at line 70 of file matcherSourceSelector.py.

Member Function Documentation

◆ _getSchemaKeys()

lsst.meas.algorithms.matcherSourceSelector.MatcherSourceSelectorTask._getSchemaKeys ( self,
schema )
protected
Extract and save the necessary keys from schema with asKey.

Definition at line 102 of file matcherSourceSelector.py.

◆ _goodSN()

lsst.meas.algorithms.matcherSourceSelector.MatcherSourceSelectorTask._goodSN ( self,
sourceCat )
protected
Return True for each source that has Signal/Noise > config.minSnr.

Definition at line 133 of file matcherSourceSelector.py.

◆ _hasCentroid()

lsst.meas.algorithms.matcherSourceSelector.MatcherSourceSelectorTask._hasCentroid ( self,
sourceCat )
protected
Return True for each source that has a valid centroid

Definition at line 126 of file matcherSourceSelector.py.

◆ _isGood()

lsst.meas.algorithms.matcherSourceSelector.MatcherSourceSelectorTask._isGood ( self,
sourceCat )
protected
Return True for each source that is usable for matching, even if it may
have a poor centroid.

For a source to be usable it must:

- Not be on a CCD edge.
- Not have an interpolated pixel within 3x3 around their centroid.
- Not have a saturated pixel in their footprint.

Definition at line 159 of file matcherSourceSelector.py.

◆ _isParent()

lsst.meas.algorithms.matcherSourceSelector.MatcherSourceSelectorTask._isParent ( self,
sourceCat )
protected
Return True for each source that is the parent source.

Definition at line 120 of file matcherSourceSelector.py.

◆ _isUsable()

lsst.meas.algorithms.matcherSourceSelector.MatcherSourceSelectorTask._isUsable ( self,
sourceCat )
protected
Return True for each source that is usable for matching, even if it may
have a poor centroid.

For a source to be usable it must:

- have a valid centroid
- not be deblended
- have a valid instFlux (of the type specified in this object's constructor)
- have adequate signal-to-noise

Definition at line 142 of file matcherSourceSelector.py.

◆ run()

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 : Various table formats
    Catalog of sources to select from. Can be
    `lsst.afw.table.SourceCatalog` or `pandas.DataFrame` or
    `astropy.table.Table`,
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.

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

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

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

Definition at line 71 of file sourceSelector.py.

◆ selectSources()

lsst.meas.algorithms.matcherSourceSelector.MatcherSourceSelectorTask.selectSources ( self,
sourceCat,
matches = None,
exposure = None )
Return a selection of sources that are useful for matching.

Parameters
----------
sourceCat : `lsst.afw.table.SourceCatalog`
    Catalog of sources to select from.
    This catalog must be contiguous in memory.
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.

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

    ``selected``
        Boolean array of sources that were selected, same length as
        sourceCat. (`numpy.ndarray` of `bool`)

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

Definition at line 73 of file matcherSourceSelector.py.

Member Data Documentation

◆ _DefaultName

str lsst.meas.algorithms.sourceSelector.BaseSourceSelectorTask._DefaultName = "sourceSelector"
staticprotectedinherited

Definition at line 65 of file sourceSelector.py.

◆ centroidFlagKey

lsst.meas.algorithms.matcherSourceSelector.MatcherSourceSelectorTask.centroidFlagKey = schema["slot_Centroid_flag"].asKey()

Definition at line 108 of file matcherSourceSelector.py.

◆ centroidXKey

lsst.meas.algorithms.matcherSourceSelector.MatcherSourceSelectorTask.centroidXKey = schema["slot_Centroid_x"].asKey()

Definition at line 106 of file matcherSourceSelector.py.

◆ centroidYKey

lsst.meas.algorithms.matcherSourceSelector.MatcherSourceSelectorTask.centroidYKey = schema["slot_Centroid_y"].asKey()

Definition at line 107 of file matcherSourceSelector.py.

◆ ConfigClass

lsst.meas.algorithms.sourceSelector.BaseSourceSelectorTask.ConfigClass = BaseSourceSelectorConfig
staticinherited

Definition at line 64 of file sourceSelector.py.

◆ edgeKey

lsst.meas.algorithms.matcherSourceSelector.MatcherSourceSelectorTask.edgeKey = schema["base_PixelFlags_flag_edge"].asKey()

Definition at line 116 of file matcherSourceSelector.py.

◆ fluxErrKey

lsst.meas.algorithms.matcherSourceSelector.MatcherSourceSelectorTask.fluxErrKey = schema[fluxPrefix + "instFluxErr"].asKey()

Definition at line 114 of file matcherSourceSelector.py.

◆ fluxField

str lsst.meas.algorithms.matcherSourceSelector.MatcherSourceSelectorTask.fluxField = fluxPrefix + "instFlux"

Definition at line 111 of file matcherSourceSelector.py.

◆ fluxFlagKey

lsst.meas.algorithms.matcherSourceSelector.MatcherSourceSelectorTask.fluxFlagKey = schema[fluxPrefix + "flag"].asKey()

Definition at line 113 of file matcherSourceSelector.py.

◆ fluxKey

lsst.meas.algorithms.matcherSourceSelector.MatcherSourceSelectorTask.fluxKey = schema[fluxPrefix + "instFlux"].asKey()

Definition at line 112 of file matcherSourceSelector.py.

◆ interpolatedCenterKey

lsst.meas.algorithms.matcherSourceSelector.MatcherSourceSelectorTask.interpolatedCenterKey = schema["base_PixelFlags_flag_interpolatedCenter"].asKey()

Definition at line 117 of file matcherSourceSelector.py.

◆ parentKey

lsst.meas.algorithms.matcherSourceSelector.MatcherSourceSelectorTask.parentKey = schema["parent"].asKey()

Definition at line 105 of file matcherSourceSelector.py.

◆ saturatedKey

lsst.meas.algorithms.matcherSourceSelector.MatcherSourceSelectorTask.saturatedKey = schema["base_PixelFlags_flag_saturated"].asKey()

Definition at line 118 of file matcherSourceSelector.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: