Skip to content

Commit

Permalink
Merge pull request #367 from lsst/u/parejkoj/detection-docs
Browse files Browse the repository at this point in the history
u/parejkoj/detection: add notes about background-subtraction dependency to detection task
  • Loading branch information
parejkoj authored Feb 28, 2024
2 parents d0e876f + a2b7195 commit d99fdf4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ SourceDetectionTask
###################

`SourceDetectionTask` detects positive and negative sources on an exposure and produces a `lsst.afw.table.SourceCatalog` of detected sources.
This task expects the image to have been background subtracted first, for example via :lsst-task:`~lsst.meas.algorithms.subtractBackground.SubtractBackgroundTask`.
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.
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.
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.

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

Expand Down
16 changes: 9 additions & 7 deletions python/lsst/meas/algorithms/detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,10 @@ def setDefaults(self):
class SourceDetectionTask(pipeBase.Task):
"""Detect peaks and footprints of sources in an image.
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. 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.
This task expects the image to have been background subtracted first.
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.
Parameters
----------
Expand All @@ -189,8 +188,11 @@ class SourceDetectionTask(pipeBase.Task):
Notes
-----
This task can add fields to the schema, so any code calling this task must
ensure that these columns are indeed present in the input match list.
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. 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.
"""
ConfigClass = SourceDetectionConfig
_DefaultName = "sourceDetection"
Expand Down

0 comments on commit d99fdf4

Please sign in to comment.