mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-03-15 06:40:24 +01:00
fix: loop range in standard windowing procedure adjusted by gapsize
- Test added Co-authored-by: Simon Kuberski <simon.kuberski@uni-muenster.de>
This commit is contained in:
parent
e85d7dfde6
commit
d81d6ea0b8
2 changed files with 6 additions and 2 deletions
|
@ -323,8 +323,8 @@ class Obs:
|
|||
# Standard automatic windowing procedure
|
||||
tau = self.S[e_name] / np.log((2 * self.e_n_tauint[e_name][gapsize::gapsize] + 1) / (2 * self.e_n_tauint[e_name][gapsize::gapsize] - 1))
|
||||
g_w = np.exp(- np.arange(1, len(tau) + 1) / tau) - tau / np.sqrt(np.arange(1, len(tau) + 1) * e_N)
|
||||
for n in range(1, w_max):
|
||||
if g_w[n - 1] < 0 or n >= w_max - 1:
|
||||
for n in range(1, w_max // gapsize):
|
||||
if g_w[n - 1] < 0 or n >= w_max // gapsize - 1:
|
||||
_compute_drho(gapsize * n)
|
||||
n *= gapsize
|
||||
self.e_tauint[e_name] = self.e_n_tauint[e_name][n] * (1 + (2 * n / gapsize + 1) / e_N) / (1 + 1 / e_N) # Bias correction hep-lat/0306017 eq. (49)
|
||||
|
|
|
@ -1152,3 +1152,7 @@ def test_nan_obs():
|
|||
o = pe.pseudo_Obs(1, .1, 'test')
|
||||
no = np.nan * o
|
||||
no.gamma_method()
|
||||
|
||||
o.idl['test'] = [1, 5] + list(range(7, 2002, 2))
|
||||
no = np.NaN * o
|
||||
no.gamma_method()
|
||||
|
|
Loading…
Add table
Reference in a new issue