示例#1
0
def get_z2_label(phas, prof):
    good = phas < 1
    z2 = z_n(phas[good], n=2, norm=prof[good])
    z2_detlev = z2_n_detection_level(n=2)
    z2_label = r'$Z_2^2 = {:.1f} (90\% det. lev. {:.1f})$'.format(
        z2, z2_detlev)
    return z2_label
示例#2
0
 def test_zn_detection_level(self):
     np.testing.assert_almost_equal(z2_n_detection_level(2),
                                    13.276704135987625)
     np.testing.assert_almost_equal(z2_n_detection_level(4, 0.01, ntrial=2),
                                    z2_n_detection_level(4, 0.01/2))
示例#3
0
 def test_zn_probability(self):
     detlev = z2_n_detection_level(2, 0.1, ntrial=3)
     np.testing.assert_almost_equal(z2_n_probability(detlev, 2, ntrial=3),
                                    0.1)