Skip to content

Commit

Permalink
Fix issue resulting from python version backwards incompatiblity
Browse files Browse the repository at this point in the history
  • Loading branch information
Hemaditya Malla committed Oct 24, 2023
1 parent 192c3cf commit f47455c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tools/sensitivity_analyze_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@
description='''Script to analyze results from a sensitivity study
Authors: Hemaditya Malla, Jannis Teunissen''')
parser.add_argument('logs', type=str, nargs='+',
help='Log files')
help='Log/rates files')
parser.add_argument('-y', type=str, nargs='+', default=["sum(n_e)"],
help='Variables in the log files to compare')
parser.add_argument('-time_index', type=int, default=-1,
help='Which time index in the log files to consider')
args = parser.parse_args()

logs = sorted(args.logs)
print(logs)
logs_df = [pd.read_csv(f, delim_whitespace=True) for f in args.logs]

log_sizes = np.array([len(df) for df in logs_df])
Expand Down Expand Up @@ -59,7 +60,9 @@
print(f'R{"#":<4} {"variable":15} {"mu":>15} {"mustar":>15} {"sigma":>15}')

for i, ix in enumerate(reaction_ix):
values = np.array([df[args.y] for _, df in all_cases[ix]])
# print("test: ", args.y)
# test = [df[args.y] for _, df in all_cases[ix]]
values = np.array([df[args.y].to_numpy() for _, df in all_cases[ix]])
factors = np.array([f for f, _ in all_cases[ix]])

# Get values at time index
Expand Down

0 comments on commit f47455c

Please sign in to comment.