mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-03-15 14:50:25 +01:00
additional check on momentum of ExternalLeg added
This commit is contained in:
parent
d8c4f03a07
commit
34ed2588aa
1 changed files with 6 additions and 1 deletions
|
@ -85,15 +85,20 @@ def read_ExternalLeg_hd5(path, filestem, ens_id, order='F'):
|
|||
|
||||
files = _get_files(path, filestem)
|
||||
|
||||
mom = None
|
||||
|
||||
corr_data = []
|
||||
for hd5_file in files:
|
||||
file = h5py.File(path + '/' + hd5_file, "r")
|
||||
raw_data = file['ExternalLeg/corr'][0][0].view('complex')
|
||||
corr_data.append(raw_data)
|
||||
if mom is not None:
|
||||
assert np.allclose(mom, np.array(str(file['ExternalLeg/info'].attrs['pIn'])[3:-2].strip().split(' '), dtype=int))
|
||||
else:
|
||||
mom = np.array(str(file['ExternalLeg/info'].attrs['pIn'])[3:-2].strip().split(' '), dtype=int)
|
||||
file.close()
|
||||
corr_data = np.array(corr_data)
|
||||
|
||||
mom = np.array(str(file['ExternalLeg/info'].attrs['pIn'])[3:-2].strip().split(' '), dtype=int)
|
||||
|
||||
rolled_array = np.rollaxis(corr_data, 0, 5)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue