Skip to content

Commit

Permalink
Get titration values in a compliant way to avoid errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Kastakin committed Jul 2, 2024
1 parent 79e58b0 commit bd4a18e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/libeq/data_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,12 @@ def load_from_pyes(cls, pyes_data: str | dict) -> "SolverData":
slope=t["slope"],
v0=t["initialVolume"],
v0_sigma=t["vSigma"],
v_add=np.array(list(t["titrationView"]["0"].values())),
emf=np.array(list(t["titrationView"]["1"].values())),
v_add=np.array(
list(t.get("titrationView", {}).get("0", {}).values())
),
emf=np.array(
list(t.get("titrationView", {}).get("1", {}).values())
),
)
)
data["potentiometry_opts"] = PotentiometryOptions(
Expand Down

0 comments on commit bd4a18e

Please sign in to comment.