From 6adb227ab301ce533ba33ec0ea78080144c94fca Mon Sep 17 00:00:00 2001 From: William Jamieson Date: Fri, 6 Oct 2023 15:05:15 -0400 Subject: [PATCH] Remove a copy --- src/stcal/ramp_fitting/ols_cas22/_fit_ramps.pyx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/stcal/ramp_fitting/ols_cas22/_fit_ramps.pyx b/src/stcal/ramp_fitting/ols_cas22/_fit_ramps.pyx index 041454c9d..ad19fb288 100644 --- a/src/stcal/ramp_fitting/ols_cas22/_fit_ramps.pyx +++ b/src/stcal/ramp_fitting/ols_cas22/_fit_ramps.pyx @@ -113,9 +113,6 @@ def fit_ramps(np.ndarray[float, ndim=2] resultants, cdef np.ndarray[float, ndim=2] parameters = np.zeros((n_pixels, 2), dtype=np.float32) cdef np.ndarray[float, ndim=2] variances = np.zeros((n_pixels, 3), dtype=np.float32) - # Copy the dq array so we can modify it without fear - cdef np.ndarray[int, ndim=2] fit_dq = dq.copy() - # Perform all of the fits cdef RampFits fit cdef int index @@ -131,8 +128,8 @@ def fit_ramps(np.ndarray[float, ndim=2] resultants, variances[index, Variance.total_var] = fit.average.read_var + fit.average.poisson_var for jump in fit.jumps: - fit_dq[jump, index] = RampJumpDQ.JUMP_DET + dq[jump, index] = RampJumpDQ.JUMP_DET ramp_fits.push_back(fit) - return RampFitOutputs(ramp_fits, parameters, variances, fit_dq) + return RampFitOutputs(ramp_fits, parameters, variances, dq)