From 4f09fc7d1fb737cbc7cc4a1745c9a2c4c483a522 Mon Sep 17 00:00:00 2001 From: Justus Kuhlmann Date: Mon, 3 Nov 2025 15:51:07 +0000 Subject: [PATCH] better steps from kwargs in read flow obs --- pyerrors/input/openQCD.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pyerrors/input/openQCD.py b/pyerrors/input/openQCD.py index 760e0be1..9f72f948 100644 --- a/pyerrors/input/openQCD.py +++ b/pyerrors/input/openQCD.py @@ -816,8 +816,8 @@ def _read_flow_obs(path: str, prefix: str, c: float, dtr_cnfg: int=1, version: s if version not in known_versions: raise Exception("Unknown openQCD version.") - if "steps" in kwargs: - steps = kwargs.get("steps") + + steps = kwargs.get("steps", 0) postfix = kwargs.get("postfix", "") if version == "sfqcd": @@ -940,12 +940,12 @@ def _read_flow_obs(path: str, prefix: str, c: float, dtr_cnfg: int=1, version: s if len(np.unique(np.diff(traj_list))) != 1: raise Exception("Irregularities in stepsize found") else: - if 'steps' in kwargs: + if steps == 0: + steps = traj_list[1] - traj_list[0] + else: if steps != traj_list[1] - traj_list[0]: raise Exception("steps and the found stepsize are not the same") - else: - steps = traj_list[1] - traj_list[0] - + configlist.append([tr // steps // dtr_cnfg for tr in traj_list]) if configlist[-1][0] > 1: offset = configlist[-1][0] - 1