feat: read_DistillationContraction_hd5 can now deal with missing files.

This commit is contained in:
Fabian Joswig 2023-01-18 17:51:34 +00:00
parent 88fd37b241
commit 4e71da0b59

View file

@ -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