Skip to content

Commit

Permalink
Enabling the rate calculation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheshuk committed Oct 25, 2024
1 parent eaf45db commit 69e0d23
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 3 additions & 2 deletions python/snewpy/test/test_04_xforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ def test_QuantumDecoherence_IMO(self, t, E):
assert (np.allclose(P['x_bar','x_bar'], 1. - 0.5*(1 - prob_eebar)))
assert (np.allclose(P['x_bar','e_bar'], 0.5*(1. - prob_eebar)))


@pytest.mark.BEMEWS
def test_EarthMatter_NMO(self):
"""Earth matter effects with normal ordering.
"""
Expand Down Expand Up @@ -708,7 +708,8 @@ def test_EarthMatter_NMO(self):
[0.24584477, 0.3366807, 0.41747453, 0., 0., 0., ],
[0., 0., 0., 0.24407448, 0.33845361, 0.41747191]])
assert np.allclose(Pfm[:,:,0].array, m.T)


@pytest.mark.BEMEWS
def test_EarthMatter_IMO(self):
"""Earth matter effects with normal ordering.
"""
Expand Down
3 changes: 1 addition & 2 deletions python/snewpy/test/test_rate_calculation.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ def fluence(snmodel):
flavor_xform=ft.AdiabaticMSW(MixingParameters('NORMAL')))
return flux.integrate('time')

@pytest.mark.xfail(reason="Fluence calculation uses `get_transformed_flux`, which is currently hard coded to a TwoFlavor scheme.", raises=AttributeError)
@pytest.mark.parametrize('detector, expected_total',crosscheck_table_unsmeared)
def test_rate_unsmeared(rc, fluence, detector, expected_total):
#calculate the event rates
Expand All @@ -55,7 +54,7 @@ def test_rate_unsmeared(rc, fluence, detector, expected_total):
#check the final value
assert N_total == pytest.approx(expected_total, 0.01)

@pytest.mark.xfail(reason="Fluence calculation uses `get_transformed_flux`, which is currently hard coded to a TwoFlavor scheme.", raises=AttributeError)

@pytest.mark.parametrize('detector, expected_total',crosscheck_table)
def test_rate_smeared(rc, fluence, detector, expected_total):
#calculate the event rates
Expand Down

0 comments on commit 69e0d23

Please sign in to comment.