mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-11-30 04:56:52 +01:00
better steps from kwargs in read flow obs
This commit is contained in:
parent
e2649b3074
commit
4f09fc7d1f
1 changed files with 6 additions and 6 deletions
|
|
@ -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:
|
if version not in known_versions:
|
||||||
raise Exception("Unknown openQCD version.")
|
raise Exception("Unknown openQCD version.")
|
||||||
if "steps" in kwargs:
|
|
||||||
steps = kwargs.get("steps")
|
steps = kwargs.get("steps", 0)
|
||||||
|
|
||||||
postfix = kwargs.get("postfix", "")
|
postfix = kwargs.get("postfix", "")
|
||||||
if version == "sfqcd":
|
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:
|
if len(np.unique(np.diff(traj_list))) != 1:
|
||||||
raise Exception("Irregularities in stepsize found")
|
raise Exception("Irregularities in stepsize found")
|
||||||
else:
|
else:
|
||||||
if 'steps' in kwargs:
|
if steps == 0:
|
||||||
|
steps = traj_list[1] - traj_list[0]
|
||||||
|
else:
|
||||||
if steps != traj_list[1] - traj_list[0]:
|
if steps != traj_list[1] - traj_list[0]:
|
||||||
raise Exception("steps and the found stepsize are not the same")
|
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])
|
configlist.append([tr // steps // dtr_cnfg for tr in traj_list])
|
||||||
if configlist[-1][0] > 1:
|
if configlist[-1][0] > 1:
|
||||||
offset = configlist[-1][0] - 1
|
offset = configlist[-1][0] - 1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue