From 36fa95a4483d3fefc5e3253b004543ee41d5ecac Mon Sep 17 00:00:00 2001 From: fjosw Date: Wed, 19 Oct 2022 12:10:25 +0000 Subject: [PATCH] Documentation updated --- docs/pyerrors/obs.html | 132 ++++++++++++++++++++--------------------- 1 file changed, 66 insertions(+), 66 deletions(-) diff --git a/docs/pyerrors/obs.html b/docs/pyerrors/obs.html index c785ea95..9fb087b0 100644 --- a/docs/pyerrors/obs.html +++ b/docs/pyerrors/obs.html @@ -466,29 +466,29 @@ 267 self.e_windowsize[e_name] = 0 268 continue 269 - 270 self.e_rho[e_name] = e_gamma[e_name][:w_max] / e_gamma[e_name][0] - 271 self.e_n_tauint[e_name] = np.cumsum(np.concatenate(([0.5], self.e_rho[e_name][1:]))) - 272 # Make sure no entry of tauint is smaller than 0.5 - 273 self.e_n_tauint[e_name][self.e_n_tauint[e_name] <= 0.5] = 0.5 + np.finfo(np.float64).eps - 274 # hep-lat/0306017 eq. (42) - 275 self.e_n_dtauint[e_name] = self.e_n_tauint[e_name] * 2 * np.sqrt(np.abs(np.arange(w_max) + 0.5 - self.e_n_tauint[e_name]) / e_N) - 276 self.e_n_dtauint[e_name][0] = 0.0 - 277 - 278 def _compute_drho(i): - 279 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] - 280 self.e_drho[e_name][i] = np.sqrt(np.sum(tmp ** 2) / e_N) + 270 gaps = [] + 271 for r_name in e_content[e_name]: + 272 if isinstance(self.idl[r_name], range): + 273 gaps.append(1) + 274 else: + 275 gaps.append(np.min(np.diff(self.idl[r_name]))) + 276 + 277 if not np.all([gi == gaps[0] for gi in gaps]): + 278 raise Exception(f"Replica for ensemble {e_name} are not equally spaced.", gaps) + 279 else: + 280 gapsize = gaps[0] 281 - 282 gaps = [] - 283 for r_name in e_content[e_name]: - 284 if isinstance(self.idl[r_name], range): - 285 gaps.append(1) - 286 else: - 287 gaps.append(np.min(np.diff(self.idl[r_name]))) - 288 - 289 if not np.all([gi == gaps[0] for gi in gaps]): - 290 raise Exception(f"Replica for ensemble {e_name} are not equally spaced.", gaps) - 291 else: - 292 gapsize = gaps[0] + 282 self.e_rho[e_name] = e_gamma[e_name][:w_max] / e_gamma[e_name][0] + 283 self.e_n_tauint[e_name] = np.cumsum(np.concatenate(([0.5], self.e_rho[e_name][1:]))) + 284 # Make sure no entry of tauint is smaller than 0.5 + 285 self.e_n_tauint[e_name][self.e_n_tauint[e_name] <= 0.5] = 0.5 + np.finfo(np.float64).eps + 286 # hep-lat/0306017 eq. (42) + 287 self.e_n_dtauint[e_name] = self.e_n_tauint[e_name] * 2 * np.sqrt(np.abs(np.arange(w_max) / gapsize + 0.5 - self.e_n_tauint[e_name]) / e_N) + 288 self.e_n_dtauint[e_name][0] = 0.0 + 289 + 290 def _compute_drho(i): + 291 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] + 292 self.e_drho[e_name][i] = np.sqrt(np.sum(tmp ** 2) / e_N) 293 294 _compute_drho(gapsize) 295 if self.tau_exp[e_name] > 0: @@ -2146,29 +2146,29 @@ 268 self.e_windowsize[e_name] = 0 269 continue 270 -271 self.e_rho[e_name] = e_gamma[e_name][:w_max] / e_gamma[e_name][0] -272 self.e_n_tauint[e_name] = np.cumsum(np.concatenate(([0.5], self.e_rho[e_name][1:]))) -273 # Make sure no entry of tauint is smaller than 0.5 -274 self.e_n_tauint[e_name][self.e_n_tauint[e_name] <= 0.5] = 0.5 + np.finfo(np.float64).eps -275 # hep-lat/0306017 eq. (42) -276 self.e_n_dtauint[e_name] = self.e_n_tauint[e_name] * 2 * np.sqrt(np.abs(np.arange(w_max) + 0.5 - self.e_n_tauint[e_name]) / e_N) -277 self.e_n_dtauint[e_name][0] = 0.0 -278 -279 def _compute_drho(i): -280 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] -281 self.e_drho[e_name][i] = np.sqrt(np.sum(tmp ** 2) / e_N) +271 gaps = [] +272 for r_name in e_content[e_name]: +273 if isinstance(self.idl[r_name], range): +274 gaps.append(1) +275 else: +276 gaps.append(np.min(np.diff(self.idl[r_name]))) +277 +278 if not np.all([gi == gaps[0] for gi in gaps]): +279 raise Exception(f"Replica for ensemble {e_name} are not equally spaced.", gaps) +280 else: +281 gapsize = gaps[0] 282 -283 gaps = [] -284 for r_name in e_content[e_name]: -285 if isinstance(self.idl[r_name], range): -286 gaps.append(1) -287 else: -288 gaps.append(np.min(np.diff(self.idl[r_name]))) -289 -290 if not np.all([gi == gaps[0] for gi in gaps]): -291 raise Exception(f"Replica for ensemble {e_name} are not equally spaced.", gaps) -292 else: -293 gapsize = gaps[0] +283 self.e_rho[e_name] = e_gamma[e_name][:w_max] / e_gamma[e_name][0] +284 self.e_n_tauint[e_name] = np.cumsum(np.concatenate(([0.5], self.e_rho[e_name][1:]))) +285 # Make sure no entry of tauint is smaller than 0.5 +286 self.e_n_tauint[e_name][self.e_n_tauint[e_name] <= 0.5] = 0.5 + np.finfo(np.float64).eps +287 # hep-lat/0306017 eq. (42) +288 self.e_n_dtauint[e_name] = self.e_n_tauint[e_name] * 2 * np.sqrt(np.abs(np.arange(w_max) / gapsize + 0.5 - self.e_n_tauint[e_name]) / e_N) +289 self.e_n_dtauint[e_name][0] = 0.0 +290 +291 def _compute_drho(i): +292 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] +293 self.e_drho[e_name][i] = np.sqrt(np.sum(tmp ** 2) / e_N) 294 295 _compute_drho(gapsize) 296 if self.tau_exp[e_name] > 0: @@ -2990,29 +2990,29 @@ list of ranges or lists on which the samples are defined 268 self.e_windowsize[e_name] = 0 269 continue 270 -271 self.e_rho[e_name] = e_gamma[e_name][:w_max] / e_gamma[e_name][0] -272 self.e_n_tauint[e_name] = np.cumsum(np.concatenate(([0.5], self.e_rho[e_name][1:]))) -273 # Make sure no entry of tauint is smaller than 0.5 -274 self.e_n_tauint[e_name][self.e_n_tauint[e_name] <= 0.5] = 0.5 + np.finfo(np.float64).eps -275 # hep-lat/0306017 eq. (42) -276 self.e_n_dtauint[e_name] = self.e_n_tauint[e_name] * 2 * np.sqrt(np.abs(np.arange(w_max) + 0.5 - self.e_n_tauint[e_name]) / e_N) -277 self.e_n_dtauint[e_name][0] = 0.0 -278 -279 def _compute_drho(i): -280 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] -281 self.e_drho[e_name][i] = np.sqrt(np.sum(tmp ** 2) / e_N) +271 gaps = [] +272 for r_name in e_content[e_name]: +273 if isinstance(self.idl[r_name], range): +274 gaps.append(1) +275 else: +276 gaps.append(np.min(np.diff(self.idl[r_name]))) +277 +278 if not np.all([gi == gaps[0] for gi in gaps]): +279 raise Exception(f"Replica for ensemble {e_name} are not equally spaced.", gaps) +280 else: +281 gapsize = gaps[0] 282 -283 gaps = [] -284 for r_name in e_content[e_name]: -285 if isinstance(self.idl[r_name], range): -286 gaps.append(1) -287 else: -288 gaps.append(np.min(np.diff(self.idl[r_name]))) -289 -290 if not np.all([gi == gaps[0] for gi in gaps]): -291 raise Exception(f"Replica for ensemble {e_name} are not equally spaced.", gaps) -292 else: -293 gapsize = gaps[0] +283 self.e_rho[e_name] = e_gamma[e_name][:w_max] / e_gamma[e_name][0] +284 self.e_n_tauint[e_name] = np.cumsum(np.concatenate(([0.5], self.e_rho[e_name][1:]))) +285 # Make sure no entry of tauint is smaller than 0.5 +286 self.e_n_tauint[e_name][self.e_n_tauint[e_name] <= 0.5] = 0.5 + np.finfo(np.float64).eps +287 # hep-lat/0306017 eq. (42) +288 self.e_n_dtauint[e_name] = self.e_n_tauint[e_name] * 2 * np.sqrt(np.abs(np.arange(w_max) / gapsize + 0.5 - self.e_n_tauint[e_name]) / e_N) +289 self.e_n_dtauint[e_name][0] = 0.0 +290 +291 def _compute_drho(i): +292 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] +293 self.e_drho[e_name][i] = np.sqrt(np.sum(tmp ** 2) / e_N) 294 295 _compute_drho(gapsize) 296 if self.tau_exp[e_name] > 0: