mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 19:43:41 +02:00
fix: _compute_drho now also works for i > w_max / 2.
This commit is contained in:
parent
a2ed2653c6
commit
82adb215be
1 changed files with 3 additions and 1 deletions
|
@ -289,7 +289,9 @@ class Obs:
|
||||||
self.e_n_dtauint[e_name][0] = 0.0
|
self.e_n_dtauint[e_name][0] = 0.0
|
||||||
|
|
||||||
def _compute_drho(i):
|
def _compute_drho(i):
|
||||||
tmp = self.e_rho[e_name][i + 1:w_max] + np.concatenate([self.e_rho[e_name][i - 1::-1], self.e_rho[e_name][1:w_max - 2 * i]]) - 2 * self.e_rho[e_name][i] * self.e_rho[e_name][1:w_max - i]
|
tmp = (self.e_rho[e_name][i + 1:w_max]
|
||||||
|
+ np.concatenate([self.e_rho[e_name][i - 1:None if i - w_max // 2 < 0 else 2 * (i - w_max // 2):-1], self.e_rho[e_name][1:max(1, w_max - 2 * i)]])
|
||||||
|
- 2 * self.e_rho[e_name][i] * self.e_rho[e_name][1:w_max - i])
|
||||||
self.e_drho[e_name][i] = np.sqrt(np.sum(tmp ** 2) / e_N)
|
self.e_drho[e_name][i] = np.sqrt(np.sum(tmp ** 2) / e_N)
|
||||||
|
|
||||||
if self.tau_exp[e_name] > 0:
|
if self.tau_exp[e_name] > 0:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue