LSST Applications 29.1.0,g0fba68d861+6b120c4394,g123d84c11c+8c5ae1fdc5,g1ec0fe41b4+191117f6ec,g1fd858c14a+c8450ae71a,g3533f9d6cb+a04f9ee0ab,g35bb328faa+8c5ae1fdc5,g3f0dcc2b1b+7df08700bd,g4178042926+b4254969db,g44ba364a48+04455b336b,g53246c7159+8c5ae1fdc5,g60b5630c4e+a04f9ee0ab,g663da51e9b+b05e6e1875,g67b6fd64d1+250bf6acd3,g78460c75b0+7e33a9eb6d,g786e29fd12+668abc6043,g8352419a5c+8c5ae1fdc5,g87e3079a85+d3fa38de54,g8852436030+cd899e2626,g89139ef638+250bf6acd3,g93a033419f+31ead11197,g989de1cb63+250bf6acd3,g9f33ca652e+f6053ecf14,ga1e959baac+5fbc491aed,ga2f891cd6c+a04f9ee0ab,gabe3b4be73+8856018cbb,gabf8522325+1f7e6d67b9,gac2eed3f23+250bf6acd3,gb1101e3267+0c331e9486,gb89ab40317+250bf6acd3,gcf25f946ba+cd899e2626,gd107969129+8964d67276,gd6cbbdb0b4+6bbecc8878,gde0f65d7ad+d65f9e019a,ge278dab8ac+eb3bbeb12f,ge410e46f29+250bf6acd3,gf5e32f922b+8c5ae1fdc5,gff02db199a+747430a128,gffe7e49bb4+a04f9ee0ab
LSST Data Management Base Package
Loading...
Searching...
No Matches
lsst.meas.algorithms.sourceSelector.RequireFlags Class Reference
Inheritance diagram for lsst.meas.algorithms.sourceSelector.RequireFlags:

Public Member Functions

 apply (self, catalog)
 

Static Public Attributes

 good
 
 bad
 

Detailed Description

Select sources using flags

This object can be used as a `lsst.pex.config.Config` for configuring
the limit, and then the `apply` method can be used to identify sources
in the catalog that match the configured limit.

Definition at line 384 of file sourceSelector.py.

Member Function Documentation

◆ apply()

lsst.meas.algorithms.sourceSelector.RequireFlags.apply ( self,
catalog )
Apply the flag requirements to a catalog

Returns whether the source is selected.

Parameters
----------
catalog : `lsst.afw.table.SourceCatalog`
    Catalog of sources to which the requirements will be applied.

Returns
-------
selected : `numpy.ndarray`
    Boolean array indicating for each source whether it is selected
    (True means selected).

Definition at line 396 of file sourceSelector.py.

396 def apply(self, catalog):
397 """Apply the flag requirements to a catalog
398
399 Returns whether the source is selected.
400
401 Parameters
402 ----------
403 catalog : `lsst.afw.table.SourceCatalog`
404 Catalog of sources to which the requirements will be applied.
405
406 Returns
407 -------
408 selected : `numpy.ndarray`
409 Boolean array indicating for each source whether it is selected
410 (True means selected).
411 """
412 selected = np.ones(len(catalog), dtype=bool)
413 for flag in self.good:
414 selected &= catalog[flag]
415 for flag in self.bad:
416 selected &= ~catalog[flag]
417 return selected
418
419

Member Data Documentation

◆ bad

lsst.meas.algorithms.sourceSelector.RequireFlags.bad
static
Initial value:
= pexConfig.ListField(dtype=str, default=[],
doc="List of source flag fields that must NOT be set for a source to be used.")

Definition at line 393 of file sourceSelector.py.

◆ good

lsst.meas.algorithms.sourceSelector.RequireFlags.good
static
Initial value:
= pexConfig.ListField(dtype=str, default=[],
doc="List of source flag fields that must be set for a source to be used.")

Definition at line 391 of file sourceSelector.py.


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