Skip to content

Commit

Permalink
ENH: cleaner calculation of result parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Madurai authored and Evan Madurai committed Dec 28, 2024
1 parent b0137e1 commit 7a4a6b9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions rocketpy/simulation/monte_carlo.py
Original file line number Diff line number Diff line change
Expand Up @@ -722,12 +722,17 @@ def set_processed_results(self):
try:
mean = np.mean(values)
stdev = np.std(values)
self.processed_results[result] = (mean, stdev)
pi_low = np.quantile(values, 0.025)
pi_high = np.quantile(values, 0.975)
median = np.median(values)
self.processed_results[result] = (mean, median, stdev, pi_low, pi_high)
except TypeError:
self.processed_results[result] = (None, None, None, None, None)
mean = None
stdev = None
pi_low = None
pi_high = None
median = None
self.processed_results[result] = (mean, median, stdev, pi_low, pi_high)

# Import methods

Expand Down

0 comments on commit 7a4a6b9

Please sign in to comment.