Skip to content

Commit

Permalink
Fix reporting on partial cycles
Browse files Browse the repository at this point in the history
  • Loading branch information
edan-bainglass committed Dec 7, 2023
1 parent 4d83e39 commit 9c5aae0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions aiida_aurora/utils/analyzers.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ def _check_capacity(self) -> None:
"""Check if capacity has fallen below threshold for required
consecutive cycles."""

if (n := len(self.capacities)) < 1:
self.report = "no complete cycles"
if (n := len(self.capacities)) < 2:
self.report = "need at least two complete cycles"
return

Qs = self.capacities[0]
Q = self.capacities[-1]
Q = self.capacities[-2]
Qt = self.threshold * Qs
C_per = Q / Qs * 100

Expand Down

0 comments on commit 9c5aae0

Please sign in to comment.