NumberDeblendedSourcesMetricTask#

class lsst.pipe.tasks.metrics.NumberDeblendedSourcesMetricTask(**kwargs)#

Bases: MetricTask

Task that computes the number of science sources that have been deblended.

This task only counts sources that existed prior to any deblending; i.e., if deblending was run more than once or with multiple iterations, only the “top-level” deblended sources are counted, and not any intermediate ones. If sky source information is present, sky sources are excluded.

Notes#

The task excludes any non-sky sources in the catalog, but it does not require that the catalog include a sky_sources column.

Methods Summary

run(sources)

Count the number of deblended science sources.

Methods Documentation

run(sources)#

Count the number of deblended science sources.

Parameters#

sourceslsst.afw.table.SourceCatalog

A science source catalog, which may be empty.

Returns#

resultlsst.pipe.base.Struct

A Struct containing the following component:

measurement

the total number of deblended science sources (lsst.verify.Measurement). If no deblending information is available in sources, this is None.

Raises#

MetricComputationError

Raised if sources is missing mandatory keys for source catalogs.