def test_int_linlin_interpolation_2(): endfds = ENDFDataSource(tape1path) obs = endfds.integrate_dst_group((1, 5), np.array([3, 5, 8]), {3: 2, 5: 2, 8:1}, np.array([0., 2, 4, 6, 8]), np.array([0., 1, 0, 0, 0])) exp = (0.75 + 1) / 4 assert_equal(exp, obs)
def test_int_hist_only_interpolate_one_endpoint(): endfds = ENDFDataSource(tape1path) obs = endfds.integrate_dst_group((1, 5), np.array([2, 5, 8]), {2: 1, 5: 1, 8:1}, np.array([0., 2, 4, 6, 8]), np.array([0., 1, 0, 0, 0])) exp = 0.5 assert_equal(exp, obs)