mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 11:33:42 +02:00
fix: corrected bias correction of tau_int for irregular chains
This commit is contained in:
parent
fd4c866fdd
commit
89b0c37e76
2 changed files with 32 additions and 7 deletions
|
@ -649,6 +649,25 @@ def test_gamma_method_irregular():
|
|||
ol = [a, b]
|
||||
o = (ol[0] - ol[1]) / (ol[1])
|
||||
|
||||
N = 1000
|
||||
dat = gen_autocorrelated_array(np.random.normal(1, .2, size=N), .8)
|
||||
|
||||
idl_a = list(range(0, 1001, 1))
|
||||
idl_a.remove(101)
|
||||
|
||||
oa = pe.Obs([dat], ["ens1"], idl=[idl_a])
|
||||
oa.gamma_method()
|
||||
tau_a = oa.e_tauint["ens1"]
|
||||
|
||||
idl_b = list(range(0, 10010, 10))
|
||||
idl_b.remove(1010)
|
||||
|
||||
ob = pe.Obs([dat], ["ens1"], idl=[idl_b])
|
||||
ob.gamma_method()
|
||||
tau_b = ob.e_tauint["ens1"]
|
||||
|
||||
assert np.isclose(tau_a, tau_b)
|
||||
|
||||
|
||||
def test_covariance_is_variance():
|
||||
value = np.random.normal(5, 10)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue