Skip to content

Commit

Permalink
Add fix to avoid the run number exceeding the number of runs in calc_…
Browse files Browse the repository at this point in the history
…sensi.py

Signed-off-by: Melissa Sulprizio <[email protected]>
  • Loading branch information
msulprizio committed Apr 15, 2024
1 parent 81bf33d commit 154112c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/inversion_scripts/calc_sensi.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ def process(h):
# Determine which run directory to look in
if nruns > 0:
run_number = math.trunc((e+1)/ntracers)
if run_number >= nruns:
run_number = nruns-1
else:
run_number = e + 1
run_num = zero_pad_num(run_number)
Expand Down

0 comments on commit 154112c

Please sign in to comment.