lsst.meas.algorithms gab1f63e0c6+d9ba7aec41
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Static Protected Attributes | List of all members
lsst.meas.algorithms.setPrimaryFlags.SetPrimaryFlagsTask Class Reference
Inheritance diagram for lsst.meas.algorithms.setPrimaryFlags.SetPrimaryFlagsTask:

Public Member Functions

 __init__ (self, *schema, isSingleFrame=False, **kwargs)
 
 run (self, sources, skyMap=None, tractInfo=None, patchInfo=None)
 

Public Attributes

 schema
 
 isSingleFrame
 
 includeDeblend
 
 isPatchInnerKey
 
 isTractInnerKey
 
 isPrimaryKey
 
 isDeblendedSourceKey
 
 fromBlendKey
 
 isIsolatedKey
 
 isDeblendedModelKey
 

Static Public Attributes

 ConfigClass = SetPrimaryFlagsConfig
 

Protected Member Functions

 _getPseudoSources (self, sources)
 

Static Protected Attributes

str _DefaultName = "setPrimaryFlags"
 

Detailed Description

Set the ``isPrimary`` flag and either various blendedness, or
patch/tract flags to a catalog (for single frame or coadd catalogs,
respectively), based on other properties of the sources.

Parameters
----------
schema : `lsst.afw.table.Schema`
    Source catalog schema to add fields to.
isSingleFrame : `bool`
    Flag specifying if task is operating with single frame imaging.
includeDeblend : `bool`
    Include deblend information in isPrimary and add blendedness fields?

Notes
-----
The tests for this task still live in
``pipe_tasks/tests/test_isPrimaryFlag.py``; see discussion on DM-42720.

Definition at line 36 of file setPrimaryFlags.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.meas.algorithms.setPrimaryFlags.SetPrimaryFlagsTask.__init__ ( self,
* schema,
isSingleFrame = False,
** kwargs )

Definition at line 59 of file setPrimaryFlags.py.

Member Function Documentation

◆ _getPseudoSources()

lsst.meas.algorithms.setPrimaryFlags.SetPrimaryFlagsTask._getPseudoSources ( self,
sources )
protected
Get a flag that marks pseudo sources.

Some categories of sources, for example sky objects, are not really
detected sources and should not be considered primary sources.

Parameters
----------
sources : `lsst.afw.table.SourceCatalog`
    The catalog of sources for which to identify "pseudo"
    (e.g. sky) objects.

Returns
-------
isPseudo : array-like of `bool`
    True for each source that is a pseudo source.
    Note: to remove pseudo sources use `~isPseudo`.

Definition at line 157 of file setPrimaryFlags.py.

◆ run()

lsst.meas.algorithms.setPrimaryFlags.SetPrimaryFlagsTask.run ( self,
sources,
skyMap = None,
tractInfo = None,
patchInfo = None )
Set isPrimary and related flags on sources.

For coadded imaging, the `isPrimary` flag returns True when an object
has no children, is in the inner region of a coadd patch, is in the
inner region of a coadd trach, and is not detected in a pseudo-filter
(e.g., a sky_object).
For single frame imaging, the isPrimary flag returns True when a
source has no children and is not a sky source.

Parameters
----------
sources : `lsst.afw.table.SourceCatalog`
    A sourceTable. Reads in centroid fields and an nChild field.
    Writes is-patch-inner, is-tract-inner, and is-primary flags.
skyMap : `lsst.skymap.BaseSkyMap`
    Sky tessellation object
tractInfo : `lsst.skymap.TractInfo`, optional
    Tract object; required if ``self.isSingleFrame`` is False.
patchInfo : `lsst.skymap.PatchInfo`
    Patch object; required if ``self.isSingleFrame`` is False.

Definition at line 104 of file setPrimaryFlags.py.

Member Data Documentation

◆ _DefaultName

str lsst.meas.algorithms.setPrimaryFlags.SetPrimaryFlagsTask._DefaultName = "setPrimaryFlags"
staticprotected

Definition at line 56 of file setPrimaryFlags.py.

◆ ConfigClass

lsst.meas.algorithms.setPrimaryFlags.SetPrimaryFlagsTask.ConfigClass = SetPrimaryFlagsConfig
static

Definition at line 57 of file setPrimaryFlags.py.

◆ fromBlendKey

lsst.meas.algorithms.setPrimaryFlags.SetPrimaryFlagsTask.fromBlendKey

Definition at line 89 of file setPrimaryFlags.py.

◆ includeDeblend

lsst.meas.algorithms.setPrimaryFlags.SetPrimaryFlagsTask.includeDeblend

Definition at line 63 of file setPrimaryFlags.py.

◆ isDeblendedModelKey

lsst.meas.algorithms.setPrimaryFlags.SetPrimaryFlagsTask.isDeblendedModelKey

Definition at line 98 of file setPrimaryFlags.py.

◆ isDeblendedSourceKey

lsst.meas.algorithms.setPrimaryFlags.SetPrimaryFlagsTask.isDeblendedSourceKey

Definition at line 85 of file setPrimaryFlags.py.

◆ isIsolatedKey

lsst.meas.algorithms.setPrimaryFlags.SetPrimaryFlagsTask.isIsolatedKey

Definition at line 93 of file setPrimaryFlags.py.

◆ isPatchInnerKey

lsst.meas.algorithms.setPrimaryFlags.SetPrimaryFlagsTask.isPatchInnerKey

Definition at line 68 of file setPrimaryFlags.py.

◆ isPrimaryKey

lsst.meas.algorithms.setPrimaryFlags.SetPrimaryFlagsTask.isPrimaryKey

Definition at line 78 of file setPrimaryFlags.py.

◆ isSingleFrame

lsst.meas.algorithms.setPrimaryFlags.SetPrimaryFlagsTask.isSingleFrame

Definition at line 62 of file setPrimaryFlags.py.

◆ isTractInnerKey

lsst.meas.algorithms.setPrimaryFlags.SetPrimaryFlagsTask.isTractInnerKey

Definition at line 72 of file setPrimaryFlags.py.

◆ schema

lsst.meas.algorithms.setPrimaryFlags.SetPrimaryFlagsTask.schema

Definition at line 61 of file setPrimaryFlags.py.


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