Skip to content

Commit b9b307f

Browse files
author
chaithyagr
committed
fix undo
1 parent d131f47 commit b9b307f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/mrinufft/trajectories/tools.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ def _residual(gi):
480480
n_pl = _trapezoidal_plateau_length(gs, ge, gi, n_down, n_up, area)
481481
if n_pl < 0:
482482
return np.abs(n_pl) * 10000 # Penalize negative plateau
483-
return n_pl * 100
483+
return n_pl * 100 # Penalize large plateau
484484

485485
res = minimize_scalar(
486486
_residual,
@@ -492,8 +492,13 @@ def _residual(gi):
492492
return res.x
493493

494494
gi = Parallel(n_jobs=n_jobs)(
495-
delayed(solve_gi_min_plateau)(gs, ge, area)
496-
for gs, ge, area in zip(start_gradients[:], end_gradients[:], area_needed[:])
495+
delayed(solve_gi_min_plateau)(
496+
start_gradients[i, j],
497+
end_gradients[i, j],
498+
area_needed[i, j],
499+
)
500+
for i in range(start_gradients.shape[0])
501+
for j in range(start_gradients.shape[1])
497502
)
498503
gi = np.reshape(gi, start_gradients.shape)
499504
n_ramp_down, n_ramp_up = _trapezoidal_ramps(

0 commit comments

Comments
 (0)