feat/nmeas #29
1 changed files with 4 additions and 1 deletions
add counter for measurements in tomls
commit
6e886aa06d
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue