fit_ramps_casertano

romanisim.ramp.fit_ramps_casertano(resultants, dq, read_noise, read_pattern)

Fit ramps following Casertano+2022, including averaging partial ramps.

Ramps are broken where dq != 0, and fits are performed on each sub-ramp. Resultants containing multiple ramps have their ramp fits averaged using inverse variance weights based on the variance in the individual slope fits due to read noise.

Parameters:
resultantsnp.ndarry[nresultants, …]

the resultants in electrons

dqnp.ndarry[nresultants, …]

the dq array. dq != 0 implies bad pixel / CR.

read noise: float

the read noise in electrons

read_patternlist[list[int]]

list of lists giving indices of reads entering each resultant

Returns:
parnp.ndarray[…, 2] (float)

the best fit pedestal and slope for each pixel

varnp.ndarray[…, 3, 2, 2] (float)

the covariance matrix of par, for each of three noise terms: the read noise, Poisson source noise, and total noise.