mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 19:43:41 +02: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)
|
files = _get_files(path, filestem)
|
||||||
|
|
||||||
|
mom = None
|
||||||
|
|
||||||
corr_data = []
|
corr_data = []
|
||||||
for hd5_file in files:
|
for hd5_file in files:
|
||||||
file = h5py.File(path + '/' + hd5_file, "r")
|
file = h5py.File(path + '/' + hd5_file, "r")
|
||||||
raw_data = file['ExternalLeg/corr'][0][0].view('complex')
|
raw_data = file['ExternalLeg/corr'][0][0].view('complex')
|
||||||
corr_data.append(raw_data)
|
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()
|
file.close()
|
||||||
corr_data = np.array(corr_data)
|
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)
|
rolled_array = np.rollaxis(corr_data, 0, 5)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue