LSST Applications g0265f82a02+0e5473021a,g02d81e74bb+f5613e8b4f,g1470d8bcf6+190ad2ba91,g14a832a312+311607e4ab,g2079a07aa2+86d27d4dc4,g2305ad1205+a8e3196225,g295015adf3+b67ee847e5,g2bbee38e9b+0e5473021a,g337abbeb29+0e5473021a,g3ddfee87b4+a761f810f3,g487adcacf7+17c8fdbcbd,g50ff169b8f+96c6868917,g52b1c1532d+585e252eca,g591dd9f2cf+65b5bd823e,g5a732f18d5+53520f316c,g64a986408d+f5613e8b4f,g6c1bc301e9+51106c2951,g858d7b2824+f5613e8b4f,g8a8a8dda67+585e252eca,g99cad8db69+6729933424,g9ddcbc5298+9a081db1e4,ga1e77700b3+15fc3df1f7,ga8c6da7877+ef4e3a5875,gb0e22166c9+60f28cb32d,gb6a65358fc+0e5473021a,gba4ed39666+c2a2e4ac27,gbb8dafda3b+e9bba80f27,gc120e1dc64+eee469a5e5,gc28159a63d+0e5473021a,gcf0d15dbbd+a761f810f3,gdaeeff99f8+f9a426f77a,ge6526c86ff+d4c1d4bfef,ge79ae78c31+0e5473021a,gee10cc3b42+585e252eca,gf1cff7945b+f5613e8b4f,w.2024.16
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
lsst.meas.algorithms.detection.SourceDetectionConfig Class Reference
Inheritance diagram for lsst.meas.algorithms.detection.SourceDetectionConfig:
lsst.meas.algorithms.dynamicDetection.DynamicDetectionConfig

Public Member Functions

 setDefaults (self)
 

Static Public Attributes

 minPixels
 
 isotropicGrow
 
 combinedGrow
 
 nSigmaToGrow
 
 returnOriginalFootprints
 
 thresholdValue
 
 includeThresholdMultiplier
 
 thresholdType
 
 thresholdPolarity
 
 adjustBackground
 
 reEstimateBackground
 
 background
 
 tempLocalBackground
 
 doTempLocalBackground
 
 tempWideBackground
 
 doTempWideBackground
 
 nPeaksMaxSimple
 
 nSigmaForKernel
 
 statsMask
 
 excludeMaskPlanes
 

Detailed Description

Configuration parameters for the SourceDetectionTask

Definition at line 43 of file detection.py.

Member Function Documentation

◆ setDefaults()

lsst.meas.algorithms.detection.SourceDetectionConfig.setDefaults ( self)

Reimplemented in lsst.meas.algorithms.dynamicDetection.DynamicDetectionConfig.

Definition at line 155 of file detection.py.

155 def setDefaults(self):
156 self.tempLocalBackground.binSize = 64
157 self.tempLocalBackground.algorithm = "AKIMA_SPLINE"
158 self.tempLocalBackground.useApprox = False
159 # Background subtraction to remove a large-scale background (e.g., scattered light); restored later.
160 # Want to keep it from exceeding the deblender size limit of 1 Mpix, so half that is reasonable.
161 self.tempWideBackground.binSize = 512
162 self.tempWideBackground.algorithm = "AKIMA_SPLINE"
163 self.tempWideBackground.useApprox = False
164 # Ensure we can remove even bright scattered light that is DETECTED
165 for maskPlane in ("DETECTED", "DETECTED_NEGATIVE"):
166 if maskPlane in self.tempWideBackground.ignoredPixelMask:
167 self.tempWideBackground.ignoredPixelMask.remove(maskPlane)
168
169

Member Data Documentation

◆ adjustBackground

lsst.meas.algorithms.detection.SourceDetectionConfig.adjustBackground
static
Initial value:
= pexConfig.Field(
dtype=float,
doc="Fiddle factor to add to the background; debugging only",
default=0.0,
)

Definition at line 96 of file detection.py.

◆ background

lsst.meas.algorithms.detection.SourceDetectionConfig.background
static
Initial value:
= pexConfig.ConfigurableField(
doc="Background re-estimation; ignored if reEstimateBackground false",
target=SubtractBackgroundTask,
)

Definition at line 106 of file detection.py.

◆ combinedGrow

lsst.meas.algorithms.detection.SourceDetectionConfig.combinedGrow
static
Initial value:
= pexConfig.Field(
doc="Grow all footprints at the same time? This allows disconnected footprints to merge.",
dtype=bool, default=True,
)

Definition at line 54 of file detection.py.

◆ doTempLocalBackground

lsst.meas.algorithms.detection.SourceDetectionConfig.doTempLocalBackground
static
Initial value:
= pexConfig.Field(
dtype=bool,
doc="Enable temporary local background subtraction? (see tempLocalBackground)",
default=True,
)

Definition at line 116 of file detection.py.

◆ doTempWideBackground

lsst.meas.algorithms.detection.SourceDetectionConfig.doTempWideBackground
static
Initial value:
= pexConfig.Field(
dtype=bool,
doc="Do temporary wide (large-scale) background subtraction before footprint detection?",
default=False,
)

Definition at line 127 of file detection.py.

◆ excludeMaskPlanes

lsst.meas.algorithms.detection.SourceDetectionConfig.excludeMaskPlanes
static
Initial value:
dtype=str,
default=[],
doc="Mask planes to exclude when detecting sources."
)

Definition at line 149 of file detection.py.

◆ includeThresholdMultiplier

lsst.meas.algorithms.detection.SourceDetectionConfig.includeThresholdMultiplier
static
Initial value:
= pexConfig.RangeField(
doc="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.",
dtype=float, default=1.0, min=0.0,
)

Definition at line 70 of file detection.py.

◆ isotropicGrow

lsst.meas.algorithms.detection.SourceDetectionConfig.isotropicGrow
static
Initial value:
= pexConfig.Field(
doc="Grow pixels as isotropically as possible? If False, use a Manhattan metric instead.",
dtype=bool, default=True,
)

Definition at line 50 of file detection.py.

◆ minPixels

lsst.meas.algorithms.detection.SourceDetectionConfig.minPixels
static
Initial value:
= pexConfig.RangeField(
doc="detected sources with fewer than the specified number of pixels will be ignored",
dtype=int, optional=False, default=1, min=0,
)

Definition at line 46 of file detection.py.

◆ nPeaksMaxSimple

lsst.meas.algorithms.detection.SourceDetectionConfig.nPeaksMaxSimple
static
Initial value:
= pexConfig.Field(
dtype=int,
doc=("The maximum number of peaks in a Footprint before trying to "
"replace its peaks using the temporary local background"),
default=1,
)

Definition at line 132 of file detection.py.

◆ nSigmaForKernel

lsst.meas.algorithms.detection.SourceDetectionConfig.nSigmaForKernel
static
Initial value:
= pexConfig.Field(
dtype=float,
doc=("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"),
default=7.0,
)

Definition at line 138 of file detection.py.

◆ nSigmaToGrow

lsst.meas.algorithms.detection.SourceDetectionConfig.nSigmaToGrow
static
Initial value:
= pexConfig.Field(
doc="Grow detections by nSigmaToGrow * [PSF RMS width]; if 0 then do not grow",
dtype=float, default=2.4, # 2.4 pixels/sigma is roughly one pixel/FWHM
)

Definition at line 58 of file detection.py.

◆ reEstimateBackground

lsst.meas.algorithms.detection.SourceDetectionConfig.reEstimateBackground
static
Initial value:
= pexConfig.Field(
dtype=bool,
doc="Estimate the background again after final source detection?",
default=True, optional=False,
)

Definition at line 101 of file detection.py.

◆ returnOriginalFootprints

lsst.meas.algorithms.detection.SourceDetectionConfig.returnOriginalFootprints
static
Initial value:
= pexConfig.Field(
doc="Grow detections to set the image mask bits, but return the original (not-grown) footprints",
dtype=bool, optional=False, default=False,
)

Definition at line 62 of file detection.py.

◆ statsMask

lsst.meas.algorithms.detection.SourceDetectionConfig.statsMask
static
Initial value:
= pexConfig.ListField(
dtype=str,
doc="Mask planes to ignore when calculating statistics of image (for thresholdType=stdev)",
default=['BAD', 'SAT', 'EDGE', 'NO_DATA'],
)

Definition at line 144 of file detection.py.

◆ tempLocalBackground

lsst.meas.algorithms.detection.SourceDetectionConfig.tempLocalBackground
static
Initial value:
= pexConfig.ConfigurableField(
doc=("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."),
target=SubtractBackgroundTask,
)

Definition at line 110 of file detection.py.

◆ tempWideBackground

lsst.meas.algorithms.detection.SourceDetectionConfig.tempWideBackground
static
Initial value:
= pexConfig.ConfigurableField(
doc=("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."),
target=SubtractBackgroundTask,
)

Definition at line 121 of file detection.py.

◆ thresholdPolarity

lsst.meas.algorithms.detection.SourceDetectionConfig.thresholdPolarity
static
Initial value:
= pexConfig.ChoiceField(
doc="Specifies whether to detect positive, or negative sources, or both.",
dtype=str, optional=False, default="positive",
allowed={
"positive": "detect only positive sources",
"negative": "detect only negative sources",
"both": "detect both positive and negative sources",
},
)

Definition at line 87 of file detection.py.

◆ thresholdType

lsst.meas.algorithms.detection.SourceDetectionConfig.thresholdType
static
Initial value:
= pexConfig.ChoiceField(
doc="Specifies the meaning of thresholdValue.",
dtype=str, optional=False, default="pixel_stdev",
allowed={
"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",
},
)

Definition at line 77 of file detection.py.

◆ thresholdValue

lsst.meas.algorithms.detection.SourceDetectionConfig.thresholdValue
static
Initial value:
= pexConfig.RangeField(
doc="Threshold for detecting footprints; exact meaning and units depend on thresholdType.",
dtype=float, optional=False, default=5.0, min=0.0,
)

Definition at line 66 of file detection.py.


The documentation for this class was generated from the following file: