Exemplo n.º 1
0
def test_sigma_s_gh():
    # Tests stub
    b = pyne.data.b("H1")
    aw = pyne.data.atomic_mass("H1")
    E = np.logspace(-6, 1, 10)[::-1]
    E_centers = (E[1:] + E[:-1]) / 2.0
    expected = np.diag(pyne.xs.models.sigma_s(E_centers, b, aw, 600.0))
    observed = sigma_s_gh("H1", 600.0, group_struct=E)
    assert_array_equal(expected, observed)
Exemplo n.º 2
0
def test_sigma_s_gh():
    # Tests stub
    b = pyne.data.b('H1')
    aw = pyne.data.atomic_mass('H1')
    E = np.logspace(-6, 1, 10)[::-1]
    E_centers = (E[1:] + E[:-1]) / 2.0
    expected = np.diag(pyne.xs.models.sigma_s(E_centers, b, aw, 600.0))
    observed = sigma_s_gh('H1', 600.0, group_struct=E)
    assert_array_equal(expected, observed)
Exemplo n.º 3
0
def test_sigma_s_gh():
    # Tests stub
    b = pyne.data.b('H1')
    aw = pyne.data.nuc_weight('H1')
    E = np.logspace(-6, 1, 10)[::-1]
    E_centers = (E[1:] + E[:-1]) / 2.0
    expected = np.diag(pyne.xs.models.sigma_s(E_centers, b, aw, 600.0))
    observed = sigma_s_gh('H1', 600.0, E_g=E)
    assert_array_equal(expected, observed)
Exemplo n.º 4
0
def test_sigma_s():
    E_g = np.logspace(-6, 1, 10)[::-1]
    expected = sigma_s_gh("H1", 600.0, E_g).sum(axis=1)
    observed = sigma_s("H1", 600.0, E_g)
    assert_array_equal(expected, observed)
Exemplo n.º 5
0
def test_sigma_s():
    E_g = np.logspace(-6, 1, 10)[::-1]
    expected = sigma_s_gh('H1', 600.0, E_g).sum(axis=1)
    observed = sigma_s('H1', 600.0, E_g)
    assert_array_equal(expected, observed)