LSST Applications g00274db5b6+edbf708997,g00d0e8bbd7+edbf708997,g199a45376c+5137f08352,g1fd858c14a+1d4b6db739,g262e1987ae+f4d9505c4f,g29ae962dfc+7156fb1a53,g2cef7863aa+73c82f25e4,g35bb328faa+edbf708997,g3e17d7035e+5b3adc59f5,g3fd5ace14f+852fa6fbcb,g47891489e3+6dc8069a4c,g53246c7159+edbf708997,g64539dfbff+9f17e571f4,g67b6fd64d1+6dc8069a4c,g74acd417e5+ae494d68d9,g786e29fd12+af89c03590,g7ae74a0b1c+a25e60b391,g7aefaa3e3d+536efcc10a,g7cc15d900a+d121454f8d,g87389fa792+a4172ec7da,g89139ef638+6dc8069a4c,g8d7436a09f+28c28d8d6d,g8ea07a8fe4+db21c37724,g92c671f44c+9f17e571f4,g98df359435+b2e6376b13,g99af87f6a8+b0f4ad7b8d,gac66b60396+966efe6077,gb88ae4c679+7dec8f19df,gbaa8f7a6c5+38b34f4976,gbf99507273+edbf708997,gc24b5d6ed1+9f17e571f4,gca7fc764a6+6dc8069a4c,gcc769fe2a4+97d0256649,gd7ef33dd92+6dc8069a4c,gdab6d2f7ff+ae494d68d9,gdbb4c4dda9+9f17e571f4,ge410e46f29+6dc8069a4c,geaed405ab2+e194be0d2b,w.2025.47
LSST Data Management Base Package
Loading...
Searching...
No Matches
lsst.meas.algorithms.sourceSelector.RequirePrimary Class Reference
Inheritance diagram for lsst.meas.algorithms.sourceSelector.RequirePrimary:

Public Member Functions

 apply (self, catalog)
 

Static Public Attributes

 primaryColName
 

Detailed Description

Select sources that have the detect_isPrimary flag set.

This object can be used as a `lsst.pex.config.Config` for configuring
the column names to check for "detect_isPrimary".  For single frame
catalogs this will be True when the source is not a sky object, and is
either an isolated parent that is un-modeled or deblended from a parent
with multiple children.  For meas_deblender, this is equivalent to
deblend_nChild=0.  For coadd catalogs there is an additional constraint
that the source is located on the interior of a patch and tract.

Definition at line 527 of file sourceSelector.py.

Member Function Documentation

◆ apply()

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

Returns whether the sources were selected.

Parameters
----------
catalog : lsst.afw.table.SourceCatalog` or `pandas.DataFrame`
          or `astropy.table.Table`
    Catalog of sources to which the requirement will be applied.

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

Definition at line 544 of file sourceSelector.py.

544 def apply(self, catalog):
545 """Apply the primary requirements to a catalog.
546
547 Returns whether the sources were selected.
548
549 Parameters
550 ----------
551 catalog : lsst.afw.table.SourceCatalog` or `pandas.DataFrame`
552 or `astropy.table.Table`
553 Catalog of sources to which the requirement will be applied.
554
555 Returns
556 -------
557 selected : `numpy.ndarray`
558 Boolean array indicating for each source whether it is selected
559 (True means selected).
560 """
561 selected = (_getFieldFromCatalog(catalog, self.primaryColName)).astype(bool)
562
563 return selected
564
565

Member Data Documentation

◆ primaryColName

lsst.meas.algorithms.sourceSelector.RequirePrimary.primaryColName
static
Initial value:
= pexConfig.Field(
dtype=str,
default="detect_isPrimary",
doc="Name of primary flag column",
)

Definition at line 538 of file sourceSelector.py.


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