Skip to content

Commit

Permalink
Further optimization related to dq memory map
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamJamieson committed Nov 10, 2023
1 parent 2534b6e commit 4e1c872
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/stcal/ramp_fitting/ols_cas22/_fit.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4e1c872

Please sign in to comment.