DonutSourceSelectorTask#
- class lsst.ts.wep.task.DonutSourceSelectorTask(**kwargs)#
Bases:
TaskDonut 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.SourceCatalogorpandas.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.DataFrameorastropy.table.Table The catalog of sources that were selected. (may not be memory-contiguous)
- selected
numpy.ndarrayofbool Boolean array of sources that were selected, same length as sourceCat.
- selected
- Return type:
lsst.pipe.base.Struct- Raises:
RuntimeError – Raised if
sourceCatis 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.SourceCatalogorpandas.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:
- selected
numpy.ndarrayofbool Boolean array of sources that were selected, same length as sourceCat.
- selected
- Return type:
lsst.pipe.base.Struct- Raises:
ValueError – sourceLimit in config for task must be -1 or a positive integer.