MatchBackgroundsTask¶
Python API summary¶
from lsst.pipe.tasks.matchBackgrounds import MatchBackgroundsTask

class
MatchBackgroundsTask
(*args, **kwargs) Base class for data processing tasks
...
 attributeconfig
Access configuration fields and retargetable subtasks.

method
run
(expRefList, expDatasetType, imageScalerList=None, refExpDataRef=None, refImageScaler=None) Match the backgrounds of a list of coadd temp exposures to a reference coadd temp exposure
...
See also
See the MatchBackgroundsTask
API reference for complete details.
Retargetable subtasks¶
No subtasks.
Configuration fields¶
approxWeighting¶
Use inversevariance weighting when approximating background offset model? This will fail when the background offset is constant (this is usually only the case in testing with artificial images).(usePolynomial=True)
badMaskPlanes¶
 Default
['NO_DATA', 'DETECTED', 'DETECTED_NEGATIVE', 'SAT', 'BAD', 'INTRP', 'CR']
 Field type
Names of mask planes to ignore while estimating the background
bestRefWeightCoverage¶
 Default
0.4
 Field type
 Range
[0.0,1.0)
Weight given to coverage (number of pixels that overlap with patch), when calculating best reference exposure. Higher weight prefers exposures with high coverage.Ignored when reference visit is supplied
bestRefWeightLevel¶
 Default
0.2
 Field type
 Range
[0.0,1.0)
Weight given to mean background level when calculating best reference exposure. Higher weight prefers exposures with low mean background level. Ignored when reference visit is supplied.
bestRefWeightVariance¶
 Default
0.4
 Field type
 Range
[0.0,1.0)
Weight given to image variance when calculating best reference exposure. Higher weight prefers exposures with low image variance. Ignored when reference visit is supplied
binSize¶
Bin size for gridding the difference image and fitting a spatial model
gridStatistic¶
 Default
'MEAN'
 Field type
str
ChoiceField
(optional) Choices
'MEAN'
mean
'MEDIAN'
median
'MEANCLIP'
clipped mean
None
Field is optional
Type of statistic to estimate pixel value for the grid points
gridStdevEpsilon¶
 Default
1e08
 Field type
 Range
[0.0,inf)
Tolerance on almost zero standard deviation in a backgroundoffset grid bin. If all bins have a standard deviation below this value, the background offset model is approximated without inversevariance weighting. (usePolynomial=True)
interpStyle¶
 Default
'AKIMA_SPLINE'
 Field type
str
ChoiceField
(optional) Choices
'CONSTANT'
Use a single constant value
'LINEAR'
Use linear interpolation
'NATURAL_SPLINE'
cubic spline with zero second derivative at endpoints
'AKIMA_SPLINE'
higherlevel nonlinear spline that is more robust to outliers
'NONE'
No background estimation is to be attempted
None
Field is optional
Algorithm to interpolate the background values; ignored if usePolynomial is TrueMaps to an enum; see afw.math.Background
numIter¶
Number of iterations of outlier rejection; ignored if gridStatistic != ‘MEANCLIP’.
numSigmaClip¶
Sigma for outlier rejection; ignored if gridStatistic != ‘MEANCLIP’.
order¶
Order of Chebyshev polynomial background model. Ignored if usePolynomial False
undersampleStyle¶
 Default
'REDUCE_INTERP_ORDER'
 Field type
str
ChoiceField
(optional) Choices
'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
Behaviour if there are too few points in grid for requested interpolation style. Note: INCREASE_NXNYSAMPLE only allowed for usePolynomial=True.
usePolynomial¶
Fit background difference with Chebychev polynomial interpolation (using afw.math.Approximate)? If False, fit with spline interpolation using afw.math.Background