CovFastFourierTransform

class lsst.cp.pipe.utils.CovFastFourierTransform(diff, w, fftShape, maxRangeCov)

Bases: object

A class to compute (via FFT) the nearby pixels correlation function.

Implements appendix of Astier+19.

Parameters:
diffnumpy.array

Image where to calculate the covariances (e.g., the difference image of two flats).

wnumpy.array

Weight image (mask): it should consist of 1’s (good pixel) and 0’s (bad pixels).

fftShapetuple

2d-tuple with the shape of the FFT

maxRangeCovint

Maximum range for the covariances.

Methods Summary

cov(dx, dy)

Covariance for dx,dy averaged with dx,-dy if both non zero.

reportCovFastFourierTransform(maxRange)

Produce a list of tuples with covariances.

Methods Documentation

cov(dx, dy)

Covariance for dx,dy averaged with dx,-dy if both non zero.

Implements appendix of Astier+19.

Parameters:
dxint

Lag in x

dyint

Lag in y

Returns:
0.5*(cov1+cov2)float

Covariance at (dx, dy) lag

npix1+npix2int

Number of pixels used in covariance calculation.

Raises:
ValueError if number of pixels for a given lag is 0.
reportCovFastFourierTransform(maxRange)

Produce a list of tuples with covariances.

Implements appendix of Astier+19.

Parameters:
maxRangeint

Maximum range of covariances.

Returns:
tupleVeclist

List with covariance tuples.