magnus.globaldefs

globaldefs.py

Contains physical constants and unit-conversion constants.

This module contains values of physical constants and unit-conversion factors used by the various modules of Magnus: unit conversions (km, cm, GeV, etc., to natural units of eV), fundamental constants (G_F, particle masses, Avogadro’s number), Earth/Sun radii and reference densities, flavor index constants (NUE, NUMU, NUTAU, NUS), predefined oscillation/NSI/LIV parameter sets (e.g., NuFit 6.0), and ANSI terminal color codes (class cstyle) used to format warning/error messages.

Routine listings

  • cstyle - ANSI terminal color-code constants

  • set_color_output - Enables or disables ANSI color in the warning

    and error message prefixes

  • load_nufit_params - Loads one NuFit release/ordering/category as a

    dict of standard oscillation parameters

The remaining module-level names are physical constants and unit-conversion factors, not routines; see the module source for the full list.

Attributes

WARNING_MSG_NO_COLOR

WARNING_MSG_IN_COLOR

ERROR_MSG_NO_COLOR

ERROR_MSG_IN_COLOR

TOL_MSG_NO_COLOR

TOL_MSG_IN_COLOR

MAGNUS_MAX_PREDEFINED_NUM_FLAVORS

Module-level constant

CONV_KM_TO_INV_EV

Module-level constant

UNIT_KM

Module-level constant

CONV_CM_TO_INV_EV

Module-level constant

UNIT_CM

Module-level constant

CONV_CM3_TO_INV_EV3

Module-level constant

UNIT_CM3

Module-level constant

CONV_INV_EV_TO_CM

Module-level constant

UNIT_PER_CM3

Module-level constant

CONV_EV_TO_G

Module-level constant

CONV_G_TO_EV

Module-level constant

UNIT_G_PER_CM3

Module-level constant

SQRT_OF_2

Module-level constant

GF

Module-level constant

MASS_ELECTRON

Module-level constant

MASS_PROTON

Module-level constant

MASS_NEUTRON

Module-level constant

ELECTRON_FRACTION_EARTH_CRUST

Module-level constant

DENSITY_MATTER_CRUST_G_PER_CM3

Module-level constant

N_AV

Module-level constant

NUM_DENSITY_E_EARTH_CRUST

Module-level constant

VCC_EARTH_CRUST

Module-level constant

EARTH_RADIUS

Module-level constant

SUN_RADIUS

Module-level constant

NUM_DENSITY_E_SUN_CENTRAL

Module-level constant

L_SCALE_SUN

Module-level constant

NUE

Module-level constant

NUMU

Module-level constant

NUTAU

Module-level constant

NUS

Module-level constant

NUS1

Module-level constant

NUS2

Module-level constant

UNIT_KEV

UNIT_MEV

UNIT_GEV

UNIT_TEV

UNIT_PEV

UNIT_EEV

S12_NO_BF_NUFIT_6_0

Module-level constant

S23_NO_BF_NUFIT_6_0

Module-level constant

S13_NO_BF_NUFIT_6_0

Module-level constant

DCP_NO_BF_NUFIT_6_0

Module-level constant

D21_NO_BF_NUFIT_6_0

Module-level constant

D31_NO_BF_NUFIT_6_0

Module-level constant

S12_IO_BF_NUFIT_6_0

Module-level constant

S23_IO_BF_NUFIT_6_0

Module-level constant

S13_IO_BF_NUFIT_6_0

Module-level constant

DCP_IO_BF_NUFIT_6_0

Module-level constant

D21_IO_BF_NUFIT_6_0

Module-level constant

D32_IO_BF_NUFIT_6_0

Module-level constant

D31_IO_BF_NUFIT_6_0

Module-level constant

OSC_PARAMS_NU_FIT_6_0_SK_NO

OSC_PARAMS_NU_FIT_6_0_SK_IO

OSC_PARAMS_PREDEFINED

EPS_EE

Module-level constant

EPS_EM

Module-level constant

EPS_ET

Module-level constant

EPS_MM

Module-level constant

EPS_MT

Module-level constant

EPS_TT

Module-level constant

EPS_2

Module-level constant

EPS_3

Module-level constant

SXI12

Module-level constant

SXI23

Module-level constant

SXI13

Module-level constant

DXICP

Module-level constant

B1

Module-level constant

B2

Module-level constant

B3

Module-level constant

LAMBDA

Module-level constant

NUFIT_GLOBAL_FITS

Classes

cstyle

ANSI escape-code constants for colored/styled terminal output.

Functions

set_color_output(→ None)

Enables or disables ANSI color in the warning/error/tolerance message prefixes.

load_nufit_params([version, ordering, category])

Load standard three-flavor mixing parameters from a NuFit global fit.

Module Contents

class magnus.globaldefs.cstyle[source]

ANSI escape-code constants for colored/styled terminal output.

Used to format the warning/error/tolerance messages printed by oscprob.py (e.g., gd.WARNING_MSG_IN_COLOR, gd.ERROR_MSG_IN_COLOR). Has no effect on Windows terminals unless os.system("") has been called first, which this module does at import time.

Added in version 1.0.0.

CEND = '\x1b[0m'[source]
CBOLD = '\x1b[1m'[source]
CITALIC = '\x1b[3m'[source]
CURL = '\x1b[4m'[source]
CBLINK2 = '\x1b[6m'[source]
CSELECTED = '\x1b[7m'[source]
CBLACK = '\x1b[30m'[source]
CRED = '\x1b[31m'[source]
CGREEN = '\x1b[32m'[source]
CYELLOW = '\x1b[33m'[source]
CBLUE = '\x1b[34m'[source]
CVIOLET = '\x1b[35m'[source]
CBEIGE = '\x1b[36m'[source]
CWHITE = '\x1b[37m'[source]
CBLACKBG = '\x1b[40m'[source]
CREDBG = '\x1b[41m'[source]
CGREENBG = '\x1b[42m'[source]
CYELLOWBG = '\x1b[43m'[source]
CBLUEBG = '\x1b[44m'[source]
CVIOLETBG = '\x1b[45m'[source]
CBEIGEBG = '\x1b[46m'[source]
CWHITEBG = '\x1b[47m'[source]
CGREY = '\x1b[90m'[source]
CRED2 = '\x1b[91m'[source]
CGREEN2 = '\x1b[92m'[source]
CYELLOW2 = '\x1b[93m'[source]
CBLUE2 = '\x1b[94m'[source]
CVIOLET2 = '\x1b[95m'[source]
CBEIGE2 = '\x1b[96m'[source]
CWHITE2 = '\x1b[97m'[source]
CGREYBG = '\x1b[100m'[source]
CREDBG2 = '\x1b[101m'[source]
CGREENBG2 = '\x1b[102m'[source]
CYELLOWBG2 = '\x1b[103m'[source]
CBLUEBG2 = '\x1b[104m'[source]
CVIOLETBG2 = '\x1b[105m'[source]
CBEIGEBG2 = '\x1b[106m'[source]
CWHITEBG2 = '\x1b[107m'[source]
magnus.globaldefs.WARNING_MSG_NO_COLOR = 'Warning:'[source]
magnus.globaldefs.WARNING_MSG_IN_COLOR = '\x1b[45mWarning:\x1b[0m'[source]
magnus.globaldefs.ERROR_MSG_NO_COLOR = 'Error in magnus:'[source]
magnus.globaldefs.ERROR_MSG_IN_COLOR = '\x1b[41mError in magnus:\x1b[0m'[source]
magnus.globaldefs.TOL_MSG_NO_COLOR = 'Requested tolerance achieved'[source]
magnus.globaldefs.TOL_MSG_IN_COLOR = '\x1b[42mRequested tolerance achieved\x1b[0m'[source]
magnus.globaldefs.set_color_output(enabled: bool) None[source]

Enables or disables ANSI color in the warning/error/tolerance message prefixes.

The *_IN_COLOR constants above wrap their text in ANSI escape codes, which read correctly in a terminal but appear as literal escape-code noise anywhere that does not interpret them – a captured log file, a Jupyter notebook rendered to HTML, or the jupyter-execute cells in this package’s own documentation. Calling this function with False rebinds every *_IN_COLOR constant to its plain-text counterpart, so the existing call sites (which all reference the *_IN_COLOR names) print unadorned text with no further change. Calling it with True restores the colored versions.

Added in version 1.0.0.

Parameters:

enabled (bool) – True to emit ANSI-colored message prefixes (the default at import time), False to emit plain text.

Return type:

None

Examples

import magnus.globaldefs as gd

gd.set_color_output(False)
gd.WARNING_MSG_IN_COLOR
'Warning:'
magnus.globaldefs.MAGNUS_MAX_PREDEFINED_NUM_FLAVORS = 5[source]

Module-level constant

Maximum number of flavors for which we have hard-coded routines in the oscprob module. Units: [Adimensional]

Type:

float

magnus.globaldefs.CONV_KM_TO_INV_EV = 5067730000.0[source]

Module-level constant

Multiplicative conversion factor from km to \(\text{eV}^{-1}\). Units: [\(\text{km}^{-1}~\text{eV}^{-1}\)].

Type:

float

magnus.globaldefs.UNIT_KM = 5067730000.0[source]

Module-level constant

Multiplicative conversion factor from km to \(\text{eV}^{-1}\). Alias for CONV_KM_TO_INV_EV. Units: [\(\text{km}^{-1}~\text{eV}^{-1}\)].

Type:

float

magnus.globaldefs.CONV_CM_TO_INV_EV = 50677.3[source]

Module-level constant

Multiplicative conversion factor from cm to \(\text{eV}^{-1}\). Units: [\(\text{cm}^{-1}~\text{eV}^{-1}\)]

Type:

float

magnus.globaldefs.UNIT_CM = 50677.3[source]

Module-level constant

Multiplicative conversion factor from cm to \(\text{eV}^{-1}\). Alias for CONV_CM_TO_INV_EV. Units: [\(\text{cm}^{-1}~\text{eV}^{-1}\)]

Type:

float

magnus.globaldefs.CONV_CM3_TO_INV_EV3[source]

Module-level constant

Multiplicative conversion factor from \(\text{cm}^{3}\) to \(\text{eV}^{-3}\). Units: [\(\text{cm}^{-3}~\text{eV}^{-3}\)]

Type:

float

magnus.globaldefs.UNIT_CM3[source]

Module-level constant

Multiplicative conversion factor from \(\text{cm}^{3}\) to \(\text{eV}^{-3}\). Alias for CONV_CM3_TO_INV_EV3. Units: [\(\text{cm}^{-3}~\text{eV}^{-3}\)]

Type:

float

magnus.globaldefs.CONV_INV_EV_TO_CM = 1.9732700834495916e-05[source]

Module-level constant

Multiplicative conversion factor from \(\text{eV}^{-1}\) to cm. Units: [eV cm]

Type:

float

magnus.globaldefs.UNIT_PER_CM3[source]

Module-level constant

Multiplicative conversion factor from \(\text{cm}^{-3}\) to \(\text{eV}^{3}\). Units: [\(\text{cm}^{3}~\text{eV}^{3}\)]

Type:

float

magnus.globaldefs.CONV_EV_TO_G = 1.783e-33[source]

Module-level constant

Multiplicative conversion factor from \(\text{eV}^{-1}\) to grams. Units: [\(\text{g eV}^{-1}\)]

Type:

float

magnus.globaldefs.CONV_G_TO_EV = 5.608524957936063e+32[source]

Module-level constant

Multiplicative conversion factor from grams to \(\text{eV}^{-1}\). Units: [\(\text{eV g}^{-1}\)]

Type:

float

magnus.globaldefs.UNIT_G_PER_CM3[source]

Module-level constant

Multiplicative conversion factor from \(\text{g cm}^{-3}\) to \(\text{eV}^{4}\). Units: [\(\text{g}^{-1}~\text{cm}^{3}~\text{eV}^{4}\)]

Type:

float

magnus.globaldefs.SQRT_OF_2[source]

Module-level constant

Square root of 2.. Units: [Adimensional]

Type:

float

magnus.globaldefs.GF = 1.1663787e-23[source]

Module-level constant

Fermi constant. Units: [\(\text{eV}^{-2}\)]

Type:

float

magnus.globaldefs.MASS_ELECTRON = 510998.9461[source]

Module-level constant

Electron mass. Units: [eV]

Type:

float

magnus.globaldefs.MASS_PROTON = 938272046.0[source]

Module-level constant

Proton mass. Units: [eV]

Type:

float

magnus.globaldefs.MASS_NEUTRON = 939565379.0[source]

Module-level constant

Neutron mass. Units: [eV]

Type:

float

magnus.globaldefs.ELECTRON_FRACTION_EARTH_CRUST = 0.5[source]

Module-level constant

Electron fraction in the Earth’s crust. Units: [Adimensional]

Type:

float

magnus.globaldefs.DENSITY_MATTER_CRUST_G_PER_CM3 = 3.0[source]

Module-level constant

Average matter density in the Earth’s crust. Units: [\(\text{g cm}^{-3}\)]

Type:

float

magnus.globaldefs.N_AV = 6.02214076e+23[source]

Module-level constant

Avogadro constant Units: [\(\text{mol}^{-1}\)]

Type:

float

magnus.globaldefs.NUM_DENSITY_E_EARTH_CRUST[source]

Module-level constant

Electron number density in the Earth’s crust Units: [\(\text{eV}^{3}\)]

Type:

float

magnus.globaldefs.VCC_EARTH_CRUST[source]

Module-level constant

Charged-current matter potential in the Earth’s crust. Units: [eV]

Type:

float

magnus.globaldefs.EARTH_RADIUS = 6371.0[source]

Module-level constant

Average Earth radius. Units: [km]

Type:

float

magnus.globaldefs.SUN_RADIUS = 694700.0[source]

Module-level constant

Average solar radius. Units: [km]

Type:

float

magnus.globaldefs.NUM_DENSITY_E_SUN_CENTRAL[source]

Module-level constant

Normalization of the standard exponential fit to the solar electron number density, \(n_e(r) = 245\,N_A\,\exp(-10.54\,r/R_\odot)\ \text{cm}^{-3}\).

This is the \(r \to 0\) intercept of that fit, not the central density of a solar model. The two differ by more than a factor of two: the BS2005-AGS,OP table gives \(n_e = 102.7\,N_A\ \text{cm}^{-3}\) at its innermost point \(r = 0.0016\,R_\odot\), against the fit’s 245, because the real profile flattens towards the centre while an exponential does not. Measured against that table across the whole star:

\(r/R_\odot\)

largest departure from it

0.00 – 0.05

fit high by 2.4x

0.05 – 0.10

fit high by 1.6x

0.10 – 0.20

21 %

0.20 – 0.30

2.5 %

0.30 – 0.70

11 %

0.70 – 1.00

up to 89 %

So the fit is a few-percent description only in a band around \(0.2\,R_\odot\), and the scale height L_SCALE_SUN – the span the package’s own diagnostics use as a trajectory – lies at \(0.095\,R_\odot\), where the fit is high by about 30 %. It is still the right constant for the exponential profile it normalizes; what would be wrong is reading it as a measurement of the Sun’s central density, or the exponential as a stand-in for a tabulated model in the core.

Units: [\(\text{eV}^{3}\)]

Type:

float

magnus.globaldefs.L_SCALE_SUN = 334018219259962.06[source]

Module-level constant

Scale height of the solar electron number density, \(R_\odot/10.54\), the decay length of the exponential fit normalized by NUM_DENSITY_E_SUN_CENTRAL.

Units: [\(\text{eV}^{-1}\)]

Type:

float

magnus.globaldefs.NUE = 0[source]

Module-level constant

Index used to denote nu_e flavor when computing probabilities. Units: [Adimensional]

Type:

float

magnus.globaldefs.NUMU = 1[source]

Module-level constant

Index used to denote nu_mu flavor when computing probabilities. Units: [Adimensional]

Type:

float

magnus.globaldefs.NUTAU = 2[source]

Module-level constant

Index used to denote nu_tau flavor when computing probabilities. Units: [Adimensional]

Type:

float

magnus.globaldefs.NUS = 3[source]

Module-level constant

Index used to denote the sterile flavor in when computing four-neutrino (3+1) probabilities. Units: [Adimensional]

Type:

float

magnus.globaldefs.NUS1 = 3[source]

Module-level constant

Index used to denote the first sterile flavor in when computing five-neutrino (3+2) probabilities. Units: [Adimensional]

Type:

float

magnus.globaldefs.NUS2 = 4[source]

Module-level constant

Index used to denote the second sterile flavor in when computing five-neutrino (3+2) probabilities. Units: [Adimensional]

Type:

float

magnus.globaldefs.UNIT_KEV = 1000.0[source]
magnus.globaldefs.UNIT_MEV = 1000000.0[source]
magnus.globaldefs.UNIT_GEV = 1000000000.0[source]
magnus.globaldefs.UNIT_TEV = 1000000000000.0[source]
magnus.globaldefs.UNIT_PEV = 1000000000000000.0[source]
magnus.globaldefs.UNIT_EEV = 1e+18[source]
magnus.globaldefs.S12_NO_BF_NUFIT_6_0[source]

Module-level constant

Lepton mixing angle \(\sin\theta_{12}\), best fit from NuFit 6.0, assuming normal ordering with SK atmospheric data. Units: [Adimensional]

Type:

float

magnus.globaldefs.S23_NO_BF_NUFIT_6_0[source]

Module-level constant

Lepton mixing angle \(\sin\theta_{23}\), best fit from NuFit 6.0, assuming normal ordering with SK atmospheric data. Units: [Adimensional]

Type:

float

magnus.globaldefs.S13_NO_BF_NUFIT_6_0[source]

Module-level constant

Lepton mixing angle \(\sin\theta_{13}\), best fit from NuFit 6.0, assuming normal ordering with SK atmospheric data. Units: [Adimensional]

Type:

float

magnus.globaldefs.DCP_NO_BF_NUFIT_6_0[source]

Module-level constant

Lepton CP-violation phase \(\delta_\text{CP}\), best fit from NuFit 6.0, assuming normal ordering with SK atmospheric data. Units: [radian]

Type:

float

magnus.globaldefs.D21_NO_BF_NUFIT_6_0 = 7.49e-05[source]

Module-level constant

Mass-squared difference \(\Delta m_{21}^2\), best fit from NuFit 6.0, assuming normal ordering with SK atmospheric data. Units: [\(\text{eV}^{2}\)]

Type:

float

magnus.globaldefs.D31_NO_BF_NUFIT_6_0 = 0.002513[source]

Module-level constant

Mass-squared difference \(\Delta m_{31}^2\), best fit from NuFit 6.0, assuming normal ordering with SK atmospheric data. Units: [\(\text{eV}^{2}\)]

Type:

float

magnus.globaldefs.S12_IO_BF_NUFIT_6_0[source]

Module-level constant

Lepton mixing angle \(\sin\theta_{12}\), best fit from NuFit 6.0, assuming inverted ordering with SK atmospheric data. Units: [Adimensional]

Type:

float

magnus.globaldefs.S23_IO_BF_NUFIT_6_0[source]

Module-level constant

Lepton mixing angle \(\sin\theta_{23}\), best fit from NuFit 6.0, assuming inverted ordering with SK atmospheric data. Units: [Adimensional]

Type:

float

magnus.globaldefs.S13_IO_BF_NUFIT_6_0[source]

Module-level constant

Lepton mixing angle \(\sin\theta_{13}\), best fit from NuFit 6.0, assuming inverted ordering with SK atmospheric data. Units: [Adimensional]

Type:

float

magnus.globaldefs.DCP_IO_BF_NUFIT_6_0[source]

Module-level constant

Lepton CP-violation phase \(\delta_\text{CP}\), best fit from NuFit 6.0, assuming inverted ordering with SK atmospheric data. Units: [radian]

Type:

float

magnus.globaldefs.D21_IO_BF_NUFIT_6_0 = 7.49e-05[source]

Module-level constant

Mass-squared difference \(\Delta m_{21}^2\), best fit from NuFit 6.0, assuming normal ordering with SK atmospheric data. Units: [\(\text{eV}^{2}\)]

Type:

float

magnus.globaldefs.D32_IO_BF_NUFIT_6_0 = -0.002484[source]

Module-level constant

Mass-squared difference \(\Delta m_{32}^2\), best fit from NuFit 6.0, assuming normal ordering with SK atmospheric data. Units: [\(\text{eV}^{2}\)]

Type:

float

magnus.globaldefs.D31_IO_BF_NUFIT_6_0 = -0.0024091[source]

Module-level constant

Mass-squared difference \(\Delta m_{31}^2\), best fit from NuFit 6.0, assuming inverted ordering with SK atmospheric data. Units: [\(\text{eV}^{2}\)]

Type:

float

magnus.globaldefs.OSC_PARAMS_NU_FIT_6_0_SK_NO[source]
magnus.globaldefs.OSC_PARAMS_NU_FIT_6_0_SK_IO[source]
magnus.globaldefs.OSC_PARAMS_PREDEFINED[source]
magnus.globaldefs.EPS_EE = 0.06[source]

Module-level constant

Total NSI strength parameter eps_ee computed using values of the u and d quark parameters compatible at 2sigma with LMA+coherent from 1805.04530. Units: [Adimensional]

Type:

float

magnus.globaldefs.EPS_EM = -0.06[source]

Module-level constant

Total NSI strength parameter eps_em computed using values of the u and d quark parameters compatible at 2sigma with LMA+coherent from 1805.04530. Units: [Adimensional]

Type:

float

magnus.globaldefs.EPS_ET = 0.0[source]

Module-level constant

Total NSI strength parameter eps_et computed using values of the u and d quark parameters compatible at 2sigma with LMA+coherent from 1805.04530. Units: [Adimensional]

Type:

float

magnus.globaldefs.EPS_MM = 1.2[source]

Module-level constant

Total NSI strength parameter eps_mm computed using values of the u and d quark parameters compatible at 2sigma with LMA+coherent from 1805.04530. Units: [Adimensional]

Type:

float

magnus.globaldefs.EPS_MT = 0.0[source]

Module-level constant

Total NSI strength parameter eps_mt computed using values of the u and d quark parameters compatible at 2sigma with LMA+coherent from 1805.04530. Units: [Adimensional]

Type:

float

magnus.globaldefs.EPS_TT = 0.0[source]

Module-level constant

Total NSI strength parameter eps_tt computed using values of the u and d quark parameters compatible at 2sigma with LMA+coherent from 1805.04530. Units: [Adimensional]

Type:

float

magnus.globaldefs.EPS_2[source]

Module-level constant

Vector of total NSI strength parameters for two-neutrino oscillations. Units: [Adimensional]

Type:

float

magnus.globaldefs.EPS_3[source]

Module-level constant

Vector of total NSI strength parameters for three-neutrino oscillations. Units: [Adimensional]

Type:

float

magnus.globaldefs.SXI12 = 0.0[source]

Module-level constant

LIV lepton mixing angle sin(xi_12). Units: [Adimensional]

Type:

float

magnus.globaldefs.SXI23 = 0.0[source]

Module-level constant

LIV lepton mixing angle sin(xi_23). Units: [Adimensional]

Type:

float

magnus.globaldefs.SXI13 = 0.0[source]

Module-level constant

LIV lepton mixing angle sin(xi_13). Units: [Adimensional]

Type:

float

magnus.globaldefs.DXICP = 0.0[source]

Module-level constant

LIV CP-violation phase. Units: [radian]

Type:

float

magnus.globaldefs.B1 = 1e-09[source]

Module-level constant

LIV eigenvalue b_1. Units: [eV]

Type:

float

magnus.globaldefs.B2 = 1e-09[source]

Module-level constant

LIV eigenvalue b_2. Units: [eV]

Type:

float

magnus.globaldefs.B3 = 2e-09[source]

Module-level constant

LIV eigenvalue b_3. Units: [eV]

Type:

float

magnus.globaldefs.LAMBDA = 1000000000000.0[source]

Module-level constant

LIV energy scale Lambda. Units: [eV]

Type:

float

magnus.globaldefs.NUFIT_GLOBAL_FITS[source]
magnus.globaldefs.load_nufit_params(version='NuFIT 6.1', ordering='NO', category=None)[source]

Load standard three-flavor mixing parameters from a NuFit global fit.

Looks up NUFIT_GLOBAL_FITS for the requested release, mass ordering, and (release-specific) secondary category, and returns them as a plain dict with the same parameter names used throughout Magnus (s12, s23, s13, dCP, D21, D31), so the result can be passed directly as keyword arguments to any osc_prob_3nu_* function (or to magnus.hamiltonians.hamiltonians3nu() and other functions that take the same standard-oscillation parameter names).

Parameters:
  • version (str, optional) – NuFit release to load, e.g. 'NuFIT 6.1', 'NuFIT 5.2', 'NuFIT 1.0'. See NUFIT_GLOBAL_FITS.keys() for the full list of available releases (v1.0 through v6.1). Default: 'NuFIT 6.1' (the latest release at the time of writing).

  • ordering (str, optional) – Neutrino mass ordering: 'NO' (normal) or 'IO' (inverted). Default: 'NO'.

  • category (str or None, optional) – Release-specific secondary category (e.g. 'with_SK' / 'without_SK' for v4.0+, 'LEM' / 'LID' for v2.1, 'free_fluxes_rsbl' / 'huber_fluxes_no_rsbl' for v1.0-v1.3). If None (default), the release’s preferred/primary category is used (for releases with a with_SK/without_SK split, this is 'with_SK'). See NUFIT_GLOBAL_FITS[version]['categories'].keys() for the categories available for a given release.

Returns:

Dict with keys s12, s23, s13 (\(\sin\theta_{ij}\), adimensional), dCP (radian), D21 and D31 (\(\text{eV}^{2}\)).

Return type:

dict

Raises:

ValueError – If version is not a known NuFit release, if ordering is not 'NO' or 'IO', or if category is not one of the categories available for version.

Examples

Load a release and feed it straight into a probability function (the code below runs when these docs are built, so the output shown is always current):

import magnus.globaldefs as gd
import magnus.oscprob as oscprob

params = gd.load_nufit_params('NuFIT 6.1', ordering='NO')

sorted(params.keys())
['D21', 'D31', 'dCP', 's12', 's13', 's23']
oscprob.osc_prob_3nu_vacuum(1.0 * gd.UNIT_GEV, 100.0 * gd.UNIT_KM,
                            **params)
array([[0.99147795, 0.00323398, 0.00528806],
       [0.0034939 , 0.90719742, 0.08930869],
       [0.00502815, 0.0895686 , 0.90540325]])

Comparing normal- and inverted-ordering best fits from an older release:

no = gd.load_nufit_params('NuFIT 4.0', ordering='NO', category='with_SK')
io = gd.load_nufit_params('NuFIT 4.0', ordering='IO', category='with_SK')

no['D31'] > 0 and io['D31'] < 0
True

Added in version 1.0.0.