Ejemplo n.º 1
0
import sys
sys.path.append('../src')

import numpy as np

import oscprob3nu
import hamiltonians3nu
from globaldefs import *

energy = 1.e9  # Neutrino energy [eV]
baseline = 1.3e3  # Baseline [km]

h_vacuum_energy_indep = \
    hamiltonians3nu.hamiltonian_3nu_vacuum_energy_independent(  S12_NO_BF,
                                                                S23_NO_BF,
                                                                S13_NO_BF,
                                                                DCP_NO_BF,
                                                                D21_NO_BF,
                                                                D31_NO_BF)

# Units of VCC_EARTH_CRUST: [eV]
h_matter = hamiltonians3nu.hamiltonian_3nu_matter(h_vacuum_energy_indep,
                                                  energy, VCC_EARTH_CRUST)

Pee, Pem, Pet, Pme, Pmm, Pmt, Pte, Ptm, Ptt = \
    oscprob3nu.probabilities_3nu(h_matter, baseline*CONV_KM_TO_INV_EV)

print("Pee = %6.5f, Pem = %6.5f, Pet = %6.5f" % (Pee, Pem, Pet))
print("Pme = %6.5f, Pmm = %6.5f, Pmt = %6.5f" % (Pme, Pmm, Pmt))
print("Pte = %6.5f, Ptm = %6.5f, Ptt = %6.5f" % (Pte, Ptm, Ptt))
Ejemplo n.º 2
0
                                                energy*1.e9,
                                                VCC_EARTH_CRUST,
                                                EPS_3)
        label_case = r'NSI'

    elif (case.lower() == 'liv'):

        hamiltonian = hamiltonians3nu.hamiltonian_3nu_liv( \
                                                h_vacuum_energy_independent,
                                                energy*1.e9,
                                                SXI12, SXI23, SXI13, DXICP,
                                                B1, B2, B3, LAMBDA)
        label_case = r'CPT-odd LIV'

    # Each element of prob: [Pee, Pem, Pet, Pme, Pmm, Pmt, Pte, Ptm, Ptt]
    prob = [oscprob3nu.probabilities_3nu(   hamiltonian,
                                            l*CONV_KM_TO_INV_EV) \
            for l in l_val]
    prob_ee = [x[0] for x in prob]
    prob_em = [x[1] for x in prob]
    prob_et = [x[2] for x in prob]
    prob_me = [x[3] for x in prob]
    prob_mm = [x[4] for x in prob]
    prob_mt = [x[5] for x in prob]
    prob_te = [x[6] for x in prob]
    prob_tm = [x[7] for x in prob]
    prob_tt = [x[8] for x in prob]

    # Formatting
    mpl.rcParams['xtick.labelsize'] = 26
    mpl.rcParams['ytick.labelsize'] = 26
    mpl.rcParams['legend.fontsize'] = 26
Ejemplo n.º 3
0
sys.path.append('../src')

import numpy as np

import oscprob3nu
import hamiltonians3nu
from globaldefs import *

energy = 1.e9  # Neutrino energy [eV]
baseline = 1.3e3  # Baseline [km]

h_vacuum_energy_indep = \
    hamiltonians3nu.hamiltonian_3nu_vacuum_energy_independent(  S12_NO_BF,
                                                                S23_NO_BF,
                                                                S13_NO_BF,
                                                                DCP_NO_BF,
                                                                D21_NO_BF,
                                                                D31_NO_BF)

# EPS_3 is the 3x3 matrix of NSI strength parameters, read from
# globaldefs; see that file to find the values
h_nsi = hamiltonians3nu.hamiltonian_3nu_nsi(h_vacuum_energy_indep, energy,
                                            VCC_EARTH_CRUST, EPS_3)

Pee, Pem, Pet, Pme, Pmm, Pmt, Pte, Ptm, Ptt = \
    oscprob3nu.probabilities_3nu(h_nsi, baseline*CONV_KM_TO_INV_EV)

print("Pee = %6.5f, Pem = %6.5f, Pet = %6.5f" % (Pee, Pem, Pet))
print("Pme = %6.5f, Pmm = %6.5f, Pmt = %6.5f" % (Pme, Pmm, Pmt))
print("Pte = %6.5f, Ptm = %6.5f, Ptt = %6.5f" % (Pte, Ptm, Ptt))
Ejemplo n.º 4
0
sys.path.append('../src')

import numpy as np

import oscprob3nu
import hamiltonians3nu
from globaldefs import *

energy = 1.e9     # Neutrino energy [eV]
baseline = 1.3e3  # Baseline [km]

# Use the NuFit 4.0 best-fit values of the mixing parameters pulled from
# globaldefs.  NO means "normal ordering"; change NO to IO if you want
# to use inverted ordering.
h_vacuum_energy_indep = \
    hamiltonians3nu.hamiltonian_3nu_vacuum_energy_independent(  S12_NO_BF,
                                                                S23_NO_BF,
                                                                S13_NO_BF,
                                                                DCP_NO_BF,
                                                                D21_NO_BF,
                                                                D31_NO_BF)
h_vacuum = np.multiply(1./energy, h_vacuum_energy_indep)

# CONV_KM_TO_INV_EV is pulled from globaldefs; it converts km to eV^{-1}
Pee, Pem, Pet, Pme, Pmm, Pmt, Pte, Ptm, Ptt = \
    oscprob3nu.probabilities_3nu( h_vacuum, baseline*CONV_KM_TO_INV_EV)

print("Pee = %6.5f, Pem = %6.5f, Pet = %6.5f" % (Pee, Pem, Pet))
print("Pme = %6.5f, Pmm = %6.5f, Pmt = %6.5f" % (Pme, Pmm, Pmt))
print("Pte = %6.5f, Ptm = %6.5f, Ptt = %6.5f" % (Pte, Ptm, Ptt))
def plot_probability_3nu_vs_energy_compare(output_format='pdf',
                                           output_path='./fig/'):
    r"""Generates and saves a plot of 3nu probabilities vs. energy.

    Generates and saves a plot of three-neutrino probabilities vs.
    energy for oscillations in vacuum, matter, with NSI, and with
    CPT-odd LIV.  This is the same plot that is included in the paper.

    Parameters
    ----------
    output_format : str, optional
        File extension of the plot to save (e.g., 'pdf', 'png', 'jpg').
    output_path : str, optional
        File path where to save the plot.

    Returns
    -------
    None
        The plot is generated and saved.
    """
    # Baseline (DUNE)
    l = 1.3e3 * CONV_KM_TO_INV_EV  # [eV^{-1}]

    # Neutrino energies
    log10_energy_nu_min = log10(5.e-1)  # [GeV]
    log10_energy_nu_max = log10(3.e1)  # [GeV]
    log10_energy_nu_npts = 400
    log10_energy_nu = np.linspace(log10_energy_nu_min, log10_energy_nu_max,
                                  log10_energy_nu_npts)
    energy_nu = [10.**x for x in log10_energy_nu]  # [GeV]

    # Plot formatting
    mpl.rcParams['xtick.labelsize'] = 28
    mpl.rcParams['ytick.labelsize'] = 28
    mpl.rcParams['legend.fontsize'] = 21
    mpl.rcParams['legend.borderpad'] = 0.4
    mpl.rcParams['axes.labelpad'] = 10
    mpl.rcParams['ps.fonttype'] = 42
    mpl.rcParams['pdf.fonttype'] = 42

    fig, axes = plt.subplots(3, 1, figsize=[8, 15])
    fig.subplots_adjust(hspace=0.05, wspace=0.05)

    h_vacuum_energy_indep = \
        hamiltonians3nu.hamiltonian_3nu_vacuum_energy_independent(  S12_NO_BF,
                                                                    S23_NO_BF,
                                                                    S13_NO_BF,
                                                                    DCP_NO_BF,
                                                                    D21_NO_BF,
                                                                    D31_NO_BF)

    prob_vacuum = [oscprob3nu.probabilities_3nu( \
                    np.multiply(1./x/1.e9, h_vacuum_energy_indep), l) \
                    for x in energy_nu]

    # Uncomment to compare to the probability computed with the standard
    # ocillation formula in vacuum
    # U = hamiltonians3nu.pmns_mixing_matrix( S12_NO_BF,
    #                                         S23_NO_BF,
    #                                         S13_NO_BF,
    #                                         DCP_NO_BF)
    # prob_vacuum_std = [hamiltonians3nu.probabilities_3nu_vacuum_std( \
    #                     U, D21_BF, D31_BF, x, l/CONV_KM_TO_INV_EV) \
    #                 for x in energy_nu]

    prob_matter = [oscprob3nu.probabilities_3nu( \
                    hamiltonians3nu.hamiltonian_3nu_matter( \
                        h_vacuum_energy_indep, x*1.e9, VCC_EARTH_CRUST), l)
                    for x in energy_nu]

    # eps = eps_ee, eps_em, eps_et, eps_mm, eps_mt, eps_tt
    prob_nsi = [oscprob3nu.probabilities_3nu( \
                    hamiltonians3nu.hamiltonian_3nu_nsi( \
                        h_vacuum_energy_indep, x*1.e9, VCC_EARTH_CRUST, EPS_3),
                        l)
                for x in energy_nu]

    prob_liv = [oscprob3nu.probabilities_3nu( \
                    hamiltonians3nu.hamiltonian_3nu_liv( \
                        h_vacuum_energy_indep, x*1.e9, SXI12, SXI23, SXI13,
                        DXICP, B1, B2, B3, LAMBDA), l)
                for x in energy_nu]

    # Pee, Pem, Pet, Pme, Pmm, Pmt, Pte, Ptm, Ptt
    for i, ax in enumerate(np.array(axes).reshape((1, 3))[0]):

        if (i == 0):  # Pee

            p_vacuum = [x[0] for x in prob_vacuum]
            # p_vacuum_std = [x[0] for x in prob_vacuum_std]
            p_matter = [x[0] for x in prob_matter]
            p_nsi = [x[0] for x in prob_nsi]
            p_liv = [x[0] for x in prob_liv]

            ylabel = r'$P_{\nu_e \to \nu_e}$'

        elif (i == 1):  # Pme

            p_vacuum = [x[3] for x in prob_vacuum]
            # p_vacuum_std = [x[3] for x in prob_vacuum_std]
            p_matter = [x[3] for x in prob_matter]
            p_nsi = [x[3] for x in prob_nsi]
            p_liv = [x[3] for x in prob_liv]

            ylabel = r'$P_{\nu_\mu \to \nu_e}$'

        elif (i == 2):  # Pmm

            p_vacuum = [x[4] for x in prob_vacuum]
            # p_vacuum_std = [x[4] for x in prob_vacuum_std]
            p_matter = [x[4] for x in prob_matter]
            p_nsi = [x[4] for x in prob_nsi]
            p_liv = [x[4] for x in prob_liv]

            ylabel = r'$P_{\nu_\mu \to \nu_\mu}$'
            ax.set_xlabel(r'Neutrino energy [GeV]', fontsize=27)

        ax.set_ylabel(ylabel, fontsize=27)

        ax.plot(energy_nu,
                p_vacuum,
                color='C0',
                ls='-',
                lw=3.0,
                zorder=1,
                label=r'Vacuum')
        # ax.plot(energy_nu, p_vacuum_std, color='k', ls='-', lw=3.0, zorder=1,
        # label=r'Vacuum std.')
        ax.plot(energy_nu,
                p_matter,
                color='C1',
                ls='--',
                lw=3.0,
                zorder=1,
                label=r'Matter')
        ax.plot(energy_nu,
                p_nsi,
                color='C2',
                ls=':',
                lw=3.0,
                zorder=1,
                label=r'NSI')
        ax.plot(energy_nu,
                p_liv,
                color='C3',
                ls='-.',
                lw=3.0,
                zorder=1,
                label=r'CPT-odd LIV')

        ax.tick_params('both', length=10, width=2, which='major')
        ax.tick_params('both', length=5, width=1, which='minor')
        ax.tick_params(axis='both', which='major', pad=10, direction='in')
        ax.tick_params(axis='both', which='minor', pad=10, direction='in')
        ax.tick_params(axis='x', which='minor', bottom=True)
        ax.tick_params(axis='x', which='minor', top=True)
        ax.tick_params(axis='y', which='minor', left=True)
        ax.tick_params(axis='y', which='minor', right=True)
        ax.tick_params(bottom=True, top=True, left=True, right=True)

        ax.set_xlim([10.**log10_energy_nu_min, 10.**log10_energy_nu_max])
        ax.set_xscale('log')

        if (i == 0):

            ax.set_xticklabels([])
            ax_yticks_major = np.array([0.85, 0.90, 0.95, 1.00])
            ax.set_yticks(ax_yticks_major, minor=False)
            ax_yticks_minor = np.array([
                0.86, 0.87, 0.88, 0.89, 0.91, 0.92, 0.93, 0.94, 0.96, 0.97,
                0.98, 0.99
            ])
            ax.set_yticks(ax_yticks_minor, minor=True)
            ax.set_ylim([0.85, 1.00])
            ax.legend(loc='lower right',
                      ncol=1,
                      frameon=False,
                      columnspacing=1.)

        elif (i == 1):

            ax.set_xticklabels([])
            ax_yticks_major = np.array([0.00, 0.05, 0.10])
            ax.set_yticks(ax_yticks_major, minor=False)
            ax_yticks_minor = np.array(
                [0.01, 0.02, 0.03, 0.04, 0.06, 0.07, 0.08, 0.09, 0.11, 0.12])
            ax.set_yticks(ax_yticks_minor, minor=True)
            ax.set_ylim([0.00, 0.12])

        elif (i == 2):

            ax_yticks_major = np.array([0.00, 0.25, 0.50, 0.75])
            ax.set_yticks(ax_yticks_major, minor=False)
            ax_yticks_minor = np.array([
                0.05, 0.10, 0.15, 0.20, 0.30, 0.35, 0.40, 0.45, 0.55, 0.60,
                0.65, 0.70, 0.80, 0.85, 0.90, 0.95
            ])
            ax.set_yticks(ax_yticks_minor, minor=True)
            ax.set_ylim([0.0, 1.0])

        pylab.savefig(output_path + 'prob_3nu_vs_energy_compare.' +
                      output_format,
                      bbox_inches='tight',
                      dpi=300)

    return
Ejemplo n.º 6
0
   a fast general-purpose computation method for two and three neutrino
   flavors", arXiv:1904.XXXXX.

Created: 2019/04/29 23:22
Last modified: 2019/04/29 23:22
"""

from __future__ import print_function

__version__ = "1.0"
__author__ = "Mauricio Bustamante"
__email__ = "*****@*****.**"

import sys
sys.path.append('../src')

import oscprob3nu

hamiltonian = [[1.0 + 0.0j, 0.0 + 2.0j, 0.0 - 1.0j],
               [0.0 - 2.0j, 3.0 + 0.0j, 3.0 + 0.0j],
               [0.0 + 1.0j, 3.0 - 0.0j, 5.0 + 0.0j]]

L = 1.0

Pee, Pem, Pet, Pme, Pmm, Pmt, Pte, Ptm, Ptt = \
    oscprob3nu.probabilities_3nu(hamiltonian, L)

print("Pee = %6.5f, Pem = %6.5f, Pet = %6.5f" % (Pee, Pem, Pet))
print("Pme = %6.5f, Pmm = %6.5f, Pmt = %6.5f" % (Pme, Pmm, Pmt))
print("Pte = %6.5f, Ptm = %6.5f, Ptt = %6.5f" % (Pte, Ptm, Ptt))