mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-15 12:03:42 +02:00
fix: optional parameter order removed from hadrons npr input routines
This commit is contained in:
parent
8234ac037b
commit
42c4baa8ba
1 changed files with 4 additions and 10 deletions
|
@ -130,7 +130,7 @@ class Npr_matrix(np.ndarray):
|
||||||
self.mom_out = getattr(obj, 'mom_out', None)
|
self.mom_out = getattr(obj, 'mom_out', None)
|
||||||
|
|
||||||
|
|
||||||
def read_ExternalLeg_hd5(path, filestem, ens_id, order='F', idl=None):
|
def read_ExternalLeg_hd5(path, filestem, ens_id, idl=None):
|
||||||
"""Read hadrons ExternalLeg hdf5 file and output an array of CObs
|
"""Read hadrons ExternalLeg hdf5 file and output an array of CObs
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
|
@ -138,9 +138,6 @@ def read_ExternalLeg_hd5(path, filestem, ens_id, order='F', idl=None):
|
||||||
path -- path to the files to read
|
path -- path to the files to read
|
||||||
filestem -- namestem of the files to read
|
filestem -- namestem of the files to read
|
||||||
ens_id -- name of the ensemble, required for internal bookkeeping
|
ens_id -- name of the ensemble, required for internal bookkeeping
|
||||||
order -- order in which the array is to be reshaped,
|
|
||||||
'F' for the first index changing fastest (9 4x4 matrices) default.
|
|
||||||
'C' for the last index changing fastest (16 3x3 matrices),
|
|
||||||
idl : range
|
idl : range
|
||||||
If specified only conifgurations in the given range are read in.
|
If specified only conifgurations in the given range are read in.
|
||||||
"""
|
"""
|
||||||
|
@ -167,10 +164,10 @@ def read_ExternalLeg_hd5(path, filestem, ens_id, order='F', idl=None):
|
||||||
imag = Obs([rolled_array[si, sj, ci, cj].imag], [ens_id], idl=[idx])
|
imag = Obs([rolled_array[si, sj, ci, cj].imag], [ens_id], idl=[idx])
|
||||||
matrix[si, sj, ci, cj] = CObs(real, imag)
|
matrix[si, sj, ci, cj] = CObs(real, imag)
|
||||||
|
|
||||||
return Npr_matrix(matrix.swapaxes(1, 2).reshape((12, 12), order=order), mom_in=mom)
|
return Npr_matrix(matrix.swapaxes(1, 2).reshape((12, 12), order='F'), mom_in=mom)
|
||||||
|
|
||||||
|
|
||||||
def read_Bilinear_hd5(path, filestem, ens_id, order='F', idl=None):
|
def read_Bilinear_hd5(path, filestem, ens_id, idl=None):
|
||||||
"""Read hadrons Bilinear hdf5 file and output an array of CObs
|
"""Read hadrons Bilinear hdf5 file and output an array of CObs
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
|
@ -178,9 +175,6 @@ def read_Bilinear_hd5(path, filestem, ens_id, order='F', idl=None):
|
||||||
path -- path to the files to read
|
path -- path to the files to read
|
||||||
filestem -- namestem of the files to read
|
filestem -- namestem of the files to read
|
||||||
ens_id -- name of the ensemble, required for internal bookkeeping
|
ens_id -- name of the ensemble, required for internal bookkeeping
|
||||||
order -- order in which the array is to be reshaped,
|
|
||||||
'F' for the first index changing fastest (9 4x4 matrices) default.
|
|
||||||
'C' for the last index changing fastest (16 3x3 matrices),
|
|
||||||
idl : range
|
idl : range
|
||||||
If specified only conifgurations in the given range are read in.
|
If specified only conifgurations in the given range are read in.
|
||||||
"""
|
"""
|
||||||
|
@ -219,6 +213,6 @@ def read_Bilinear_hd5(path, filestem, ens_id, order='F', idl=None):
|
||||||
imag = Obs([rolled_array[si, sj, ci, cj].imag], [ens_id], idl=[idx])
|
imag = Obs([rolled_array[si, sj, ci, cj].imag], [ens_id], idl=[idx])
|
||||||
matrix[si, sj, ci, cj] = CObs(real, imag)
|
matrix[si, sj, ci, cj] = CObs(real, imag)
|
||||||
|
|
||||||
result_dict[key] = Npr_matrix(matrix.swapaxes(1, 2).reshape((12, 12), order=order), mom_in=mom_in, mom_out=mom_out)
|
result_dict[key] = Npr_matrix(matrix.swapaxes(1, 2).reshape((12, 12), order='F'), mom_in=mom_in, mom_out=mom_out)
|
||||||
|
|
||||||
return result_dict
|
return result_dict
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue