add counter for measurements in tomls
Some checks failed
Mypy / mypy (push) Failing after 1m13s
Pytest / pytest (3.12) (push) Successful in 1m18s
Pytest / pytest (3.13) (push) Successful in 1m12s
Pytest / pytest (3.14) (push) Successful in 1m12s
Ruff / ruff (push) Successful in 1m2s

This commit is contained in:
Justus Kuhlmann 2026-04-10 09:16:46 +02:00
commit 6e886aa06d
Signed by: jkuhl
GPG key ID: 00ED992DD79B85A6

View file

@ -178,8 +178,10 @@ def import_toml(path: Path, file: str, copy_file: bool=True) -> None:
update_aliases(path, uuid, aliases)
else:
uuid = import_project(path, project['url'], aliases=aliases)
imeas = 1
nmeas = len(measurements.keys())
for mname, md in measurements.items():
print("Import measurement: " + mname)
print(f"Import measurement {imeas}/{nmeas}: {mname}")
ensemble = md['ensemble']
if project['code'] == 'sfcf':
param = sfcf.read_param(path, uuid, md['param_file'])
@ -232,6 +234,7 @@ def import_toml(path: Path, file: str, copy_file: bool=True) -> None:
measurement = openQCD.extract_t1(path, uuid, md['path'], param, str(md["prefix"]), int(md["dtr_read"]), int(md["xmin"]), int(md["spatial_extent"]),
fit_range=int(md.get('fit_range', 5)), postfix=str(md.get('postfix', '')), names=md.get('names', []), files=md.get('files', []))
write_measurement(path, ensemble, measurement, uuid, project['code'], (md['param_file'] if 'param_file' in md else None))
imeas += 1
print(mname + " imported.")
if not os.path.exists(path / "toml_imports" / uuid):