DonutSourceSelectorTask#

class lsst.ts.wep.task.DonutSourceSelectorTask(**kwargs)#

Bases: Task

Donut Source Selector that uses a nearest neighbors radius query to find all donuts within the pixel radius set in the config. Then it goes from the brightest sources down to the faintest picking donuts that are at least isolatedMagDiff brighter than any sources with centers within 2 times the unblendedSeparation until reaching numSources kept or going through the whole list.

Parameters:

kwargs (Any)

Methods Summary

run(sourceCat, detector, filterName)

Select sources and return them.

selectSources(sourceCat, detector, filterName)

Run the source selection algorithm and return the indices to keep in the original catalog.

Methods Documentation

run(sourceCat, detector, filterName)#

Select sources and return them.

Parameters:
  • sourceCat (lsst.afw.table.SourceCatalog or pandas.DataFrame)

  • astropy.table.Table (or) – Catalog of sources to select from.

  • detector (lsst.afw.cameraGeom.Detector) – Detector object from the camera.

  • filterName (str) – Name of camera filter.

Returns:

struct

The struct contains the following data:
  • sourceCat : lsst.afw.table.SourceCatalog

or pandas.DataFrame or astropy.table.Table

The catalog of sources that were selected. (may not be memory-contiguous)

  • selectednumpy.ndarray of bool

    Boolean array of sources that were selected, same length as sourceCat.

Return type:

lsst.pipe.base.Struct

Raises:

RuntimeError – Raised if sourceCat is not contiguous.

selectSources(sourceCat, detector, filterName)#

Run the source selection algorithm and return the indices to keep in the original catalog.

Parameters:
  • sourceCat (lsst.afw.table.SourceCatalog or pandas.DataFrame)

  • astropy.table.Table (or) – Catalog of sources to select from.

  • detector (lsst.afw.cameraGeom.Detector) – Detector object from the camera.

  • filterName (str) – Name of camera filter.

Returns:

struct

The struct contains the following data:
  • selectednumpy.ndarray of bool

    Boolean array of sources that were selected, same length as sourceCat.

Return type:

lsst.pipe.base.Struct

Raises:

ValueError – sourceLimit in config for task must be -1 or a positive integer.