Esempio n. 1
0
def test_trochi():

    std = 7. / 4
    g = TrOchi(sigma=std, ysigma=std)
    assert_array_almost_equal(g.dist2gauss(), 1.4106988010566603)
    assert_array_almost_equal(g.mean, 0.0)
    assert_array_almost_equal(g.sigma, 1.75)
    vals = g.dat2gauss([0, 1, 2, 3])
    true_vals = np.array(
        [6.21927960e-04, 9.90237621e-01, 1.96075606e+00, 2.91254576e+00])
    assert_array_almost_equal(vals, true_vals)
Esempio n. 2
0
def test_trochi():

    std = 7. / 4
    g = TrOchi(sigma=std, ysigma=std)
    assert_array_almost_equal(g.dist2gauss(), 1.4106988010566603)
    assert_array_almost_equal(g.mean, 0.0)
    assert_array_almost_equal(g.sigma, 1.75)
    vals = g.dat2gauss([0, 1, 2, 3])
    true_vals = np.array([6.21927960e-04, 9.90237621e-01, 1.96075606e+00,
                          2.91254576e+00])
    assert_array_almost_equal(vals, true_vals)
Esempio n. 3
0
def test_trochi():
    
    std = 7./4
    g = TrOchi(sigma=std, ysigma=std)
    assert(g.dist2gauss()== 1.4106988010566603)
    assert(g.mean== 0.0)
    assert(g.sigma==1.75)
    vals = g.dat2gauss([0,1,2,3])
    true_vals = np.array([  6.21927960e-04,   9.90237621e-01,   1.96075606e+00,
             2.91254576e+00])
    assert((np.abs(vals-true_vals)<1e-7).all())
Esempio n. 4
0
def test_trochi():

    std = 7. / 4
    g = TrOchi(sigma=std, ysigma=std)
    assert (g.dist2gauss() == 1.4106988010566603)
    assert (g.mean == 0.0)
    assert (g.sigma == 1.75)
    vals = g.dat2gauss([0, 1, 2, 3])
    true_vals = np.array(
        [6.21927960e-04, 9.90237621e-01, 1.96075606e+00, 2.91254576e+00])
    assert ((np.abs(vals - true_vals) < 1e-7).all())