def style(nu): """Return the line style to use for a given neutrino flavour.""" if oscillations.isNeutrino(nu): return 1 elif oscillations.isAntiNeutrino(nu): return 7 else: raise ValueError("Invalid neutrino/anti-neutrino enum.")
def setUp(self): # Example experiment oscillations self.osc = oscillations.Oscillations() self.osc.setL(295.0 * oscillations.units.km ) self.osc.setE(0.6 * oscillations.units.GeV) self.osc.setDeltaM21( 7.50e-5 * oscillations.units.eV2 ) self.osc.setDeltaM32( 2.32e-3 * oscillations.units.eV2 ) self.osc.setTheta12( 33.9 * oscillations.units.degrees ) self.osc.setTheta13( 9.1 * oscillations.units.degrees ) self.osc.setTheta23( 45.0 * oscillations.units.degrees ) self.osc.setDeltaCP( 0.0 * oscillations.units.degrees ) # get an index which does not represent a neutrino or anti-neutrino non_nu = 1 while( oscillations.isNeutrino(non_nu) or oscillations.isAntiNeutrino(non_nu) ): non_nu += 1 self.non_neutrino = non_nu
def setUp(self): # Example experiment oscillations self.osc = oscillations.Oscillations() self.osc.setL(295.0 * oscillations.units.km) self.osc.setE(0.6 * oscillations.units.GeV) self.osc.setDeltaM21(7.50e-5 * oscillations.units.eV2) self.osc.setDeltaM32(2.32e-3 * oscillations.units.eV2) self.osc.setTheta12(33.9 * oscillations.units.degrees) self.osc.setTheta13(9.1 * oscillations.units.degrees) self.osc.setTheta23(45.0 * oscillations.units.degrees) self.osc.setDeltaCP(0.0 * oscillations.units.degrees) # get an index which does not represent a neutrino or anti-neutrino non_nu = 1 while (oscillations.isNeutrino(non_nu) or oscillations.isAntiNeutrino(non_nu)): non_nu += 1 self.non_neutrino = non_nu
def test_nuTauBarIsNotNeutrino(self): self.assertFalse(oscillations.isNeutrino(oscillations.nu_tau_bar))
def test_nuTauIsNeutrino(self): self.assertTrue(oscillations.isNeutrino(oscillations.nu_tau))
def test_nuEIsNeutrino(self): self.assertTrue(oscillations.isNeutrino(oscillations.nu_e))
def test_nuTauBarIsNotNeutrino(self): self.assertFalse( oscillations.isNeutrino( oscillations.nu_tau_bar ) )
def test_nuTauIsNeutrino(self): self.assertTrue( oscillations.isNeutrino( oscillations.nu_tau ) )
def test_nuEIsNeutrino(self): self.assertTrue( oscillations.isNeutrino( oscillations.nu_e ) )