SetPrimaryFlagsTask#

class lsst.meas.algorithms.SetPrimaryFlagsTask(*, schema, isSingleFrame=False, **kwargs)#

Bases: Task

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#

schemalsst.afw.table.Schema

Source catalog schema to add fields to.

isSingleFramebool

Flag specifying if task is operating with single frame imaging.

includeDeblendbool

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.

Methods Summary

run(sources[, skyMap, tractInfo, patchInfo])

Set isPrimary and related flags on sources.

Methods Documentation

run(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#

sourceslsst.afw.table.SourceCatalog

A sourceTable. Reads in centroid fields and an nChild field. Writes is-patch-inner, is-tract-inner, and is-primary flags.

skyMaplsst.skymap.BaseSkyMap

Sky tessellation object

tractInfolsst.skymap.TractInfo, optional

Tract object; required if self.isSingleFrame is False.

patchInfolsst.skymap.PatchInfo

Patch object; required if self.isSingleFrame is False.