mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-03-15 23:00:25 +01: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:
|
||||
corr_data[diagram] = []
|
||||
|
||||
try:
|
||||
for n_file, (hd5_file, n_traj) in enumerate(zip(file_list, list(idx))):
|
||||
h5file = h5py.File(hd5_file)
|
||||
|
||||
|
@ -211,6 +212,8 @@ def read_DistillationContraction_hd5(path, ens_id, diagrams=["direct"], idl=None
|
|||
corr.tag = str(identifier)
|
||||
|
||||
res_dict[str(identifier)][diagram] = corr
|
||||
except FileNotFoundError:
|
||||
print("Skip", stem)
|
||||
|
||||
return res_dict
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue