construct_ramp_fitting_matrices¶
- romanisim.ramp.construct_ramp_fitting_matrices(covar, read_pattern)¶
Construct \(A^T C^{-1} A\) and \(A^T C^{-1}\), the matrices needed to fit ramps from resultants.
The matrices constructed are those needed for applying to differences of resultants; e.g., the results of resultants_to_differences.
- Parameters:
- covarnp.ndarray[n_resultant, n_resultant] (float)
covariance of differences of resultants
- read_patternlist[list]
List of lists specifying the reads entering each resultant
- Returns:
- atcinva, atcinvnp.ndarray[2, 2], np.ndarray[2, n_resultant] (float)
\(A^T C^{-1} A\) and \(A^T C^{-1}\), so that pedestal, flux = np.linalg.inv(atcinva).dot(atcinva.dot(differences))