SetPrimaryFlagsTask#
- class lsst.meas.algorithms.SetPrimaryFlagsTask(*, schema, isSingleFrame=False, **kwargs)#
Bases:
TaskSet the
isPrimaryflag 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.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
isPrimaryflag 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.isSingleFrameis False.- patchInfo
lsst.skymap.PatchInfo Patch object; required if
self.isSingleFrameis False.
- sources
- schema