lsst.meas.algorithms g1581cd22ba+5952b5fc83
Loading...
Searching...
No Matches
lsst.meas.algorithms.dynamicDetection.DynamicDetectionTask Class Reference
Inheritance diagram for lsst.meas.algorithms.dynamicDetection.DynamicDetectionTask:
lsst.meas.algorithms.detection.SourceDetectionTask

Public Member Functions

 __init__ (self, *args, **kwargs)
 
 calculateThreshold (self, exposure, seed, sigma=None, minFractionSourcesFactor=1.0, isBgTweak=False, nPixMaskErode=None, maxMaskErodeIter=10)
 
 detectFootprints (self, exposure, doSmooth=True, sigma=None, clearMask=True, expId=None, background=None, backgroundToPhotometricRatio=None)
 
 tweakBackground (self, exposure, bgLevel, bgList=None)
 
 run (self, table, exposure, doSmooth=True, sigma=None, clearMask=True, expId=None, background=None, backgroundToPhotometricRatio=None)
 
 display (self, exposure, results, convolvedImage=None)
 
 applyTempLocalBackground (self, exposure, middle, results)
 
 clearMask (self, mask)
 
 calculateKernelSize (self, sigma)
 
 getPsf (self, exposure, sigma=None)
 
 convolveImage (self, maskedImage, psf, doSmooth=True)
 
 applyThreshold (self, middle, bbox, factor=1.0, factorNeg=None)
 
 finalizeFootprints (self, mask, results, sigma, factor=1.0, factorNeg=None, growOverride=None)
 
 reEstimateBackground (self, maskedImage, backgrounds, backgroundToPhotometricRatio=None)
 
 clearUnwantedResults (self, mask, results)
 
 removeBadPixels (self, middle)
 
 setPeakSignificance (self, exposure, footprints, threshold, negative=False)
 
 makeThreshold (self, image, thresholdParity, factor=1.0)
 
 updatePeaks (self, fpSet, image, threshold)
 
 tempWideBackgroundContext (self, exposure)
 

Static Public Member Functions

 setEdgeBits (maskedImage, goodBBox, edgeBitmask)
 

Public Attributes

 skySchema = SourceTable.makeMinimalSchema()
 
 skyMeasurement
 
 negativeFlagKey
 

Static Public Attributes

 ConfigClass = SourceDetectionConfig
 

Protected Member Functions

 _computeBrightDetectionMask (self, maskedImage, convolveResults)
 

Static Protected Attributes

str _DefaultName = "sourceDetection"
 

Detailed Description

Detection of sources on an image with a dynamic threshold

We first detect sources using a lower threshold than normal (see config
parameter ``prelimThresholdFactor``) in order to identify good sky regions
(configurable ``skyObjects``). Then we perform forced PSF photometry on
those sky regions. Using those PSF flux measurements and estimated errors,
we set the threshold so that the stdev of the measurements matches the
median estimated error.

Besides the usual initialisation of configurables, we also set up
the forced measurement which is deliberately not represented in
this Task's configuration parameters because we're using it as
part of the algorithm and we don't want to allow it to be modified.

Definition at line 196 of file dynamicDetection.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.meas.algorithms.dynamicDetection.DynamicDetectionTask.__init__ ( self,
* args,
** kwargs )

Definition at line 214 of file dynamicDetection.py.

Member Function Documentation

◆ _computeBrightDetectionMask()

lsst.meas.algorithms.dynamicDetection.DynamicDetectionTask._computeBrightDetectionMask ( self,
maskedImage,
convolveResults )
protected
Perform an initial bright source detection pass.

Perform an initial bright object detection pass using a high detection
threshold. The footprints in this pass are grown significantly more
than is typical to account for wings around bright sources. The
negative polarity detections in this pass help in masking severely
over-subtracted regions.

A maximum fraction of masked pixel from this pass is ensured via
the config ``brightMaskFractionMax``. If the masked pixel fraction is
above this value, the detection thresholds here are increased by
``bisectFactor`` in a while loop until the detected masked fraction
falls below this value.

Parameters
----------
maskedImage : `lsst.afw.image.MaskedImage`
    Masked image on which to run the detection.
convolveResults :  `lsst.pipe.base.Struct`
    The results of the self.convolveImage function with attributes:

    ``middle``
        Convolved image, without the edges
       (`lsst.afw.image.MaskedImage`).
    ``sigma``
        Gaussian sigma used for the convolution (`float`).

Returns
-------
brightDetectedMask : `numpy.ndarray`
    Boolean array representing the union of the bright detection pass
    DETECTED and DETECTED_NEGATIVE masks.

Definition at line 661 of file dynamicDetection.py.

◆ applyTempLocalBackground()

lsst.meas.algorithms.detection.SourceDetectionTask.applyTempLocalBackground ( self,
exposure,
middle,
results )
inherited
Apply a temporary local background subtraction

This temporary local background serves to suppress noise fluctuations
in the wings of bright objects.

Peaks in the footprints will be updated.

Parameters
----------
exposure : `lsst.afw.image.Exposure`
    Exposure for which to fit local background.
middle : `lsst.afw.image.MaskedImage`
    Convolved image on which detection will be performed
    (typically smaller than ``exposure`` because the
    half-kernel has been removed around the edges).
results : `lsst.pipe.base.Struct`
    Results of the 'detectFootprints' method, containing positive and
    negative footprints (which contain the peak positions that we will
    plot). This is a `Struct` with ``positive`` and ``negative``
    elements that are of type `lsst.afw.detection.FootprintSet`.

Definition at line 399 of file detection.py.

◆ applyThreshold()

lsst.meas.algorithms.detection.SourceDetectionTask.applyThreshold ( self,
middle,
bbox,
factor = 1.0,
factorNeg = None )
inherited
Apply thresholds to the convolved image

Identifies `~lsst.afw.detection.Footprint`\s, both positive and negative.
The threshold can be modified by the provided multiplication
``factor``.

Parameters
----------
middle : `lsst.afw.image.MaskedImage`
    Convolved image to threshold.
bbox : `lsst.geom.Box2I`
    Bounding box of unconvolved image.
factor : `float`
    Multiplier for the configured threshold.
factorNeg : `float` or `None`
    Multiplier for the configured threshold for negative detection polarity.
    If `None`, will be set equal to ``factor`` (i.e. equal to the factor used
    for positive detection polarity).

Returns
-------
results : `lsst.pipe.base.Struct`
    The `~lsst.pipe.base.Struct` contains:

    ``positive``
        Positive detection footprints, if configured.
        (`lsst.afw.detection.FootprintSet` or `None`)
    ``negative``
        Negative detection footprints, if configured.
        (`lsst.afw.detection.FootprintSet` or `None`)
    ``factor``
        Multiplier for the configured threshold.
        (`float`)
    ``factorNeg``
        Multiplier for the configured threshold for negative detection polarity.
        (`float`)

Definition at line 566 of file detection.py.

◆ calculateKernelSize()

lsst.meas.algorithms.detection.SourceDetectionTask.calculateKernelSize ( self,
sigma )
inherited
Calculate the size of the smoothing kernel.

Uses the ``nSigmaForKernel`` configuration parameter. Note
that that is the full width of the kernel bounding box
(so a value of 7 means 3.5 sigma on either side of center).
The value will be rounded up to the nearest odd integer.

Parameters
----------
sigma : `float`
    Gaussian sigma of smoothing kernel.

Returns
-------
size : `int`
    Size of the smoothing kernel.

Definition at line 448 of file detection.py.

◆ calculateThreshold()

lsst.meas.algorithms.dynamicDetection.DynamicDetectionTask.calculateThreshold ( self,
exposure,
seed,
sigma = None,
minFractionSourcesFactor = 1.0,
isBgTweak = False,
nPixMaskErode = None,
maxMaskErodeIter = 10 )
Calculate new threshold

This is the main functional addition to the vanilla
`SourceDetectionTask`.

We identify sky objects and perform forced PSF photometry on
them. Using those PSF flux measurements and estimated errors,
we set the threshold so that the stdev of the measurements
matches the median estimated error.

Parameters
----------
exposure : `lsst.afw.image.Exposure`
    Exposure on which we're detecting sources.
seed : `int`
    RNG seed to use for finding sky objects.
sigma : `float`, optional
    Gaussian sigma of smoothing kernel; if not provided,
    will be deduced from the exposure's PSF.
minFractionSourcesFactor : `float`
    Change the fraction of required sky sources from that set in
    ``self.config.minFractionSources`` by this factor.  NOTE: this
    is intended for use in the background tweak pass (the detection
    threshold is much lower there, so many more pixels end up marked
    as DETECTED or DETECTED_NEGATIVE, leaving less room for sky
    object placement).
isBgTweak : `bool`
   Set to ``True`` for the background tweak pass (for more helpful
   log messages).
nPixMaskErode : `int`, optional
    Number of pixels by which to erode the detection masks on each
    iteration of best-effort sky object placement.
maxMaskErodeIter : `int`, optional
    Maximum number of iterations for the detection mask erosion.

Returns
-------
result : `lsst.pipe.base.Struct`
    Result struct with components:

    ``multiplicative``
        Multiplicative factor to be applied to the
        configured detection threshold (`float`).
    ``additive``
        Additive factor to be applied to the background
        level (`float`).

Raises
------
InsufficientSourcesError
    Raised if the number of good sky sources found is less than the
    minimum fraction
    (``self.config.minFractionSources``*``minFractionSourcesFactor``)
    of the number requested (``self.skyObjects.config.nSources``).

Definition at line 230 of file dynamicDetection.py.

◆ clearMask()

lsst.meas.algorithms.detection.SourceDetectionTask.clearMask ( self,
mask )
inherited
Clear the DETECTED and DETECTED_NEGATIVE mask planes.

Removes any previous detection mask in preparation for a new
detection pass.

Parameters
----------
mask : `lsst.afw.image.Mask`
    Mask to be cleared.

Definition at line 435 of file detection.py.

◆ clearUnwantedResults()

lsst.meas.algorithms.detection.SourceDetectionTask.clearUnwantedResults ( self,
mask,
results )
inherited
Clear unwanted results from the Struct of results

If we specifically want only positive or only negative detections,
drop the ones we don't want, and its associated mask plane.

Parameters
----------
mask : `lsst.afw.image.Mask`
    Mask image.
results : `lsst.pipe.base.Struct`
    Detection results, with ``positive`` and ``negative`` elements;
    modified.

Definition at line 744 of file detection.py.

◆ convolveImage()

lsst.meas.algorithms.detection.SourceDetectionTask.convolveImage ( self,
maskedImage,
psf,
doSmooth = True )
inherited
Convolve the image with the PSF.

We convolve the image with a Gaussian approximation to the PSF,
because this is separable and therefore fast. It's technically a
correlation rather than a convolution, but since we use a symmetric
Gaussian there's no difference.

The convolution can be disabled with ``doSmooth=False``. If we do
convolve, we mask the edges as ``EDGE`` and return the convolved image
with the edges removed. This is because we can't convolve the edges
because the kernel would extend off the image.

Parameters
----------
maskedImage : `lsst.afw.image.MaskedImage`
    Image to convolve.
psf : `lsst.afw.detection.Psf`
    PSF to convolve with (actually with a Gaussian approximation
    to it).
doSmooth : `bool`
    Actually do the convolution? Set to False when running on
    e.g. a pre-convolved image, or a mask plane.

Returns
-------
results : `lsst.pipe.base.Struct`
    The `~lsst.pipe.base.Struct` contains:

    ``middle``
        Convolved image, without the edges. (`lsst.afw.image.MaskedImage`)
    ``sigma``
        Gaussian sigma used for the convolution. (`float`)

Definition at line 504 of file detection.py.

◆ detectFootprints()

lsst.meas.algorithms.dynamicDetection.DynamicDetectionTask.detectFootprints ( self,
exposure,
doSmooth = True,
sigma = None,
clearMask = True,
expId = None,
background = None,
backgroundToPhotometricRatio = None )
Detect footprints with a dynamic threshold

This varies from the vanilla ``detectFootprints`` method because we
do detection three times: first with a high threshold to detect
"bright" (both positive and negative, the latter to identify very
over-subtracted regions) sources for which we grow the DETECTED and
DETECTED_NEGATIVE masks significantly to account for wings.  Second,
with a low threshold to mask all non-empty regions of the image. These
two masks are combined and used to identify regions of sky
uncontaminated by objects.  A final round of detection is then done
with the new calculated threshold.

Parameters
----------
exposure : `lsst.afw.image.Exposure`
    Exposure to process; DETECTED{,_NEGATIVE} mask plane will be
    set in-place.
doSmooth : `bool`, optional
    If True, smooth the image before detection using a Gaussian
    of width ``sigma``.
sigma : `float`, optional
    Gaussian Sigma of PSF (pixels); used for smoothing and to grow
    detections; if `None` then measure the sigma of the PSF of the
    ``exposure``.
clearMask : `bool`, optional
    Clear both DETECTED and DETECTED_NEGATIVE planes before running
    detection.
expId : `int`, optional
    Exposure identifier, used as a seed for the random number
    generator. If absent, the seed will be the sum of the image.
background : `lsst.afw.math.BackgroundList`, optional
    Background that was already subtracted from the exposure; will be
    modified in-place if ``reEstimateBackground=True``.
backgroundToPhotometricRatio : `lsst.afw.image.Image`, optional
    Unused; if set will Raise.

Returns
-------
results : `lsst.pipe.base.Struct`
    The results `~lsst.pipe.base.Struct` contains:

    ``positive``
        Positive polarity footprints.
        (`lsst.afw.detection.FootprintSet` or `None`)
    ``negative``
        Negative polarity footprints.
        (`lsst.afw.detection.FootprintSet` or `None`)
    ``numPos``
        Number of footprints in positive or 0 if detection polarity was
        negative. (`int`)
    ``numNeg``
        Number of footprints in negative or 0 if detection polarity was
        positive. (`int`)
    ``background``
        Re-estimated background.  `None` or the input ``background``
        if ``reEstimateBackground==False``.
        (`lsst.afw.math.BackgroundList`)
    ``factor``
        Multiplication factor applied to the configured detection
        threshold. (`float`)
    ``prelim``
        Results from preliminary detection pass.
        (`lsst.pipe.base.Struct`)

Reimplemented from lsst.meas.algorithms.detection.SourceDetectionTask.

Definition at line 393 of file dynamicDetection.py.

◆ display()

lsst.meas.algorithms.detection.SourceDetectionTask.display ( self,
exposure,
results,
convolvedImage = None )
inherited
Display detections if so configured

Displays the ``exposure`` in frame 0, overlays the detection peaks.

Requires that ``lsstDebug`` has been set up correctly, so that
``lsstDebug.Info("lsst.meas.algorithms.detection")`` evaluates `True`.

If the ``convolvedImage`` is non-`None` and
``lsstDebug.Info("lsst.meas.algorithms.detection") > 1``, the
``convolvedImage`` will be displayed in frame 1.

Parameters
----------
exposure : `lsst.afw.image.Exposure`
    Exposure to display, on which will be plotted the detections.
results : `lsst.pipe.base.Struct`
    Results of the 'detectFootprints' method, containing positive and
    negative footprints (which contain the peak positions that we will
    plot). This is a `Struct` with ``positive`` and ``negative``
    elements that are of type `lsst.afw.detection.FootprintSet`.
convolvedImage : `lsst.afw.image.Image`, optional
    Convolved image used for thresholding.

Definition at line 342 of file detection.py.

◆ finalizeFootprints()

lsst.meas.algorithms.detection.SourceDetectionTask.finalizeFootprints ( self,
mask,
results,
sigma,
factor = 1.0,
factorNeg = None,
growOverride = None )
inherited
Finalize the detected footprints.

Grow the footprints, set the ``DETECTED`` and ``DETECTED_NEGATIVE``
mask planes, and log the results.

``numPos`` (number of positive footprints), ``numPosPeaks`` (number
of positive peaks), ``numNeg`` (number of negative footprints),
``numNegPeaks`` (number of negative peaks) entries are added to the
``results`` struct.

Parameters
----------
mask : `lsst.afw.image.Mask`
    Mask image on which to flag detected pixels.
results : `lsst.pipe.base.Struct`
    Struct of detection results, including ``positive`` and
    ``negative`` entries; modified.
sigma : `float`
    Gaussian sigma of PSF.
factor : `float`
    Multiplier for the configured threshold. Note that this is only
    used here for logging purposes.
factorNeg : `float` or `None`
    Multiplier used for the negative detection polarity threshold.
    If `None`, a factor equal to ``factor`` (i.e. equal to the one used
    for positive detection polarity) is assumed. Note that this is only
    used here for logging purposes.

Definition at line 632 of file detection.py.

◆ getPsf()

lsst.meas.algorithms.detection.SourceDetectionTask.getPsf ( self,
exposure,
sigma = None )
inherited
Create a single Gaussian PSF for an exposure.

If ``sigma`` is provided, we make a `~lsst.afw.detection.GaussianPsf`
with that, otherwise use the sigma from the psf of the ``exposure`` to
make the `~lsst.afw.detection.GaussianPsf`.

Parameters
----------
exposure : `lsst.afw.image.Exposure`
    Exposure from which to retrieve the PSF.
sigma : `float`, optional
    Gaussian sigma to use if provided.

Returns
-------
psf : `lsst.afw.detection.GaussianPsf`
    PSF to use for detection.

Raises
------
RuntimeError
    Raised if ``sigma`` is not provided and ``exposure`` does not
    contain a ``Psf`` object.

Definition at line 468 of file detection.py.

◆ makeThreshold()

lsst.meas.algorithms.detection.SourceDetectionTask.makeThreshold ( self,
image,
thresholdParity,
factor = 1.0 )
inherited
Make an afw.detection.Threshold object corresponding to the task's
configuration and the statistics of the given image.

Parameters
----------
image : `afw.image.MaskedImage`
    Image to measure noise statistics from if needed.
thresholdParity: `str`
    One of "positive" or "negative", to set the kind of fluctuations
    the Threshold will detect.
factor : `float`
    Factor by which to multiply the configured detection threshold.
    This is useful for tweaking the detection threshold slightly.

Returns
-------
threshold : `lsst.afw.detection.Threshold`
    Detection threshold.

Definition at line 932 of file detection.py.

◆ reEstimateBackground()

lsst.meas.algorithms.detection.SourceDetectionTask.reEstimateBackground ( self,
maskedImage,
backgrounds,
backgroundToPhotometricRatio = None )
inherited
Estimate the background after detection

Parameters
----------
maskedImage : `lsst.afw.image.MaskedImage`
    Image on which to estimate the background.
backgrounds : `lsst.afw.math.BackgroundList`
    List of backgrounds; modified.
backgroundToPhotometricRatio : `lsst.afw.image.Image`, optional
    Image to multiply a photometrically-flattened image by to obtain a
    background-flattened image.
    Only used if ``config.doApplyFlatBackgroundRatio`` is ``True``.

Returns
-------
bg : `lsst.afw.math.backgroundMI`
    Empirical background model.

Definition at line 706 of file detection.py.

◆ removeBadPixels()

lsst.meas.algorithms.detection.SourceDetectionTask.removeBadPixels ( self,
middle )
inherited
Set the significance of flagged pixels to zero.

Parameters
----------
middle : `lsst.afw.image.Exposure`
    Score or maximum likelihood difference image.
    The image plane will be modified in place.

Definition at line 864 of file detection.py.

◆ run()

lsst.meas.algorithms.detection.SourceDetectionTask.run ( self,
table,
exposure,
doSmooth = True,
sigma = None,
clearMask = True,
expId = None,
background = None,
backgroundToPhotometricRatio = None )
inherited
Detect sources and return catalog(s) of detections.

    Parameters
    ----------
    table : `lsst.afw.table.SourceTable`
        Table object that will be used to create the SourceCatalog.
    exposure : `lsst.afw.image.Exposure`
        Exposure to process; DETECTED mask plane will be set in-place.
    doSmooth : `bool`, optional
        If True, smooth the image before detection using a Gaussian of width
        ``sigma``, or the measured PSF width. Set to False when running on
        e.g. a pre-convolved image, or a mask plane.
    sigma : `float`, optional
        Sigma of PSF (pixels); used for smoothing and to grow detections;
        if None then measure the sigma of the PSF of the exposure
    clearMask : `bool`, optional
        Clear DETECTED{,_NEGATIVE} planes before running detection.
    expId : `int`, optional
        Exposure identifier; unused by this implementation, but used for
        RNG seed by subclasses.
    background : `lsst.afw.math.BackgroundList`, optional
        Background that was already subtracted from the exposure; will be
        modified in-place if ``reEstimateBackground=True``.
    backgroundToPhotometricRatio : `lsst.afw.image.Image`, optional
        Image to convert photometric-flattened image to
        background-flattened image if ``reEstimateBackground=True`` and
        exposure has been photometric-flattened.

    Returns
    -------
    result : `lsst.pipe.base.Struct`
        The `~lsst.pipe.base.Struct` contains:

        ``sources``
            Detected sources on the exposure.
            (`lsst.afw.table.SourceCatalog`)
        ``positive``
            Positive polarity footprints.
            (`lsst.afw.detection.FootprintSet` or `None`)
        ``negative``
            Negative polarity footprints.
            (`lsst.afw.detection.FootprintSet` or `None`)
        ``numPos``
            Number of footprints in positive or 0 if detection polarity was
            negative. (`int`)
        ``numNeg``
            Number of footprints in negative or 0 if detection polarity was
            positive. (`int`)
        ``background``
            Re-estimated background. `None` if
            ``reEstimateBackground==False``.
            (`lsst.afw.math.BackgroundList`)
        ``factor``
            Multiplication factor applied to the configured detection
            threshold. (`float`)

    Raises
    ------
    ValueError
        Raised if flags.negative is needed, but isn't in table's schema.
    lsst.pipe.base.TaskError
        Raised if sigma=None, doSmooth=True and the exposure has no PSF.

    Notes
    -----
    If you want to avoid dealing with Sources and Tables, you can use
    `detectFootprints()` to just get the
    `~lsst.afw.detection.FootprintSet`\s.

Definition at line 254 of file detection.py.

◆ setEdgeBits()

lsst.meas.algorithms.detection.SourceDetectionTask.setEdgeBits ( maskedImage,
goodBBox,
edgeBitmask )
staticinherited
Set the edgeBitmask bits for all of maskedImage outside goodBBox

Parameters
----------
maskedImage : `lsst.afw.image.MaskedImage`
    Image on which to set edge bits in the mask.
goodBBox : `lsst.geom.Box2I`
    Bounding box of good pixels, in ``LOCAL`` coordinates.
edgeBitmask : `lsst.afw.image.MaskPixel`
    Bit mask to OR with the existing mask bits in the region
    outside ``goodBBox``.

Definition at line 1011 of file detection.py.

◆ setPeakSignificance()

lsst.meas.algorithms.detection.SourceDetectionTask.setPeakSignificance ( self,
exposure,
footprints,
threshold,
negative = False )
inherited
Set the significance of each detected peak to the pixel value divided
by the appropriate standard-deviation for ``config.thresholdType``.

Only sets significance for "stdev" and "pixel_stdev" thresholdTypes;
we leave it undefined for "value" and "variance" as it does not have a
well-defined meaning in those cases.

Parameters
----------
exposure : `lsst.afw.image.Exposure`
    Exposure that footprints were detected on, likely the convolved,
    local background-subtracted image.
footprints : `lsst.afw.detection.FootprintSet`
    Footprints detected on the image.
threshold : `lsst.afw.detection.Threshold`
    Threshold used to find footprints.
negative : `bool`, optional
    Are we calculating for negative sources?

Definition at line 877 of file detection.py.

◆ tempWideBackgroundContext()

lsst.meas.algorithms.detection.SourceDetectionTask.tempWideBackgroundContext ( self,
exposure )
inherited
Context manager for removing wide (large-scale) background

Removing a wide (large-scale) background helps to suppress the
detection of large footprints that may overwhelm the deblender.
It does, however, set a limit on the maximum scale of objects.

The background that we remove will be restored upon exit from
the context manager.

Parameters
----------
exposure : `lsst.afw.image.Exposure`
    Exposure on which to remove large-scale background.

Returns
-------
context : context manager
    Context manager that will ensure the temporary wide background
    is restored.

Definition at line 1041 of file detection.py.

◆ tweakBackground()

lsst.meas.algorithms.dynamicDetection.DynamicDetectionTask.tweakBackground ( self,
exposure,
bgLevel,
bgList = None )
Modify the background by a constant value

Parameters
----------
exposure : `lsst.afw.image.Exposure`
    Exposure for which to tweak background.
bgLevel : `float`
    Background level to remove
bgList : `lsst.afw.math.BackgroundList`, optional
    List of backgrounds to append to.

Returns
-------
bg : `lsst.afw.math.BackgroundMI`
    Constant background model.

Definition at line 632 of file dynamicDetection.py.

◆ updatePeaks()

lsst.meas.algorithms.detection.SourceDetectionTask.updatePeaks ( self,
fpSet,
image,
threshold )
inherited
Update the Peaks in a FootprintSet by detecting new Footprints and
Peaks in an image and using the new Peaks instead of the old ones.

Parameters
----------
fpSet : `afw.detection.FootprintSet`
    Set of Footprints whose Peaks should be updated.
image : `afw.image.MaskedImage`
    Image to detect new Footprints and Peak in.
threshold : `afw.detection.Threshold`
    Threshold object for detection.

Input Footprints with fewer Peaks than self.config.nPeaksMaxSimple
are not modified, and if no new Peaks are detected in an input
Footprint, the brightest original Peak in that Footprint is kept.

Definition at line 968 of file detection.py.

Member Data Documentation

◆ _DefaultName

str lsst.meas.algorithms.detection.SourceDetectionTask._DefaultName = "sourceDetection"
staticprotectedinherited

Definition at line 232 of file detection.py.

◆ ConfigClass

lsst.meas.algorithms.detection.SourceDetectionTask.ConfigClass = SourceDetectionConfig
staticinherited

Definition at line 231 of file detection.py.

◆ negativeFlagKey

lsst.meas.algorithms.detection.SourceDetectionTask.negativeFlagKey
inherited
Initial value:
= schema.addField(
"is_negative", type="Flag",
doc="Set if source peak was detected as negative."
)

Definition at line 237 of file detection.py.

◆ skyMeasurement

lsst.meas.algorithms.dynamicDetection.DynamicDetectionTask.skyMeasurement
Initial value:
= ForcedMeasurementTask(config=config, name="skyMeasurement", parentTask=self,
refSchema=self.skySchema)

Definition at line 227 of file dynamicDetection.py.

◆ skySchema

lsst.meas.algorithms.dynamicDetection.DynamicDetectionTask.skySchema = SourceTable.makeMinimalSchema()

Definition at line 226 of file dynamicDetection.py.


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