Merge pull request 'feat/nmeas' (#29) from feat/nmeas into develop
All checks were successful
Mypy / mypy (push) Successful in 1m13s
Pytest / pytest (3.12) (push) Successful in 1m19s
Pytest / pytest (3.13) (push) Successful in 1m12s
Pytest / pytest (3.14) (push) Successful in 1m13s
Ruff / ruff (push) Successful in 1m3s

Reviewed-on: https://www.kuhl-mann.de/git/git/jkuhl/corrlib/pulls/29
This commit is contained in:
Justus Kuhlmann 2026-04-10 09:45:24 +02:00
commit 892430ae54

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'])
@ -200,7 +202,7 @@ def import_toml(path: Path, file: str, copy_file: bool=True) -> None:
param = openQCD.load_ms1_parfile(path, uuid, parameter_file)
else:
# Temporary solution
parameters = {}
parameters: dict[str, Any] = {}
parameters["rand"] = {}
parameters["rw_fcts"] = [{}]
for nrw in range(1):
@ -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):