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

Backend updates #67

Merged
merged 2 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
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ repos:
hooks:
- id: flake8
# E501 - line length limit
# E502 - backslash in brackets
# E741 - ambiguous variable name, used sparsely when appropriate
args: ["--ignore=E501,E741"]
args: ["--ignore=E501,E502,E741"]
exclude: *exclude_files

- repo: https://github.com/pre-commit/mirrors-mypy
Expand Down
2 changes: 1 addition & 1 deletion aurora/results/plot/presenters/capacity_cycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def __init__(
def extract_data(self, dataset: dict) -> tuple:
"""docstring"""
y = dataset["Qd"]
x = np.arange(len(y))
x = dataset["cycle-number"]
return (x, y)

def plot_series(self, eid: int, dataset: dict) -> None:
Expand Down
5 changes: 4 additions & 1 deletion aurora/results/plot/presenters/capacity_swarm.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,10 @@ def extract_data(self, dataset: dict) -> pd.DataFrame:
label, _ = self.get_series_properties(eid)
weight = self.model.get_weight(eid, self.view.electrode.value)
factor = 1 / weight
for cycle, capacity in enumerate(data["Qd"][:num_cycles]):
for cycle, capacity in zip(
data["cycle-number"][:num_cycles],
data["Qd"][:num_cycles],
):
df_dict["hue"].append(label)
df_dict[self.X_LABEL].append(cycle)
df_dict[self.Y_LABEL].append(capacity * factor)
Expand Down
2 changes: 1 addition & 1 deletion aurora/results/plot/presenters/efficiency_cycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def extract_data(self, dataset: dict) -> tuple:
min_length = min(len(Qc), len(Qd))
Qc = Qc[:min_length]
Qd = Qd[:min_length]
x = np.arange(min_length)
x = dataset["cycle-number"][:min_length]
y = Qd / Qc
return (x, y)

Expand Down
Loading