lsst.cp.pipe  21.0.0-5-gb7080ec+fcef0afafe
Classes | Functions
lsst.cp.pipe.astierCovPtcFit Namespace Reference

Classes

class  CovFit
 
class  Pol2d
 

Functions

def computeApproximateAcoeffs (covModel, muEl, gain)
 
def makeCovArray (inputTuple, maxRangeFromTuple=8)
 
def symmetrize (inputArray)
 

Function Documentation

◆ computeApproximateAcoeffs()

def lsst.cp.pipe.astierCovPtcFit.computeApproximateAcoeffs (   covModel,
  muEl,
  gain 
)
Compute the "a" coefficients of the Antilogus+14 (1402.0725) model as in
Guyonnet+15 (1501.01577, eq. 16, the slope of cov/var at a given flux mu in electrons).

Eq. 16 of 1501.01577 is an approximation to the more complete model in Astier+19 (1905.08677).

Parameters
---------
covModel : `list`
    Covariance model from Eq. 20 in Astier+19.

muEl : `np.array`
    Mean signal in electrons

gain : `float`
    Gain in e-/ADU.

Returns
-------
aCoeffsOld: `numpy.array`
    Slope of cov/var at a given flux mu in electrons.

Notes
-----
Returns the "a" array, computed this way, to be compared to the actual a_array from the full model
(fit.geA()).

Definition at line 34 of file astierCovPtcFit.py.

◆ makeCovArray()

def lsst.cp.pipe.astierCovPtcFit.makeCovArray (   inputTuple,
  maxRangeFromTuple = 8 
)
Make covariances array from tuple.

Parameters
----------
inputTuple: `numpy.recarray`
    Recarray with rows with at least (mu, cov, var, i, j, npix), where:
    mu : 0.5*(m1 + m2), where:
        mu1: mean value of flat1
        mu2: mean value of flat2
    cov: covariance value at lag(i, j)
    var: variance(covariance value at lag(0, 0))
    i: lag dimension
    j: lag dimension
    npix: number of pixels used for covariance calculation.

maxRangeFromTuple: `int`
    Maximum range to select from tuple.

Returns
-------
cov: `numpy.array`
    Covariance arrays, indexed by mean signal mu.

vCov: `numpy.array`
    Variance arrays, indexed by mean signal mu.

muVals: `numpy.array`
    List of mean signal values.

Notes
-----

The input tuple should contain  the following rows:
(mu, cov, var, i, j, npix), with one entry per lag, and image pair.
Different lags(i.e. different i and j) from the same
image pair have the same values of mu1 and mu2. When i==j==0, cov
= var.

If the input tuple contains several video channels, one should
select the data of a given channel *before* entering this
routine, as well as apply(e.g.) saturation cuts.

The routine returns cov[k_mu, j, i], vcov[(same indices)], and mu[k]
where the first index of cov matches the one in mu.

This routine implements the loss of variance due to
clipping cuts when measuring variances and covariance, but this should happen inside
the measurement code, where the cuts are readily available.

Definition at line 67 of file astierCovPtcFit.py.

◆ symmetrize()

def lsst.cp.pipe.astierCovPtcFit.symmetrize (   inputArray)
Copy array over 4 quadrants prior to convolution.

Parameters
----------
inputarray: `numpy.array`
    Input array to symmetrize.

Returns
-------
aSym: `numpy.array`
    Symmetrized array.

Definition at line 159 of file astierCovPtcFit.py.