Skip to content

Commit

Permalink
Update runAnalysis.py
Browse files Browse the repository at this point in the history
  • Loading branch information
matamadio committed Sep 19, 2023
1 parent 57ef43d commit 5c2aeea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Top-down/parallelization/runAnalysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ def run_analysis(country: str, haz_cat: str, valid_RPs: list[int],

# Defining the list of valid prob_RPs - probability of return period
prob_RPs = 1./np.array(valid_RPs)
prob_RPs_LB = np.append(-np.diff(prob_RPs),prob_RPs[-1]).tolist() # Lower bound - alternative --> prob_RPs_LB = np.append(1-prob_RPs[0],-np.diff(prob_RPs)).tolist() # Lower bound [0-1]
prob_RPs_UB = np.insert(-np.diff(prob_RPs),0,0.).tolist() # Upper bound - alternative --> prob_RPs_UB = np.append(1-prob_RPs[0],-np.diff(prob_RPs)).tolist() # Upper bound [0-1]
prob_RPs_LB = np.append(-np.diff(prob_RPs),prob_RPs[-1]).tolist() # Lower bound
prob_RPs_UB = np.insert(-np.diff(prob_RPs),0,0.).tolist() # Upper bound
prob_RPs_Mean = ((np.array(prob_RPs_LB)+np.array(prob_RPs_UB))/2).tolist() # Mean value
prob_RPs_df = pd.DataFrame({'RPs':valid_RPs,
'prob_RPs':prob_RPs,
Expand Down

0 comments on commit 5c2aeea

Please sign in to comment.