mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-15 03:53:41 +02:00
feat: read_DistillationContraction_hd5 can now deal with missing files.
This commit is contained in:
parent
88fd37b241
commit
4e71da0b59
1 changed files with 42 additions and 39 deletions
|
@ -163,6 +163,7 @@ def read_DistillationContraction_hd5(path, ens_id, diagrams=["direct"], idl=None
|
||||||
for diagram in diagrams:
|
for diagram in diagrams:
|
||||||
corr_data[diagram] = []
|
corr_data[diagram] = []
|
||||||
|
|
||||||
|
try:
|
||||||
for n_file, (hd5_file, n_traj) in enumerate(zip(file_list, list(idx))):
|
for n_file, (hd5_file, n_traj) in enumerate(zip(file_list, list(idx))):
|
||||||
h5file = h5py.File(hd5_file)
|
h5file = h5py.File(hd5_file)
|
||||||
|
|
||||||
|
@ -211,6 +212,8 @@ def read_DistillationContraction_hd5(path, ens_id, diagrams=["direct"], idl=None
|
||||||
corr.tag = str(identifier)
|
corr.tag = str(identifier)
|
||||||
|
|
||||||
res_dict[str(identifier)][diagram] = corr
|
res_dict[str(identifier)][diagram] = corr
|
||||||
|
except FileNotFoundError:
|
||||||
|
print("Skip", stem)
|
||||||
|
|
||||||
return res_dict
|
return res_dict
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue