From f795bf1729e16482520db97b1a945734fb7f2941 Mon Sep 17 00:00:00 2001 From: fjosw Date: Thu, 18 Nov 2021 14:01:21 +0000 Subject: [PATCH] Documentation updated --- docs/pyerrors/input/hadrons.html | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/docs/pyerrors/input/hadrons.html b/docs/pyerrors/input/hadrons.html index 00b2a8e6..68caa58e 100644 --- a/docs/pyerrors/input/hadrons.html +++ b/docs/pyerrors/input/hadrons.html @@ -184,9 +184,7 @@ 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: + if mom is None: mom = np.array(str(file['ExternalLeg/info'].attrs['pIn'])[3:-2].strip().split(' '), dtype=int) file.close() corr_data = np.array(corr_data) @@ -198,7 +196,6 @@ real = Obs([rolled_array[si, sj, ci, cj].real], [ens_id], idl=[cnfg_numbers]) imag = Obs([rolled_array[si, sj, ci, cj].imag], [ens_id], idl=[cnfg_numbers]) matrix[si, sj, ci, cj] = CObs(real, imag) - matrix[si, sj, ci, cj].gamma_method() return Npr_matrix(matrix.swapaxes(1, 2).reshape((12, 12), order=order), mom_in=mom) @@ -230,13 +227,9 @@ corr_data[name] = [] raw_data = file['Bilinear/Bilinear_' + str(i) + '/corr'][0][0].view('complex') corr_data[name].append(raw_data) - if mom_in is not None: - assert np.allclose(mom_in, np.array(str(file['Bilinear/Bilinear_' + str(i) + '/info'].attrs['pIn'])[3:-2].strip().split(' '), dtype=int)) - else: + if mom_in is None: mom_in = np.array(str(file['Bilinear/Bilinear_' + str(i) + '/info'].attrs['pIn'])[3:-2].strip().split(' '), dtype=int) - if mom_out is not None: - assert np.allclose(mom_out, np.array(str(file['Bilinear/Bilinear_' + str(i) + '/info'].attrs['pOut'])[3:-2].strip().split(' '), dtype=int)) - else: + if mom_out is None: mom_out = np.array(str(file['Bilinear/Bilinear_' + str(i) + '/info'].attrs['pOut'])[3:-2].strip().split(' '), dtype=int) file.close() @@ -373,9 +366,7 @@ from other modules with similar structures. 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: + if mom is None: mom = np.array(str(file['ExternalLeg/info'].attrs['pIn'])[3:-2].strip().split(' '), dtype=int) file.close() corr_data = np.array(corr_data) @@ -387,7 +378,6 @@ from other modules with similar structures. real = Obs([rolled_array[si, sj, ci, cj].real], [ens_id], idl=[cnfg_numbers]) imag = Obs([rolled_array[si, sj, ci, cj].imag], [ens_id], idl=[cnfg_numbers]) matrix[si, sj, ci, cj] = CObs(real, imag) - matrix[si, sj, ci, cj].gamma_method() return Npr_matrix(matrix.swapaxes(1, 2).reshape((12, 12), order=order), mom_in=mom) @@ -446,13 +436,9 @@ from other modules with similar structures. corr_data[name] = [] raw_data = file['Bilinear/Bilinear_' + str(i) + '/corr'][0][0].view('complex') corr_data[name].append(raw_data) - if mom_in is not None: - assert np.allclose(mom_in, np.array(str(file['Bilinear/Bilinear_' + str(i) + '/info'].attrs['pIn'])[3:-2].strip().split(' '), dtype=int)) - else: + if mom_in is None: mom_in = np.array(str(file['Bilinear/Bilinear_' + str(i) + '/info'].attrs['pIn'])[3:-2].strip().split(' '), dtype=int) - if mom_out is not None: - assert np.allclose(mom_out, np.array(str(file['Bilinear/Bilinear_' + str(i) + '/info'].attrs['pOut'])[3:-2].strip().split(' '), dtype=int)) - else: + if mom_out is None: mom_out = np.array(str(file['Bilinear/Bilinear_' + str(i) + '/info'].attrs['pOut'])[3:-2].strip().split(' '), dtype=int) file.close()