Skip to content

Commit

Permalink
report upper and lower bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
bmeyers committed Mar 15, 2024
1 parent 7f04ea9 commit 36e104a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions solardatatools/algorithms/loss_factor_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ def __init__(
self.problem = self.make_problem(**kwargs)
self.user_settings = kwargs
self.degradation_rate = None
self.degradation_rate_lb = None
self.degradation_rate_ub = None
self.energy_model = None
self.log_energy_model = None
self.total_energy_loss = None
Expand Down Expand Up @@ -142,6 +144,8 @@ def estimate_degradation_rate(
<= [median_tol, confidence_tol, confidence_tol]
)
self.degradation_rate = np.median(output["deg"])
self.degradation_rate_lb = np.quantile(output["deg"], 0.025, method=method)
self.degradation_rate_ub = np.quantile(output["deg"], 0.975, method=method)
self.MC_results = {"samples": output, "running stats": running_stats}
self.problem = self.make_problem(**self.user_settings)

Expand Down Expand Up @@ -187,6 +191,8 @@ def report(self):
if self.total_energy_loss is not None:
out = {
"degradation rate [%/yr]": self.degradation_rate,
"deg rate lower bound [%/yr]": self.degradation_rate_lb,
"deg rate upper bound [%/yr]": self.degradation_rate_ub,
"total energy loss [kWh]": self.total_energy_loss,
"degradation energy loss [kWh]": self.degradation_energy_loss,
"soiling energy loss [kWh]": self.soiling_energy_loss,
Expand Down

0 comments on commit 36e104a

Please sign in to comment.