Skip to content

Commit

Permalink
Update experimenter.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Dobson committed Feb 22, 2024
1 parent 6c523f7 commit 990ee43
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions swmmanywhere/paper/experimenter.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@author: Barnaby Dobson
"""
import json
import shutil
import sys
from pathlib import Path
Expand Down Expand Up @@ -223,9 +222,8 @@ def generate_samples(N = None,
pbias = (flooding - baseline_flooding) / baseline_flooding
flooding_results[ix] = {'pbias' : pbias,
'iter' : ix,
**gb.get_group(ix).set_index('param').value.to_dict()}
**params_.set_index('param').value.to_dict()}
results_fid = addresses.bbox / 'results'
results_fid.mkdir(parents = True, exist_ok = True)
fid_flooding = results_fid / f'{jobid}_flooding.json'
with open(fid_flooding, 'w') as f:
json.dump(flooding_results, f)
fid_flooding = results_fid / f'{jobid}_flooding.csv'
+ pd.DataFrame(flooding_results).T.to_csv(fid_flooding)

0 comments on commit 990ee43

Please sign in to comment.