SubtractBackgroundConfig#

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

Bases: Config

Config for SubtractBackgroundTask

Many of these fields match fields in lsst.afw.math.BackgroundControl, the control class for lsst.afw.math.makeBackground

Attributes Summary

algorithm

how to interpolate the background values.

approxOrderX

Approximation order in X for background Chebyshev (valid only with useApprox=True) (int, default 6)

approxOrderY

Approximation order in Y for background Chebyshev (valid only with useApprox=True) (int, default -1)

binSize

how large a region of the sky should be used for each background point (int, default 128)

binSizeX

Sky region size to be used for each background point in X direction.

binSizeY

Sky region size to be used for each background point in Y direction.

doApplyFlatBackgroundRatio

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

doFilterSuperPixels

Remove outliers from the binned image.

ignoredPixelMask

Names of mask planes to ignore while estimating the background (List, default ['BAD', 'EDGE', 'DETECTED', 'DETECTED_NEGATIVE', 'NO_DATA'])

isNanSafe

Ignore NaNs when estimating the background (bool, default False)

statisticsProperty

type of statistic to use for grid points (str, default 'MEANCLIP')

superPixelFilterSize

Size of the median filter to use to remove outliers from the binned image.

undersampleStyle

behaviour if there are too few points in grid for requested interpolation style (str, default 'REDUCE_INTERP_ORDER')

useApprox

Use Approximate (Chebyshev) to model background.

weighting

Use inverse variance weighting in calculation (valid only with useApprox=True) (bool, default True)

Attributes Documentation

algorithm#

how to interpolate the background values. This maps to an enum; see afw::math::Background (str, default 'AKIMA_SPLINE')

Allowed values:

'CONSTANT'

Use a single constant value

'LINEAR'

Use linear interpolation

'NATURAL_SPLINE'

cubic spline with zero second derivative at endpoints

'AKIMA_SPLINE'

higher-level nonlinear spline that is more robust to outliers

'NONE'

No background estimation is to be attempted

'None'

Field is optional

approxOrderX#

Approximation order in X for background Chebyshev (valid only with useApprox=True) (int, default 6)

approxOrderY#

Approximation order in Y for background Chebyshev (valid only with useApprox=True) (int, default -1)

binSize#

how large a region of the sky should be used for each background point (int, default 128)

Valid Range = [1,inf)

binSizeX#

Sky region size to be used for each background point in X direction. If 0, the binSize config is used. (int, default 0)

Valid Range = [0,inf)

binSizeY#

Sky region size to be used for each background point in Y direction. If 0, the binSize config is used. (int, default 0)

Valid Range = [0,inf)

doApplyFlatBackgroundRatio#

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

doFilterSuperPixels#

Remove outliers from the binned image. (bool, default False)

ignoredPixelMask#

Names of mask planes to ignore while estimating the background (List, default ['BAD', 'EDGE', 'DETECTED', 'DETECTED_NEGATIVE', 'NO_DATA'])

isNanSafe#

Ignore NaNs when estimating the background (bool, default False)

statisticsProperty#

type of statistic to use for grid points (str, default 'MEANCLIP')

Allowed values:

'MEANCLIP'

clipped mean

'MEAN'

unclipped mean

'MEDIAN'

median

'None'

Field is optional

superPixelFilterSize#

Size of the median filter to use to remove outliers from the binned image. (int, default 3)

undersampleStyle#

behaviour if there are too few points in grid for requested interpolation style (str, default 'REDUCE_INTERP_ORDER')

Allowed values:

'THROW_EXCEPTION'

throw an exception if there are too few points

'REDUCE_INTERP_ORDER'

use an interpolation style with a lower order.

'INCREASE_NXNYSAMPLE'

Increase the number of samples used to make the interpolation grid.

'None'

Field is optional

useApprox#

Use Approximate (Chebyshev) to model background. (bool, default True)

weighting#

Use inverse variance weighting in calculation (valid only with useApprox=True) (bool, default True)