SourceDetectionConfig#

class lsst.meas.algorithms.SourceDetectionConfig(*args, **kw)#

Bases: Config

Configuration parameters for the SourceDetectionTask

Attributes Summary

adjustBackground

Fiddle factor to add to the background; debugging only (float, default 0.0)

background

Background re-estimation; ignored if reEstimateBackground false (ConfigurableInstance, default <class 'lsst.meas.algorithms.subtractBackground.SubtractBackgroundConfig'>)

combinedGrow

Grow all footprints at the same time? This allows disconnected footprints to merge.

doApplyFlatBackgroundRatio

Convert from a photometrically flat image to one suitable for background subtraction? Only used if reEstimateBackground is True.If True, then a backgroundToPhotometricRatio must be supplied to the task run method.

doTempLocalBackground

Enable temporary local background subtraction? (see tempLocalBackground) (bool, default True)

doTempWideBackground

Do temporary wide (large-scale) background subtraction before footprint detection? (bool, default False)

excludeMaskPlanes

Mask planes to exclude when detecting sources.

includeThresholdMultiplier

Multiplier on thresholdValue for whether a source is included in the output catalog.

isotropicGrow

Grow pixels as isotropically as possible? If False, use a Manhattan metric instead.

minPixels

detected sources with fewer than the specified number of pixels will be ignored (int, default 1)

nPeaksMaxSimple

The maximum number of peaks in a Footprint before trying to replace its peaks using the temporary local background (int, default 1)

nSigmaForKernel

Multiple of PSF RMS size to use for convolution kernel bounding box size; note that this is not a half-size.

nSigmaToGrow

Grow detections by nSigmaToGrow * [PSF RMS width]; if 0 then do not grow (float, default 2.4)

reEstimateBackground

Estimate the background again after final source detection? (bool, default True)

returnOriginalFootprints

Grow detections to set the image mask bits, but return the original (not-grown) footprints (bool, default False)

statsMask

Mask planes to ignore when calculating statistics of image (for thresholdType=stdev) (List, default ['BAD', 'SAT', 'EDGE', 'NO_DATA'])

tempLocalBackground

A local (small-scale), temporary background estimation step run between detecting above-threshold regions and detecting the peaks within them; used to avoid detecting spuerious peaks in the wings.

tempWideBackground

A wide (large-scale) background estimation and removal before footprint and peak detection.

thresholdPolarity

Specifies whether to detect positive, or negative sources, or both.

thresholdType

Specifies the meaning of thresholdValue.

thresholdValue

Threshold for detecting footprints; exact meaning and units depend on thresholdType.

Methods Summary

setDefaults()

Subclass hook for computing defaults.

Attributes Documentation

adjustBackground#

Fiddle factor to add to the background; debugging only (float, default 0.0)

background#

Background re-estimation; ignored if reEstimateBackground false (ConfigurableInstance, default <class 'lsst.meas.algorithms.subtractBackground.SubtractBackgroundConfig'>)

combinedGrow#

Grow all footprints at the same time? This allows disconnected footprints to merge. (bool, default True)

doApplyFlatBackgroundRatio#

Convert from a photometrically flat image to one suitable for background subtraction? Only used if reEstimateBackground is True.If True, then a backgroundToPhotometricRatio must be supplied to the task run method. (bool, default False)

doTempLocalBackground#

Enable temporary local background subtraction? (see tempLocalBackground) (bool, default True)

doTempWideBackground#

Do temporary wide (large-scale) background subtraction before footprint detection? (bool, default False)

excludeMaskPlanes#

Mask planes to exclude when detecting sources. (List, default [])

includeThresholdMultiplier#

Multiplier on thresholdValue for whether a source is included in the output catalog. For example, thresholdValue=5, includeThresholdMultiplier=10, thresholdType=’pixel_stdev’ results in a catalog of sources at >50 sigma with the detection mask and footprints including pixels >5 sigma. (float, default 1.0)

Valid Range = [0.0,inf)

isotropicGrow#

Grow pixels as isotropically as possible? If False, use a Manhattan metric instead. (bool, default True)

minPixels#

detected sources with fewer than the specified number of pixels will be ignored (int, default 1)

Valid Range = [0,inf)

nPeaksMaxSimple#

The maximum number of peaks in a Footprint before trying to replace its peaks using the temporary local background (int, default 1)

nSigmaForKernel#

Multiple of PSF RMS size to use for convolution kernel bounding box size; note that this is not a half-size. The size will be rounded up to the nearest odd integer (float, default 7.0)

nSigmaToGrow#

Grow detections by nSigmaToGrow * [PSF RMS width]; if 0 then do not grow (float, default 2.4)

reEstimateBackground#

Estimate the background again after final source detection? (bool, default True)

returnOriginalFootprints#

Grow detections to set the image mask bits, but return the original (not-grown) footprints (bool, default False)

statsMask#

Mask planes to ignore when calculating statistics of image (for thresholdType=stdev) (List, default ['BAD', 'SAT', 'EDGE', 'NO_DATA'])

tempLocalBackground#

A local (small-scale), temporary background estimation step run between detecting above-threshold regions and detecting the peaks within them; used to avoid detecting spuerious peaks in the wings. (ConfigurableInstance, default <class 'lsst.meas.algorithms.subtractBackground.SubtractBackgroundConfig'>)

tempWideBackground#

A wide (large-scale) background estimation and removal before footprint and peak detection. It is added back into the image after detection. The purpose is to suppress very large footprints (e.g., from large artifacts) that the deblender may choke on. (ConfigurableInstance, default <class 'lsst.meas.algorithms.subtractBackground.SubtractBackgroundConfig'>)

thresholdPolarity#

Specifies whether to detect positive, or negative sources, or both. (str, default 'positive')

Allowed values:

'positive'

detect only positive sources

'negative'

detect only negative sources

'both'

detect both positive and negative sources

thresholdType#

Specifies the meaning of thresholdValue. (str, default 'pixel_stdev')

Allowed values:

'variance'

threshold applied to image variance

'stdev'

threshold applied to image std deviation

'value'

threshold applied to image value

'pixel_stdev'

threshold applied to per-pixel std deviation

thresholdValue#

Threshold for detecting footprints; exact meaning and units depend on thresholdType. (float, default 5.0)

Valid Range = [0.0,inf)

Methods Documentation

setDefaults()#

Subclass hook for computing defaults.

Notes#

Derived Config classes that must compute defaults rather than using the Field instances’s defaults should do so here. To correctly use inherited defaults, implementations of setDefaults must call their base class’s setDefaults.