Skip to content

Commit

Permalink
Remove a copy
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamJamieson committed Oct 6, 2023
1 parent f0c3137 commit 32f1d78
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/stcal/ramp_fitting/ols_cas22/_fit_ramps.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

0 comments on commit 32f1d78

Please sign in to comment.