From 4e1c872de2b7d13ee24472fbe5b9292f4d17c760 Mon Sep 17 00:00:00 2001 From: William Jamieson Date: Fri, 10 Nov 2023 10:44:00 -0500 Subject: [PATCH] Further optimization related to dq memory map --- src/stcal/ramp_fitting/ols_cas22/_fit.pyx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/stcal/ramp_fitting/ols_cas22/_fit.pyx b/src/stcal/ramp_fitting/ols_cas22/_fit.pyx index 06098a54..87aaf02d 100644 --- a/src/stcal/ramp_fitting/ols_cas22/_fit.pyx +++ b/src/stcal/ramp_fitting/ols_cas22/_fit.pyx @@ -194,13 +194,17 @@ def fit_ramps(float[:, :] resultants, cdef int poisson_var = Variance.poisson_var cdef int total_var = Variance.total_var + # Pull memory view of dq for speed of access later + # changes to this array will backpropagate to the original numpy array + cdef int[:, :] dq_ = dq + # Run the jump fitting algorithm for each pixel cdef JumpFits fit cdef int index for index in range(n_pixels): # Fit all the ramps for the given pixel fit = fit_jumps(resultants[:, index], - dq[:, index], + dq_[:, index], read_noise[index], t_bar, tau,