Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfixes #38

Merged
merged 4 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# aiida-aurora

AiiDA plugin for the Aurora project (autonomous robotic battery innovation platform).
A collaboration between EPFL & Empa, within the BIG-MAP Stakeholder Initiative Call 2021.
A collaboration between EPFL & Empa, within the BIG-MAP Stakeholder Initiative Call 2021-2023.

## Repository contents

Expand Down
2 changes: 1 addition & 1 deletion aiida_aurora/utils/cycling_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def get_data_from_remote(source: RemoteData) -> dict:
The post-processed data dictionary.
"""
try:
remote_path = source.get_attribute("remote_path")
remote_path = source.attributes["remote_path"]
with open(f"{remote_path}/snapshot.json") as file:
return get_data_from_file(file)
except Exception:
Expand Down
11 changes: 6 additions & 5 deletions aiida_aurora/utils/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,12 @@ def get_data_from_results(array_node) -> dict:
def post_process_data(t: np.ndarray, Ewe: np.ndarray, I: np.ndarray) -> dict:
"""docstring"""

# find half-cycle markers
# add last point if not already a marker
idx = np.where(np.diff(np.sign(I)) != 0)[0]
if (final := len(I) - 1) not in idx:
idx = np.append(idx, final)
mask = I != 0 # filter out zero current
t, Ewe, I = t[mask], Ewe[mask], I[mask]

# mark half-cycles (including first and last values)
idx = np.where(np.diff(np.sign(I), prepend=0) != 0)[0]
idx = np.append(idx, len(I))

# integrate and store charge and discharge currents
Qc, Qd = [], []
Expand Down
6 changes: 3 additions & 3 deletions aiida_aurora/workflows/cycling_sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ def define(cls, spec):

def setup_workload(self):
"""Create an ordered list of protocol step names."""
self.worksteps_keynames = list(self.inputs["protocol_order"])
self.ctx.steps = list(self.inputs["protocol_order"])

def has_steps_remaining(self):
"""Check if there is any remaining step."""
return len(self.worksteps_keynames) > 0
return len(self.ctx.steps) > 0

def inspect_cycling_step(self):
"""Verify that the last cycling step finished successfully."""
Expand All @@ -127,7 +127,7 @@ def inspect_cycling_step(self):

def run_cycling_step(self):
"""Run the next cycling step."""
protocol_name = self.worksteps_keynames.pop(0)
protocol_name = self.ctx.steps.pop(0)

inputs = {
'code': self.inputs.tomato_code,
Expand Down
Loading