From 154112c7a9cef0a763fbae7737d7e916e5287e76 Mon Sep 17 00:00:00 2001 From: Melissa Sulprizio Date: Mon, 15 Apr 2024 15:35:52 -0400 Subject: [PATCH] Add fix to avoid the run number exceeding the number of runs in calc_sensi.py Signed-off-by: Melissa Sulprizio --- src/inversion_scripts/calc_sensi.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/inversion_scripts/calc_sensi.py b/src/inversion_scripts/calc_sensi.py index 9ce28ac5..a9e370a2 100644 --- a/src/inversion_scripts/calc_sensi.py +++ b/src/inversion_scripts/calc_sensi.py @@ -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)