Compare commits
3 commits
8ff555a639
...
892430ae54
| Author | SHA1 | Date | |
|---|---|---|---|
| 892430ae54 | |||
|
74d99f8d5f |
|||
|
6e886aa06d |
1 changed files with 5 additions and 2 deletions
|
|
@ -178,8 +178,10 @@ def import_toml(path: Path, file: str, copy_file: bool=True) -> None:
|
||||||
update_aliases(path, uuid, aliases)
|
update_aliases(path, uuid, aliases)
|
||||||
else:
|
else:
|
||||||
uuid = import_project(path, project['url'], aliases=aliases)
|
uuid = import_project(path, project['url'], aliases=aliases)
|
||||||
|
imeas = 1
|
||||||
|
nmeas = len(measurements.keys())
|
||||||
for mname, md in measurements.items():
|
for mname, md in measurements.items():
|
||||||
print("Import measurement: " + mname)
|
print(f"Import measurement {imeas}/{nmeas}: {mname}")
|
||||||
ensemble = md['ensemble']
|
ensemble = md['ensemble']
|
||||||
if project['code'] == 'sfcf':
|
if project['code'] == 'sfcf':
|
||||||
param = sfcf.read_param(path, uuid, md['param_file'])
|
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)
|
param = openQCD.load_ms1_parfile(path, uuid, parameter_file)
|
||||||
else:
|
else:
|
||||||
# Temporary solution
|
# Temporary solution
|
||||||
parameters = {}
|
parameters: dict[str, Any] = {}
|
||||||
parameters["rand"] = {}
|
parameters["rand"] = {}
|
||||||
parameters["rw_fcts"] = [{}]
|
parameters["rw_fcts"] = [{}]
|
||||||
for nrw in range(1):
|
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"]),
|
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', []))
|
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))
|
write_measurement(path, ensemble, measurement, uuid, project['code'], (md['param_file'] if 'param_file' in md else None))
|
||||||
|
imeas += 1
|
||||||
print(mname + " imported.")
|
print(mname + " imported.")
|
||||||
|
|
||||||
if not os.path.exists(path / "toml_imports" / uuid):
|
if not os.path.exists(path / "toml_imports" / uuid):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue