Exemple #1
0
 def test_100kV(self):
     """ Test that the interaction_parameter(100) is what is expected
     from Kirkland 2010 """
     self.assertAlmostEqual(interaction_parameter(100),
                            0.924 * 1e-3,
                            places=6)
Exemple #2
0
 def test_vectorized(self):
     """ Test that interaction_parameters() is vectorized """
     kV = np.full((64, ), fill_value=100.0)
     i = np.full_like(kV, fill_value=0.924 * 1e-3)
     self.assertTrue(np.allclose(interaction_parameter(kV), i, atol=1e-6))
def test_interaction_parameter_100kV():
    """Test that the interaction_parameter(100) is what is expected
    from Kirkland 2010"""
    assert round(abs(interaction_parameter(100) - 0.924 * 1e-3), 6) == 0