From db94a49d76539033e23f147d13c73153a5eb71ad Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Fri, 12 Nov 2021 15:13:50 +0000 Subject: [PATCH] added special case for tau_exp error analysis and less than 8 samples --- pyerrors/obs.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyerrors/obs.py b/pyerrors/obs.py index 2b4398cf..ed3c23a2 100644 --- a/pyerrors/obs.py +++ b/pyerrors/obs.py @@ -264,6 +264,8 @@ class Obs: # if type(self.idl[e_name]) is range: # scale tau_exp according to step size # texp /= self.idl[e_name].step # Critical slowing down analysis + if w_max // 2 <= 1: + raise Exception("Need at least 8 samples for tau_exp error analysis") for n in range(1, w_max // 2): _compute_drho(n + 1) if (self.e_rho[e_name][n] - self.N_sigma[e_name] * self.e_drho[e_name][n]) < 0 or n >= w_max // 2 - 2: