Skip to content

Commit d99fdf4

Browse files
authored
Merge pull request #367 from lsst/u/parejkoj/detection-docs
u/parejkoj/detection: add notes about background-subtraction dependency to detection task
2 parents d0e876f + a2b7195 commit d99fdf4

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

doc/lsst.meas.algorithms/tasks/lsst.meas.algorithms.SourceDetectionTask.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ SourceDetectionTask
55
###################
66

77
`SourceDetectionTask` detects positive and negative sources on an exposure and produces a `lsst.afw.table.SourceCatalog` of detected sources.
8+
This task expects the image to have been background subtracted first, for example via :lsst-task:`~lsst.meas.algorithms.subtractBackground.SubtractBackgroundTask`.
9+
Running detection on images with a non-zero-centered background may result in a single source detected on the entire image containing thousands of peaks, or other pathological outputs.
810
This task convolves the image with a Gaussian approximation to the PSF, matched to the sigma of the input exposure, because this is separable and fast.
9-
The PSF would have to be very non-Gaussian or non-circular for this approximation to have a significant impact on the signal-to-noise of the detected sources.
1011

1112
.. _lsst.meas.algorithms.SourceDetectionTask-api:
1213

python/lsst/meas/algorithms/detection.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,10 @@ def setDefaults(self):
170170
class SourceDetectionTask(pipeBase.Task):
171171
"""Detect peaks and footprints of sources in an image.
172172
173-
This task convolves the image with a Gaussian approximation to the PSF,
174-
matched to the sigma of the input exposure, because this is separable and
175-
fast. The PSF would have to be very non-Gaussian or non-circular for this
176-
approximation to have a significant impact on the signal-to-noise of the
177-
detected sources.
173+
This task expects the image to have been background subtracted first.
174+
Running detection on images with a non-zero-centered background may result
175+
in a single source detected on the entire image containing thousands of
176+
peaks, or other pathological outputs.
178177
179178
Parameters
180179
----------
@@ -189,8 +188,11 @@ class SourceDetectionTask(pipeBase.Task):
189188
190189
Notes
191190
-----
192-
This task can add fields to the schema, so any code calling this task must
193-
ensure that these columns are indeed present in the input match list.
191+
This task convolves the image with a Gaussian approximation to the PSF,
192+
matched to the sigma of the input exposure, because this is separable and
193+
fast. The PSF would have to be very non-Gaussian or non-circular for this
194+
approximation to have a significant impact on the signal-to-noise of the
195+
detected sources.
194196
"""
195197
ConfigClass = SourceDetectionConfig
196198
_DefaultName = "sourceDetection"

0 commit comments

Comments
 (0)