Abstract
We present PEANUTS (Propagation and Evolution of Active NeUTrinoS), an open-source Python package for the automatic computation of solar neutrino spectra and active neutrino propagation through Earth. PEANUTS is designed to be fast, by employing analytic formulae for the neutrino propagation through varying matter density, and flexible, by allowing the user to input arbitrary solar models, custom Earth density profiles and general detector locations. It provides functionalities for a fully automated simulation of solar neutrino fluxes at a detector, as well as access to individual routines to perform more specialised computations. The software has been extensively tested against the results of the SNO experiment, providing excellent agreement with their results. In addition, the present text contains a pedagogical derivation of the relations needed to compute the oscillated solar neutrino spectra, neutrino propagation through Earth and nadir exposure of an experiment.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
Solar neutrinos represent the most abundant source of neutrinos on Earth, with a flux of the order of \(6 \times 10^{10}~\text {cm}^{-2}~\text {s}^{-1}\) [1]. Even though only a small fraction of this flux is actually detectable, due to many production channels resulting in neutrinos with energies below the typical experimental detection thresholds [2], solar neutrinos provide an invaluable source of information for the study of neutrino properties, solar dynamics and Earth internal structure. Historically, solar neutrinos provided the first hints for the non-conservation of leptonic flavours in neutrino propagation [3], when in 1968 the Homestake experiment reported far less solar electron neutrino events [4] than the number expected from the recently developed solar models [5,6,7,8,9,10,11,12,13]. This so-called solar neutrino problem was only solved in 2001, when the SNO collaboration released [14] the measurement of the total flux of active \({}^8\)B neutrinos, that resulted in a close agreement with solar models predictions and implied that the origin of the discrepancy had to be tracked to new physics effects in the neutrino sector. It is now firmly established that the deficit is due to neutrino oscillations [15,16,17], with oscillation parameters as inferred by solar neutrino experiments well in agreement with data from other neutrino sources [18,19,20].
Nowadays, solar neutrinos continue providing invaluable information, being the only known probes that can directly test the interior structure and dynamics of the Sun, thereby providing strong constraints on the solar models parameters [21,22,23], or probe the internal solar dynamics on long time-scales [24]. More exotic production mechanisms such as neutrino emission during intense solar flares [25, 26], neutrino production from cosmic-rays scattering in the solar atmosphere [27] and neutrinos from dark matter annihilation in the Sun [28] can also be probed. On the other hand, the theoretically established solar models allow to study and constrain neutrino properties, from standard oscillation parameters [29, 30] to more hypothetical scenarios such as non-standard interactions [31] or finite magnetic moment [32].
In all these scenarios, an important wealth of statistical information is encoded in the energy spectra for the individual neutrino flavours. Due to neutrino oscillations, however, the spectra on Earth generally differ from the ones at neutrino production, and a proper account of the oscillation dynamics is mandatory in order to compare a theoretical model with data. The oscillation dynamics is in general non-trivial, including three different regimes and corresponding matter effects [33, 34]: propagation within the slowly-changingFootnote 1 matter density within the Sun, propagation in vacuum between Sun surface and Earth, and propagation within Earth featuring a fastly-evolving matter density profile.
In this work we present PEANUTS (Propagation and Evolution of Active NeUTrinoS), an open-source, fast and flexible package to compute the neutrino oscillation dynamics in all the above-mentioned regimes. The emphasis in developing the software has been put on both performance and flexibility: PEANUTS computes the coherent neutrino propagation inside Earth analytically, completely removing the need for time-consuming numerical integrations. Moreover, the user can input any arbitrary solar model, as well as any custom Earth matter density profile, and simulate experiments at any latitude and underground depth. The software can perform the full chain of computations to simulate the expected neutrino spectra for a given solar model, Earth matter density and detector location, or its modules can be called individually, to compute for instance the evolved neutrino state after Earth crossing given an arbitrary initial (coherent or incoherent) state, or the solar angle distribution for an experiment taking data between two arbitrary days of the year. PEANUTSFootnote 2 is provided as an open-source Python package, under the GPL-3.0 license. It can be run standalone in various different ways, as well as interfaced from other frameworks. Details of the various software requirements and dependencies, as well as instructions on how to use PEANUTS can be found in Sect. 6, whereas the specific functions and classes that perform the computations will be scattered through whenever the physical quantity computed is introduced. We have extensively validated our implementation against the results of the SNO experiment [35, 36], details of which will also be located where useful, including a final comparison of likelihood contours for our simulation of the experiment with the probabilities computed by PEANUTS.
This document is thus structured as follows. Section 2 describes the theoretical background for the computation of the solar neutrino flux and the propagation of the neutrinos from the Sun. In Sect. 3 we describe the effect of Earth regeneration of the neutrino flux, i.e. the propagation of neutrinos through the Earth, followed by a detailed explanation of our fast approximation for the neutrino propagation Hamiltonian in Sect. 4. Section 5 details the time integration over the exposure of a given experiment. For interested users, Sect. 6 provides a quick start guide to PEANUTS and a explanations on how to reproduce our validation procedure. Lastly, we provide our conclusions and outlook in Sect. 7.
2 Solar neutrino flux
2.1 Neutrino survival probability at Sun surface
Solar neutrinos are produced over a wide region within the Sun, making the incertitude over the production point much larger than the typical detectors size (in fact, much larger than the Earth itself. See e.g. Fig. 1) [37]. This feature implies that the solar neutrino flux at Earth is given by an incoherent superposition of neutrino mass eigenstates [38, 39], whose composition remains constant as the flux propagates in vacuum.Footnote 3 If the neutrino oscillation length-scale is much smaller than the scale over which matter density varies significantly, neutrino oscillations in matter proceed adiabatically [41]; the values of the neutrino oscillation parameters inferred by global fits of neutrino data [18,19,20] imply that the adiabatic regime is realised for solar neutrinos as they propagate from the production point towards the Sun surface. In the adiabatic approximation, the neutrino flavour composition at the Sun surface only depends on the matter effects at neutrino production point.
Solar density (left) and fraction of solar neutrinos produced (right), as a function of relative radius \(r \equiv R/R_\odot \), from Solar model BS05(AGS,OP) [2]
Given \(U=U(\theta _{12}, \theta _{13}, \theta _{23}, \delta )\) the PMNS mixing matrix in vacuum (cf. Eqs. (15, 16)), it is possible to define an analogous matrix T that diagonalises the neutrino Hamiltonian in matter by simply replacing the vacuum values of \(\theta _{12}, \theta _{13}\) with their matter-rotated ones [42, 43]Footnote 4:
where \(\theta _{12}, \theta _{13}\) are the PMNS mixing angles in vacuum, \(\widetilde{\theta }_{12},\widetilde{\theta }_{13}\) the corresponding ones in matter,
represents the matter potential for a neutrino with energy E travelling in a medium with electron density \(n_e\), \(G_F\) is the Fermi constant,
is the \(\theta _{13}\)-modified matter potential and
The matrix T is then simply defined as
Notice that the matrix T depends both on local matter density and energy of the produced neutrino.
Numerically (cf. eqs. 4.17, 4.18 in [46])
where the wavenumber k is useful in the relation
The probability of producing a neutrino mass eigenstate i in matter is thus \(\left| T_{\alpha i}\left( E, n_e \right) \right| ^2\), where \(\alpha \) is the flavour of the charged lepton entering the neutrino production vertex.
PEANUTS assumes the validity of the adiabatic regime when computing the solar neutrino flux, as this guarantees a fast computation and is an excellent approximation for the neutrino oscillation parameters realised in the standard 3-flavour mixing scheme [35, 47,48,49,50]. Hence, it provides a function for the computation of the matrix T in Eq. (6), with signature
![figure a](http://media.springernature.com/lw685/springer-static/image/art%3A10.1140%2Fepjc%2Fs10052-024-12423-3/MediaObjects/10052_2024_12423_Figa_HTML.png)
where the arguments correspond, respectively, to \(\theta _{12}\), \(\theta _{13}\), \(\Delta m_{21}^2\) (eV\(^2\)), \(\Delta m_{3\ell }^2\) (eV\(^2\)), E (MeV) and \(n_e\) (mol/cm\(^3\)). Note that in PEANUTS the input variable \(\Delta m_{3\ell }\) has different meanings according to the ordering of neutrino mass eigenstates. In normal ordering (NO) \(l=1\), and thus \(\Delta m_{31}^2 = \Delta m_{3\ell }^2\) and \(\Delta m_{32}^2 = \Delta m_{3\ell }^2 - \Delta m_{21}^2\), whereas for inverted ordering (IO) \(l=2\), so \(\Delta m_{32}^2 = \Delta m_{3\ell }^2\) and \(\Delta m_{31}^2 = \Delta m_{3\ell }^2 + \Delta m_{21}^2\). PEANUTS also provides accessible functions for the mixing angles in matter \(\widetilde{\theta }_{12}\) and \(\widetilde{\theta }_{13}\), as well as useful quantities such as \(\Delta m_{ee}^2\) and the ratio V/k, in the form of the functions
![figure b](http://media.springernature.com/lw685/springer-static/image/art%3A10.1140%2Fepjc%2Fs10052-024-12423-3/MediaObjects/10052_2024_12423_Figb_HTML.png)
In the adiabatic approximation neutrinos evolve as pure mass eigenstates within the Sun. For a fixed value of neutrino energy E, the flux composition at Sun surface is given by the average over the neutrino production points inside the Sun. Assuming spherical symmetry, if f(r) is the fraction of neutrinos produced at point \(r \equiv R/R_\odot \), where \(R_\odot \) is the solar radius and R the distance from the center of the Sun, the probability of a solar neutrino with energy E to emerge as mass eigenstate i is
with the normalization
The computation of f(r) assumes a specific solar model. In our validation of PEANUTS we use the BS05(AGS,OP) model [2],Footnote 5 which is one of the models assumed by the SNO collaboration in their neutrino oscillation fit [35]. Figure 1-left shows the value of solar matter density \(n_e(r)\) as a function of solar radius r in the BS05(AGS,OP) model, while Fig. 1-right shows the neutrino production fractions for different production chains. Note that the electron density in [2] is given in units of \(\frac{1}{\text {cm}^3 N_A} = \frac{\text {mol}}{\text {cm}^3\ 6.022 \cdot 10^{23} }\).
The choice of a particular solar model is encoded in PEANUTS as the Python class . Through the constructor of the class, of signature,
![figure d](http://media.springernature.com/lw685/springer-static/image/art%3A10.1140%2Fepjc%2Fs10052-024-12423-3/MediaObjects/10052_2024_12423_Figd_HTML.png)
one can select the location of a file describing the chosen solar model with the optional argument . By default, when no other file location is provided, PEANUTS will assume the use of the BS16(AGSS09) model [51]. At the time of publication, PEANUTS can also work out of the box with the B16 (GS98) [51] model, the BS05(AGS,OP) and BS05(OP) models [2], and the BP00 [37] solar model. The user is nevertheless encouraged to implement their own solar model (and thus neutrino fraction distribution f(r)), by providing a custom solar model file via the
optional argument and/or flux file with
(they will be assumed to be the same if the latter argument is missing), but in such case one must also specify the rows and columns where the relevant information in the files can be located. The options
and
sets the rows and columns in
where one can find the total neutrino flux per fraction, which can be either dictionaries or real numbers, but at least one of the two must be a dictionary with the names of the fractions of interest and the corresponding row or column. If the fluxes must be rescaled, the option
can be provided, which can be a real number, for blanket rescaling of all fluxes, or a dictionary with different rescaling for each fraction. The option
points to the first row of the table in
containing the distributions, i.e. the radius, density and fraction samples, whose columns must also be specified with the options
,
and
, respectively, with the latter a dictionary of names and columns of the fractions of interest. Naturally all of these optional arguments must be provided if the solar model file is not known to PEANUTS.
In addition to allowing the selection of different solar models, PEANUTS also allows the use of different energy spectra for the various neutrino fluxes. By default, the following are provided and taken from: pp and hep [52], \(^8B\) [53], \({}^{13}N\), \({}^{15}O\) and \({}^{17}F\) [54], \(^7Be\) [55]. Different spectra can be provided via the optional argument in the constructor for the
class. It should be noted that spectra are assumed in PEANUTS to be normalised to 1, so the user should make sure to renormalise the spectrum accordingly, as it is the case, for instance for the \(^8B\) spectrum from [56], which is normalized to 1000.
In addition to the neutrino fraction distributions and fluxes, the class in PEANUTS provides the density of the Sun at various radius samples, necessary for computing the probability of neutrinos at Sun exit from Eq. (10). This probability, or equivalently the weight of neutrino mass eigenstates in the surface of the Sun, is computed by PEANUTS with the function
![figure t](http://media.springernature.com/lw685/springer-static/image/art%3A10.1140%2Fepjc%2Fs10052-024-12423-3/MediaObjects/10052_2024_12423_Figt_HTML.png)
2.2 Neutrino propagation from the Sun
Being it an incoherent flux, the fraction of mass eigenstates within the solar neutrino flux remains constant as long as neutrinos propagate in the vacuum, on their path from Sun surface to Earth. Here we adopt the convention that the unitary PMNS mixing matrix U defines the change of basis between mass and flavour neutrino fields
with \(\alpha = e,\mu ,\tau \) the flavour indexes, \(i=1,2,3\) the mass ones. With this convention, a neutrino state produced at the origin results from the linear superposition of mass statesFootnote 6
implying that the probability of observing a neutrino of flavour \(\alpha \) from a mass eigenstate i is given by \(|U_{\alpha i}^*|^2\). Thus, the probability for a solar neutrino to manifest as flavour \(\alpha \) is given by
and we assume throughout this paper that repeated indexes are summed.
In PEANUTS the PMNS matrix is implemented as the class, which is constructed from the mixing angles \(\theta _{ij}\) and CP phase \(\delta _{\text {CP}}\) as
![figure v](http://media.springernature.com/lw685/springer-static/image/art%3A10.1140%2Fepjc%2Fs10052-024-12423-3/MediaObjects/10052_2024_12423_Figv_HTML.png)
This provides accessor functions for all mixings parameters, as well as other useful quantities such as the orthogonal/unitary matrices \(R_{12}\), \(R_{13}\), \(R_{23}\) and \(\Delta \), which allow the PMNS mixing matrix U to be expressed as
and are defined as
This decomposition of the PMNS matrix will be useful further down when computing the propagation Hamiltonian through Earth. Finally, in order to compute the solar probability for flavour eigenstates with PEANUTS, one can use the function
![figure x](http://media.springernature.com/lw685/springer-static/image/art%3A10.1140%2Fepjc%2Fs10052-024-12423-3/MediaObjects/10052_2024_12423_Figx_HTML.png)
which simply implements Eq. (14) using a object and calling the
function, and returns a list of the probability for each flavour eigenstate.
3 Neutrino propagation through Earth
3.1 Probability of transition through matter
If the neutrino flux from the Sun crosses the Earth (or any finite density matter in general) the probabilities are modified, since the propagation eigenstates in matter differ from the vacuum ones.
In general, a generic neutrino state at timeFootnote 7t can be expressed in terms of the state at time \(t_0\) by evolving it with an appropriate evolutor operator \(\hat{{\mathcal {U}}}(t,t_0)\)
The generic state \(\left| \nu ,t \right\rangle \) can be expressed as a linear superposition of pure flavour eigenstates,
where \(c_\alpha (t)\) are complex numbers, implying that the probability of it to interact as a neutrino with flavour \(\alpha \) at time t will be given by \(|c_\alpha (t)|^2\). From Eq. 17 it follows that the evolved probability amplitudes are given by
where \({\mathcal {U}}_{\alpha \beta }(t,t_0)\) are the matrix elements of the evolutor operator in flavour basis. The determination of the evolutor operator \({\mathcal {U}}\) is in general a non-trivial problem, and will be discussed in detail in the following sections; for the moment let us assume we know a closed form expression for it.
A mass eigenstate expressed as linear combination of flavour eigenstates is
which implies a transition amplitude from (evolved) mass to flavour eigenstate
Putting everything together, the final probability for a solar neutrino to manifest as \(\alpha \) flavour while crossing the Earth is given by
where \(t_0\) is defined at the time of neutrino crossing the Earth surface. The interpretation of Eq. (22) is the following: \(U_{\beta i}\) are the coefficients of the mass eigenstate i expressed as linear combination of flavour eigenstates, \(\left| \nu _i \right\rangle = U_{\beta i} \left| \nu _\beta \right\rangle \), and \({\mathcal {U}}_{\alpha \beta }(t, t_0) U_{\beta i} = \left\langle \nu _\alpha | \nu _i, t \right\rangle \) is the transition amplitude from the evolved mass eigenstate i to interaction eigenstate \(\alpha \). Finally, each probability \(|\left\langle \nu _\alpha | \nu _i, t \right\rangle |^2\) is multiplied by the weight of the mass eigenstate i in the incoherent solar flux, \(P_{\nu _e \rightarrow \nu _i}^\odot (E)\).
The probability of oscillation for each flavour eigenstate in Eq. (22) is implemented in PEANUTS by the function , with signature
![figure ab](http://media.springernature.com/lw685/springer-static/image/art%3A10.1140%2Fepjc%2Fs10052-024-12423-3/MediaObjects/10052_2024_12423_Figab_HTML.png)
which takes as arguments the neutrino state, , an instance of the Earth density class (see Sect. 3.3 below),
, an instance of the PMNS class,
, the mass splitting parameters,
and
, the neutrino energy,
, the nadir angle of the incoming neutrino,
, and the depth of the experiment at which the probability is to be computed,
.
The optional argument defines the basis of the neutrino state. If
the initial state is assumed to be a coherent one, expressed in flavour basis, with
defining the complex coefficients \(c_\alpha \) in Eq. (18), and final probabilities computed by squaring the coefficients evolved as in Eq. (19). If
, the initial state is assumed to be an incoherent superposition of mass eigenstates, with
defining the real weights \(P_{\nu _e \rightarrow \nu _i}^\odot (E)\) and final probabilities computed as in Eq. (22). To compute the probability for an antineutrino, one can set the optional argument
(
by default).
One can also optionally select the evolution mode to be either numerical or analytical (default) by providing the optional argument with either option. The function
thus splits into two functions for each of the methods,
and
, whose details and differences will be described below in Sect. 4. Lastly, one can request the full evolution of the probability with the optional argument
(defaults to
), returned as a list of probability values for each flavour eigenstate and certain discrete coordinate locations along the path of the neutrino. Note that the full oscillation can only be provided via the numerical evolution mode, so if selected along with the analytical mode, PEANUTS will provide a warning and simply compute the final probabilities.
In addition, if one wishes to know the final evolved complex coefficients \(c_\alpha (t)\) from a coherent (flavour basis) initial neutrino state, from Eq. 19, they can be obtained with the function
![figure ax](http://media.springernature.com/lw685/springer-static/image/art%3A10.1140%2Fepjc%2Fs10052-024-12423-3/MediaObjects/10052_2024_12423_Figax_HTML.png)
which has the same arguments as , except the basis as this is only available for neutrino states in the flavour basis. As with the probability function, this function splits into
and
according to the selected mode.
3.2 Evolutor operator
The evolutor operator \(\hat{{\mathcal {U}}}\) is defined by the equations
The equation of motion for \(\hat{{\mathcal {U}}}(t, t_0)\) can be derived from the Schrödinger equation
implying
The Schrödinger equation in flavour basis takes the form
The explicit expression for \(H_{\alpha \beta }(t)\) can be readily derived in vacuum (where there is no time dependence)
where \(E_i\) is the energy of the mass eigenstate \(\left| \nu _i \right\rangle \). In the presence of matter the Hamiltonian matrix elements receive an additional (time dependent) term, cf. Sect. 4; Eq. (27) determines its vacuum CP-structure, following the definition of the neutrino fields/states in Eqs. (12, 13).
In PEANUTS the probability of oscillation through vacuum, and its evolved state, are computed with the functions
![figure bb](http://media.springernature.com/lw685/springer-static/image/art%3A10.1140%2Fepjc%2Fs10052-024-12423-3/MediaObjects/10052_2024_12423_Figbb_HTML.png)
with similar arguments as above, with the notable difference of the oscillation length or baseline
, to be provided in km.
Once the Hamiltonian matrix elements are known, they can be used to derive the evolutor ones. The formal solution is
where \({\mathcal {T}}\) is the time-order operator. Equation (28) does not generally admit an analytic closed form, except for very special cases, for instance if the Hamiltonian at different times does commute.
A well known approach to the problem is the Dyson series [57]
which allows for an approximate solution obtained by truncating Eq. (29) at finite values of n, if the series is expected to be perturbative. We will return to this approximation in Sect. 4, where we will derive an approximated analytical expression for the evolutor.
3.3 Earth matter regeneration
Due to the incoherent nature of the solar neutrino flux, its relative weights in mass eigenstates components, \(P_{\nu _e \rightarrow \nu _i}^\odot (E)\), are constant while travelling from Sun to Earth in vacuum. However, before arriving at a terrestrial detector, a solar neutrino can cross the Earth itself, along which path the matter potential makes the propagation eigenstates different from the vacuum ones. This results in coherent neutrino oscillations inside the Earth that, on average, result in a regeneration of \(\nu _e\) with respect to the vacuum case [38].
The electron density inside Earth can be parametrised by 5 shells, within which the density itself varies smoothly as [39]
and where r is the radial distance normalised to the Earth radius. The numerical values of the parameters are reported for convenience in Table 1.
The parametrisation in Eq. (30) is valid for radial trajectories, i.e. paths crossing the center of the Earth. For a path forming a nadir angle \(\eta \) with the radial trajectory (cf. Fig. 2), the parametrisation is functionally invariant, with modified coefficients
where the trajectory coordinate x is defined as the distance from the trajectory mid-point, i.e. \(x = \sqrt{r^2-\sin ^2\eta }\). The Earth density profiles for some example values of the nadir angle \(\eta \) are reported in Fig. 3.
Earth density profile for different values of the nadir angle \(\eta \), following the parametrisation in [39]
This parametrisation assumes a nadir angle defined for a detection at the surface of Earth. If the detector is located underground, we can define a “detector shell” at the detector radial distance. For instance, SNO was placed \(H=2\) km underground, so we can define \(r_{det} = r_{\text {SNO}} = 1 - H /R_{\text {E}} \equiv 1 - h\), where \(R_{\text {E}}\) is the (not rescaled) Earth radius, \(R_E = 6.371 \cdot 10^3\) km. There are two modifications for the scenario of an underground detector with respect to the treatment in [39]: the first is that the measured nadir angle \(\eta \) differs from the angle \(\eta ' = \arcsin (r_{det} \sin \eta )\) that one would measure at the Earth surface, for same neutrino trajectory, cf. Fig. 4. This implies that it is the \(\eta '\) angle that should be used in Eq. (31) to compute the value of the electron density profile along the neutrino trajectory, and not the value \(\eta \) measured by the experiment. The second modification is that matter effects are present even for values of \(\eta \ge \pi /2\), if the detector is underground. The contribution to the trajectory from the outer layer (between Earth surface and detector shell) is given by
\(\Delta x\) reduces to h for \(\eta =0, \pi \), and attains the maximum value \(\sqrt{h(2-h)}\) for \(\eta =\pi /2\) (this is approximately 160 km for SNO).
In general, not every shell is crossed by solar neutrinos: a shell i is crossed by a neutrino trajectory with nadir angle \(\eta \) if \(r_i > r_{det} \sin \eta \). The value of the trajectory coordinate at each shell crossing is given by
PEANUTS implements the Earth density as a Python class called , with signature
![figure bf](http://media.springernature.com/lw685/springer-static/image/art%3A10.1140%2Fepjc%2Fs10052-024-12423-3/MediaObjects/10052_2024_12423_Figbf_HTML.png)
where the optional arguments ,
and
allow the user to supply any Earth density profile. If supplied by file, using the
argument, the density profile is either expected as a table with columns \(\{r_j, \alpha _j, \beta _j, \gamma _j\}\), following Eq. (30) (additional optional columns \(\delta _j^{2n}\), with \(n\ge 3\), are allowed, corresponding to higher orders in the polynomial expansion of the density); or if
it is expected as a two-column table of radii and density, where each entry will be treated as a new layer of constant density. Consequently PEANUTS can work with an arbitrary number of shells and arbitrary densities. In addition to supplying the density profile by file, it is also possible to provide an analytical expression for the density. Upon selecting the optional argument
in the
constructor, PEANUTS will use the earth density computed by the member function
, where a user can implement their own analytical density profile. However, custom density profiles and higher orders in the polynomial expansion are only fully used when computing the oscillation probabilities numerically; the analytical computation, described below in Sect. 4.1, relies on the density described as in Eq. (30), and thus any density provided will be Taylor expanded and truncated to fit that form, when used for the analytical computation of the oscillation probability. Regardless of the source and form of the density profile, the
class provides methods to compute the value of the density at given coordinate x, as well as, when appropriate, the modified coefficients \(\alpha '_j\), \(\beta '_j\) and \(\gamma '_j\) (and \(\delta ^{'2n}_j\) if needed), corresponding to each Earth shell, from the radii and nadir angle \(\eta \) using Eq. (31) (or modified to accommodate higher orders).
4 Neutrino propagation Hamiltonian
The propagation Hamiltonian for an ultrarelativistic neutrino propagating in a medium with electron density \(n_e(x)\) is, in the flavour basis [46]
with
For antineutrinos, the same Eq. (37) holds, with the replacements
To streamline computations and statistical analysis, it is more convenient to redefine the Hamiltonian by subtracting a constant term
with \(j=1\) for normal ordering (NO) and \(j=2\) for inverted ordering (IO), such that
so that we can use as free parameters \(\Delta m_{21}^2 >0\) and \(\Delta m_{3\ell }^2\), with \(\ell =1\) for NO \((\Delta m_{31}^2 > 0)\) and \(\ell =2\) for IO \((\Delta m_{32}^2 < 0).\) In the following we keep using the notation \(\text {diag}(k)\) for the general expressions, valid for any choice of mass ordering. A specific scenario can then be easily recovered by specifying the structure of this diagonal matrix, e.g. in Eqs. (43, 44).
With the parametrisation in Eq. (15) and using \(\left[ \Delta ,R_{12}\right] = \left[ V_\nu ,R_{23}\right] =\left[ V_\nu ,\Delta \right] =0\), the propagation Hamiltonian can be rewritten as
with
Notice that \(\tilde{H}\) does not depend on \(\theta _{23}\), \(\delta \).
Given that \(R_{23}\) and \(\Delta \) do not depend on position, they can be factorised in the time-ordered definition of the evolutor operator
A numerical solution for the evolutor can be obtained by solving Eq. (50) or by resolving the differential equation in Eq. (25). PEANUTS offers a numerical evaluation of the evolutor, via the function
![figure bp](http://media.springernature.com/lw685/springer-static/image/art%3A10.1140%2Fepjc%2Fs10052-024-12423-3/MediaObjects/10052_2024_12423_Figbp_HTML.png)
and the evolved coefficients from a coherent neutrino state, with
![figure bq](http://media.springernature.com/lw685/springer-static/image/art%3A10.1140%2Fepjc%2Fs10052-024-12423-3/MediaObjects/10052_2024_12423_Figbq_HTML.png)
These computations, however, can be extremely time-consuming, and thus it is convenient to find an approximated analytical expression by performing a perturbative expansion of the Hamiltonian.
4.1 Perturbative expansion of the neutrino propagation Hamiltonian
We are interested in an expression for the operator in Eq. (50)
where l is the coordinate along the neutrino path. We normalise distances to the Earth radius \(R_E\), by defining \(x = l/R_E\). The Hamiltonian \(\tilde{H}\) can be divided in a kinetic and a matter dependent terms
where \(\tilde{H}_k\) does not depend on x.
To work out a perturbative expression for \({\mathcal {U}}\)Footnote 8 it is convenient to express the electron density as a perturbation along its mean value along the path [39]
from which it follows
We can analogously divide the Hamiltonian into a zeroth order term and a perturbation
where again \(\tilde{H}_0\) does not depend on x.
The evolutor can thus be expressed as [39]
where \(\bar{{\mathcal {U}}}\) is the evolutor for constant matter density \(\bar{n}_e\).
The evolutor for a constant Hamiltonian \(\bar{H}\) can generally be expressed in a closed form [58]
where \(T = \bar{H} - \text {Tr}(\bar{H}) {\mathbbm {1}}/3 \) is a traceless matrix and \(\lambda _a\) are the roots of the characteristic equation
with
Finally
By noticing that the full dependence on x in \(e^{-i \bar{H} x}\) is now contained within the scalar functions \(e^{- i \lambda _a x}\), the first order correction in Eq. (56) can be computed as
where \(\tilde{\lambda }_a = \lambda _a + \text {Tr}(\bar{H})/3\) and we defined
For a path fully contained within one shell we can parametrise
where \(\tilde{\alpha }' = \alpha ' - \bar{n}_e\), implying that \(I_{ab}(x_2,x_1)\) can be expressed analytically in closed form.
Summarising, we can perturbatively expand the evolutor operator as
In PEANUTS we implement these perturbative expressions to compute \({\mathcal {U}}\) in Eq. (51) at first order in perturbation theory, using a “reduced” mixing matrix \(\tilde{U} = R_{13} R_{12}\), with he function
![figure br](http://media.springernature.com/lw685/springer-static/image/art%3A10.1140%2Fepjc%2Fs10052-024-12423-3/MediaObjects/10052_2024_12423_Figbr_HTML.png)
which depends on the neutrino mass differences squared and
, the PMNS matrix
, neutrino energy
, the start and end points of the shell along the neutrino path
and
, as well as the density parameters of the traversed shell, with
= \(\alpha \),
= \(\beta \) and
= \(\gamma \). The flag
labels whether the computation is to be done for a neutrino (
) or antineutrino (
).
The procedure outlined above allows to express the evolutor at 1st order in \(\delta H\), for a path fully contained within one shell. In general, the full evolutor on a generic path \((x_1,x_2)\) can be expressed as a time-ordered product of evolutors along the same path
where \(x_i\) is a generic point \(x_1< x_i <x_2\) contained on the original path. It can be shown that [39]
The consequences of Eqs. (70, 71) are twofold: first, for a path starting at \(x=x_i\), with \(0\le x_i < x_1\), crossing n shells with boundaries at trajectory coordinate \((0, x_1, x_2, \ldots , x_n)\), and ending at the point \(x=x_f\), with \(x_{n-1} < x_f \le x_n\), the full evolutor can be expressed as
Second, for detectors placed at surface, the Earth spherical symmetry implies that the electron density is symmetric with respect to the trajectory midpoint at \(x=0\); thus we only need to compute the evolutor on one half-path (cf. Fig. 2)
Notice that the final evolutor is only a function of \(\eta \), since both the density profile and travelled distance within Earth are a function of the nadir angle.
If the detector is placed underground at trajectory coordinate \(x_{det} < x_F\), we distinguish two cases. For \(0 \le \eta < \pi /2\)
where \(x_{det} = r_{det} \cos {\eta }\). For \(\pi /2 \le \eta \le \pi \) the electron density can be approximated to a constant value, since the neutrino path is never deeper than H and density variations are negligible for realistic detectors. For instance, taking the SNO reference value \(H = 2\) km,
We fix for simplicity the electron density value to the one at Earth surface, \(n_1 = 1.67\) mol/cm\({^3}\). Having assumed constant density along the path, the evolutor is simply given by
To obtain the full dynamics and thus the full evolutor \({\mathcal {U}}\), PEANUTS computes the time-ordered product of “reduced” evolutors \(\tilde{{\mathcal {U}}}\) from above, and inputs it in Eq. (50) to re-introduce the dependence on \(\theta _{23}\) and \(\delta \). The PEANUTS function that implements these two steps is
![figure ce](http://media.springernature.com/lw685/springer-static/image/art%3A10.1140%2Fepjc%2Fs10052-024-12423-3/MediaObjects/10052_2024_12423_Figce_HTML.png)
with dependency also on the mass differences squared, PMNS matrix and neutrino energy, but also on the full Earth density profile , the nadir angle
and experiment depth
. This full evolutor is finally used to compute the probability of oscillation at the detector by the function
![figure ci](http://media.springernature.com/lw685/springer-static/image/art%3A10.1140%2Fepjc%2Fs10052-024-12423-3/MediaObjects/10052_2024_12423_Figci_HTML.png)
and the evolved coefficients with
![figure cj](http://media.springernature.com/lw685/springer-static/image/art%3A10.1140%2Fepjc%2Fs10052-024-12423-3/MediaObjects/10052_2024_12423_Figcj_HTML.png)
5 Time integration and exposure
Solar neutrino experiments typically collect data over a finite interval of time. As such, the measured survival probability is averaged over exposure
where \(\tau _d\) is the daily time, \(\tau _h\) the hourly time and \(\eta \) the Sun nadir angle at detector location. The integration in Eq. (77) is typically not the most convenient choice for practical applications; a more effective option is to transform the double integral into a single one over \(\eta \) [39]
where \(W(\eta )\) is a normalized weight function representing the fraction of time in which the experiment collected data at nadir angle \(\eta \). For real experiments, \(W(\eta )\) must be provided by the collaboration, taking into account the actual times at which the detector collected data or has been offline. It is nevertheless possible to compute \(W(\eta )\) analytically, for the ideal case of an experiment continuously taking data between days \(\tau _{d_1}\) and \(\tau _{d_2}\) [39]. This is done by changing integration variables
By normalising the daily and hourly times to the interval \([0, 2 \pi ]\)
with \(\tau _d=0\) at winter solstice and \(\tau _h=0\) at the middle of the night, it is possible to express
with \(\lambda \) the detector latitude and \(\delta _S\) the Sun declination, given by
with \(i=0.4091\) rad being the Earth inclination. With these definitions it is possible to perform the integral defining \(W(\eta )\) in Eq. (80); it is convenient to restrict \(\tau _d\) within the interval \([0, \pi ]\) (the alternative case can be easily derived from this one by using the symmetry of the orbit) and to change the integration variable from \(\tau _d\) to \(T = \cos (\tau _d)\). The resulting indefinite integral is expressed in terms of elementary functions and of the incomplete elliptic integral of the first kind; its analytic expression is not particularly illuminating but can be easily evaluated numerically. Some care must be taken in defining the range of integration for the definite integral, as this is given by the intersection of three distinct intervals: (i) \(T \in [-1, 1]\) is the interval where \(T=\cos (\tau _d)\) is defined, (ii) \(T \in [\sin (\lambda - \eta )/\sin (i), \sin (\lambda + \eta )/\sin (i)]\) is the range where T can take values for fixed values of \(\eta , \lambda , i\), (iii) \(T \in [\cos (\tau _{d_2}), \cos (\tau _{d_1})]\) is the observation time. If the intersection of the three intervals is null then \(W(\eta )\) will vanish for that given combination of \(\lambda , \eta \) values.
The exposure function \(W(\eta )\) is computed in PEANUTS by the function
![figure ck](http://media.springernature.com/lw685/springer-static/image/art%3A10.1140%2Fepjc%2Fs10052-024-12423-3/MediaObjects/10052_2024_12423_Figck_HTML.png)
which has no required arguments, but either the latitude of the experiment, , or an exposure file
, must be provided. It returns tabulated values of the function \(W(\eta )\) for
samples (default 1000) in nadir angle \(\eta \), assuming an exposure from day
to day
, where
corresponds to the northern hemisphere winter solstice. The exposure may be selected to be normalized with the option
(defaults to
).
Under default conditions, the function computes analytically the ideal exposure function performing the integral in Eq. (80), which is implemented in PEANUTS by the function
![figure cu](http://media.springernature.com/lw685/springer-static/image/art%3A10.1140%2Fepjc%2Fs10052-024-12423-3/MediaObjects/10052_2024_12423_Figcu_HTML.png)
which depends on the nadir angle , latitude
and day interval {
,
}. We plot in Fig. 5 the exposure function \(W(\eta )\) for one full year of exposure for three ideal detectors located at latitudes \(\lambda = 0, 45^\circ , 89^\circ \).
Weight of the nadir angle exposure for an ideal experiment located at latitude \(\lambda \), taking data continuously over a full year. The coloured regions represent the nadir angles subtending the Earth internal shells as parametrised in Table 1, for a detector located at the Earth surface
In a realistic case, the exposure must be provided by the experiment. For this purpose, one can provide an exposure file via the option of the function
, which shall contain the tabulated values of the exposure. By default it is assumed that the exposure is tabulated in values of the nadir angle \(\eta \), but in some cases, the experiments provide the exposure tabulated in either the zenith angle \(\theta \) or \(\cos \theta \). In those cases, one must specify which angle is used for the tabulation with the options
or
, respectively. If an exposure file is provided, the latitude is no longer required, and if the argument
is provided it will be ignored. Note that irrespective of the original tabulated values, the function
only returns values tabulated in \(\eta \).
Lastly, PEANUTS provides the averaged probability of oscillation at detector location taking into account the finite time exposure, as in Eq. (78), with the function
![figure df](http://media.springernature.com/lw685/springer-static/image/art%3A10.1140%2Fepjc%2Fs10052-024-12423-3/MediaObjects/10052_2024_12423_Figdf_HTML.png)
which has the same arguments as the function, but without the nadir angle
, and adds the same optional arguments as
, with the final addition of an optional argument
to select integrating only the nadir angles corresponding to the night period \(\eta < \pi /2\), with
, or the day period \(\eta \ge \pi /2\), with
. Note that this function requires the input neutrino state to be on the mass basis, since the integration is performed for an incoming incoherent flux of mass eigenstates, and thus it is not possible to provide a state on the flavour basis.
6 Quick start guide
PEANUTS is an open-source software written in Python, and as such we expect it to run seamlessly in every Python 3 environment, irrespective of the architecture. Nevertheless it has been tested thoroughly on Linux and Mac OS X systems. An example installation guide using the conda environment can be found in Appendix A. PEANUTS is optimised to run fast with minimal I/O operations, in order to allow effortless interface with other frameworks. Hence, it uses extensively the pre-compile numpy package as well as just-in-time compilation from numba. The full list of required and optional packages is as follows
-
numpy: fast pre-compiled array operations
-
numba: just-in-time compilation of functions and classesFootnote 9
-
os: file paths
-
copy: shallow and deep copies of objects
-
time: timing information
-
math, cmath, mpmath: mathematical operations
-
scipy: integration and interpolation routines
-
pyinterval: define integration intervals
-
decimal: output formatting
-
pandas: reading of csv files
-
pyyaml: reading of yaml files Optional
-
pyslha: reading of slha files Optional
-
gitpython: extract git tags Optional.
There are two operational modes of PEANUTS, which we will call the simple and expert modes. The simple mode allows PEANUTS to be run just from the command line, appending the input parameters as arguments to the command. Naturally this is a more limited mode as only provides a fraction of the functionalities, but it is a fast way to run PEANUTS just from the command line. The expert mode uses all of the functionalities in PEANUTS, and thus requires a configuration file, in YAML format, to be written.
In the simple mode one can run one of two provided scripts and
. The first script computes the probability of neutrinos at the surface of the Sun, and has a signature
![figure do](http://media.springernature.com/lw685/springer-static/image/art%3A10.1140%2Fepjc%2Fs10052-024-12423-3/MediaObjects/10052_2024_12423_Figdo_HTML.png)
where and
are mandatory arguments that refer to the neutrino energy, in MeV, and fraction respectively. The list of available neutrino fractions is
.Footnote 10 With no options provided, the remaining arguments are required to populate the PMNS matrix and the mass splittings. However, if the option
is provided, a file location is expected after the flag, corresponding to a SLHA file where the neutrino parameters are defined, and thus only two arguments are required. Note that this method only works if the package pyslha is installed. Other options are
for a different solar model file,
for verbose output and
to print usage information.
The second script computes the probability of neutrinos at a given experimental location below the Earth’s surface. It is used in the following way
![figure dz](http://media.springernature.com/lw685/springer-static/image/art%3A10.1140%2Fepjc%2Fs10052-024-12423-3/MediaObjects/10052_2024_12423_Figdz_HTML.png)
where, as before, one can provide the full PMNS parameters and mass splittings explicitly, or as an SLHA file (with the
option). In addition one must provide the initial neutrino state with the option
in the flavour basis, or
in the mass basis for an incoherent incoming flux. The neutrino state must be given as comma-separated list of three real or complex numbers, without spaces in between them, e.g.
![figure ed](http://media.springernature.com/lw685/springer-static/image/art%3A10.1140%2Fepjc%2Fs10052-024-12423-3/MediaObjects/10052_2024_12423_Figed_HTML.png)
Other necessary arguments are the neutrino energy , in MeV, the nadir angle,
, in radians, and the depth of the experiment
, in meters. Additional options include
to provide a different Earth density file,
to perform the computations for antineutrinos,
or
to select either analytical or numerical evolution,
for verbose output and
to print usage information.
The expert mode allows the user to exploit all the functionalities of PEANUTS. It requires writing a configuration file in YAML format, hence this mode is only available if the optional pyyaml module is installed. For a given YAML file, the expert mode can then be used by using the executable in the following way
![figure eo](http://media.springernature.com/lw685/springer-static/image/art%3A10.1140%2Fepjc%2Fs10052-024-12423-3/MediaObjects/10052_2024_12423_Figeo_HTML.png)
Since most of the options are provided in the YAML file, this command only takes the options for verbose output and
to print usage info. An example YAML file to compute the probability at the surface of the Sun can be seen below
![figure er](http://media.springernature.com/lw685/springer-static/image/art%3A10.1140%2Fepjc%2Fs10052-024-12423-3/MediaObjects/10052_2024_12423_Figer_HTML.png)
The YAML file must contain the and
nodes, as well as either the
,
or
nodes. The
and
nodes can appear simultaneously to combine the effects, whereas the
node cannot be combined with either. The
node must simply contain a real number representing the neutrino energy in MeV. The
node can either contain a map of the neutrino parameters, as in the example above, or a single string with the location of a SLHA file (provided pyslha is installed), always relative to the location of the
executable, in the following way
![figure fd](http://media.springernature.com/lw685/springer-static/image/art%3A10.1140%2Fepjc%2Fs10052-024-12423-3/MediaObjects/10052_2024_12423_Figfd_HTML.png)
The node must contain a map with at least an entry for the neutrino fraction
. As above, the list of available neutrino fractions is
. By default, this will compute and print the probabilities of oscillation at Sun exit for all flavour eigenstates, but it can be disabled with the entry
. Additionally, one can choose to print the total flux with
(defaults to
) and the distorted or undistorted spectrum with
or
, both of which are disabled by default. Lastly one can select the specific solar model to use with the entry
, the flux file with
and the spectrum files with the entry
. Note that if the solar model is not known to PEANUTS, in addition to the path to the relevant files, one must provide the location within those files where the information can be found, that is the entries
,
,
,
,
,
and
, in the format described above in Sect. 2.
The node must contain a map with necessary entries to compute the probability at some location on Earth. Consequently, it requires an entry for the depth under the Earth’s surface,
, and either a nadir angle
or a
. In addition, if the
node is not present in the YAML file, a neutrino state is required as the
entry (see below for an example), as well as an entry to specify in which basis it is,
(coherent) or
(incoherent). If the entry
is select, the computations will be performed for an antineutrino. One can provide a user-defined Earth density profile by providing a density file with the entry
, and indicate whether the density comes from tabulated data, with the entry
or from a custom analytical expression, with the entry
. It is also possible to choose either the numerical or analytical computation of the evolutor with
or
(the latter being the default). Lastly, if the entry
is present, the probabilities will be computed integrated over exposure, and thus one provides entries to modify the normalization, days interval, number of samples, exposure file and exposure angle (see Sect. 5 for the meaning of these quantities) with the options
(
or
),
([
,
]),
(number of samples),
(path) and
(
,
or
), respectively. An example YAML file with only the earth node can be seen below
![figure gx](http://media.springernature.com/lw685/springer-static/image/art%3A10.1140%2Fepjc%2Fs10052-024-12423-3/MediaObjects/10052_2024_12423_Figgx_HTML.png)
The node must contain the minimal requirements to compute oscillations in vacuum. This means it requires an input neutrino
and its
, as for the earth oscillations above. It must also contain the distance traveled as
, in km. Lastly, optionally one can request vacuum oscillations for antineutrinos with
, and to switch on or off the printing of the probabilities or the evolved state with the
and
options, respectively.
By default, the results of a PEANUTS run will be printed to screen, but one can redirect the output to a file by adding the node to the YAML file. This node must contain a single string corresponding to the output file location, which will be created if it does not exist, or
to print to screen (default). As an example, in order to redirect output to a file called out.dat in the same directory as the executable, the following node must be added to the YAML file
![figure hh](http://media.springernature.com/lw685/springer-static/image/art%3A10.1140%2Fepjc%2Fs10052-024-12423-3/MediaObjects/10052_2024_12423_Fighh_HTML.png)
Finally, PEANUTS allows the possibility to run simple grid scans of the input parameters provided in the YAML file. This can be achieved easily by providing a range of values instead of a single real value for the parameters. This range can be provided as , where a specific step size is selected, or
, where the step will be computed so that a total of 10 samples for the parameter are produced. For instance, to scan over the energy between 20 and 100 MeV, with a step of 10 MeV, one could add the following to the YAML file.
![figure hk](http://media.springernature.com/lw685/springer-static/image/art%3A10.1140%2Fepjc%2Fs10052-024-12423-3/MediaObjects/10052_2024_12423_Fighk_HTML.png)
Survival probability at the surface of the Sun for \(^8B\) (left) and hep (right) neutrinos. The solid lines are the PEANUTS predictions, the dashed lines are the digitised curves for the SNO experiment, from Fig. 6.3 in [35]
PEANUTS can perform such simplistic grid scans on the neutrino energy (as seen above), as well as on any neutrino parameter (\(\Delta m_{21}^2\), \(\Delta m_{3l}^2\), \(\theta _{12}\), \(\theta _{13}\), \(\theta _{23}\) and \(\delta \)),Footnote 11 and on the nadir angle . Furthermore, one can scan a parameter in log scale by setting the parameter entry in the YAML file as
, in which case
,
and
are taken to be in log scale too. As these are crude grid scans, we do not recommend using this functionality for thorough scans of the full neutrino parameter space. For that purpose one should use smart sampling algorithms (see [59]), which can be easily interfaced with PEANUTS.Footnote 12
6.1 Validation
We have validated the results from PEANUTS with those published by the SNO experiment [35, 36], both against their predictions, e.g. fluxes and spectra, and their measured data, e.g. exposure and observed events. Here we document some of the validation tests that were performed. These can be reproduced by running the file shipped with PEANUTS, in the following way
![figure hr](http://media.springernature.com/lw685/springer-static/image/art%3A10.1140%2Fepjc%2Fs10052-024-12423-3/MediaObjects/10052_2024_12423_Fighr_HTML.png)
which allows for additional options to be supplied, such as to add a custom solar model,
to add a custom earth density profile,
to modify the default neutrino parameters with an SLHA file, and the ever present options
for debug output and
for usage info.
In order to compare the probability results with those from SNO, we use the same input values for the neutrino parameters, \(\theta _{12}\), \(\theta _{13}\), \(\Delta m_{21}^2\) and \(\Delta m_{3l}^2 = \Delta m_{31}^2\). The values of \(\theta _{23}\) and \(\delta \) are, for the most part, irrelevant for this comparison, but required by PEANUTS to build the full PMNS matrix, so for those we take the values found in [18]. Thus, the values used here are
With these values, we can compare in Fig. 6 the prediction from our code with the SNO survival probabilities at the surface of the Sun for the \({}^8B\) and hep neutrinos, digitised from Fig. 6.3 in [35]. Naturally, for the same Solar model, the predictions of PEANUTS for each neutrino fraction match very well that reported by the SNO experiment.
Neutrino spectrum for the \(^8B\) (left) and hep (right) neutrino fractions at the surface of the Sun. Solid lines ares are the PEANUTS predictions for the distorted spectrum (with oscillations). The dotted lines are the undistorted spectrum (no oscillations). Dashed lines are computing distorting the spectrum with the survival probability from the digitised curves for the SNO experiment, from Fig. 6.3 in [35]
In addition to comparing the survival probability, we can compare the distorted (i.e. including oscillations) energy spectrum of neutrinos at the surface of the Sun. Figure 7 shows the effect of the oscillation distortion on the electron neutrino spectrum, as well as the comparison with the spectrum distorted by the SNO survival probability. For this comparison we have used the spectra in [53] for the \(^8B\) fraction and [52] for the hep fraction.
Relative error between the numerical and analytical computations of the probability after Earth regeneration as a function of the energy for a chosen value of \(\eta = 0\) (left). Speed comparison of the analytical and numerical computations by PEANUTS and the computations by nuSQuIDS for two values of the neutrino energy (right)
In addition to validating the results against those of the SNO experiment, we have also validated our analytical approximation from Sect. 4.1 against the full numerical calculation described at the beginning of Sect. 4. Figure 8 shows the oscillation pattern of the neutrino flavour eigenstates for a neutrino crossing all Earth shells, \(\eta =0\) (left), and for a neutrino coming from the horizon, \(\eta =\pi /2\) (right), starting from a pure mass neutrino eigenstate \(\nu _\alpha = U_{\alpha 2}\). As expected, only in the first case the oscillations are significant, since the neutrinos traverse the whole Earth before reaching the detector, whereas in the second case the neutrino path only crosses part of Earth’s crust between the surface and the detector, and thus only minimal oscillation occurs. Since only the numerical computation can provide the full trajectory, the oscillations shown in Fig. 8 correspond exclusively to the numerical mode. However, for the same choice of parameters we have also used the analytical computation for the final probabilities, and the error reported in the figures precisely corresponds to the relative difference between the numerical and analytical models.Footnote 13 The difference is almost negligible, of the order of \(10^{-4}\) for the night period (left), and effectively zero during the day period. The left panel in Fig. 9 confirms this by showing the relative error as a function of the energy for the worse case of the ones above (i.e. during the night) for \(\eta =0\), where it can clearly be noticed that the error is small for all values of the energy, and only approaches \(\sim 10^{-2}\) at the worst for \(E_\nu \sim 10^2\) MeV. This comparison serves as a validation that the approximated analytical solution is a very good approximation and, since it is much faster, can be used in place of the full numerical evaluation.Footnote 14 For completeness, for the production of Fig. 9, the unitarity of the evolution matrix was confirmed, and no unphysical solutions were found. Figure 9 also shows a comparison with the results from the state-of-the-art tool for neutrino oscillations nuSQuIDS [62], where it can be seen that the agreement is also good with a relative error consistently below \(10^{-2}\). Therefore, the massive increase in computational speed provided by PEANUTS certainly justifies the small loss in precision.Footnote 15
To quantify this speed increase gained with the analytical implementation, we show in the right panel of Fig. 9 the computational time of the numerical and analytical computations as a function of number of evaluations, for two values of the neutrino energy \(E_\nu = 10\) MeV and \(E_\nu = 100\) MeV. For small number of evaluations the computational time is very similar between the analytical and numerical methods, but for a number of evaluations \(N \gtrsim 10\), the computational time for the numerical method increases drastically and soon becomes computationally unfeasible. In contrast the total CPU time of the analytical method remains constant for increasing number of evaluations, and it is mostly dominated by the overhead of the initialisation step. Only for \(N \gtrsim 10^5\) the computation time starts to increase noticeably, but still remains manageable up to large N. To emphasise further the increase of speed with the analytical implementation, the relative error shown on the left-hand panel of Fig. 9 required over \(9.2 \times 10^3\) seconds of CPU time to perform the numerical computations for all energies on a 2,3 GHz Intel Core i7 quad-core, compared to 5 s with the analytical method. Lastly, the right panel of Fig. 9 also shows a comparison with nuSQuIDS. For low number of evaluations, nuSQuIDS clearly outperforms PEANUTS, by virtue of being written in C++, but for large number of evaluations, as early as \(N\gtrsim 5\) for low energies and \(N\gtrsim 50\) for high energies, the analytical implementation of PEANUTS becomes significantly faster and, again, is the only feasible option for these large number of evaluations. It is worth noting that this comparison is done in the worst case scenario, where \(\eta =0\) and the neutrino path crosses almost the whole Earth. In less extreme scenarios, the computational speed of the numerical implementation of PEANUTS and the computations by nuSQuIDS are somewhat faster than shown.
Section 5 showed how to compute the ideal exposure time for a hypothetical experiment. For specific experiments, however, the exposure is often provided tabulated in bins of either the nadir angle \(\eta \), the zenith angle \(\theta \) or \(\cos \theta \). In the case of the SNO experiment, the exposure is provided in bins of \(\cos \theta \), hence we convert it into bins of \(\eta \) in order to match fit our computations of the probability. We then show in Fig. 10 the exposure of the SNO experiment compared to the ideal case. As SNO is located at a latitude of \(46.475^{\circ }\), we can see that it matches very well the ideal exposure at \(46^{\circ }\), with a slight under-exposure during the day and a slight over-exposure, during the night, which is consistent with the livetime of the SNO experiment.Footnote 16
Exposure of the SNO experiment in nadir angle \(\eta \) (red), compared to the ideal exposure for hypothetical experiments at various latitudes. Coloured bands are as in Fig. 5
Finally, in order to match the computations of PEANUTS with that of the SNO experiment, we reproduce the statistical fit of the oscillation parameters \(\theta _{12}\) and \(\Delta m_{21}^2\) performed by the SNO experiment. Figure 11 shows the results of the fit as a profile likelihood ratio. The dark purple star corresponds to the best fit point as found using PEANUTS, while the red star is that reported by the SNO collaboration. Similarly the purple and blue shared contours correspond to the 68% and 95% confidence intervals around the best fit point for our results, whereas the red dashed contours are the same from the SNO results. Note that this comparison, both our results and those from the SNO experiment, corresponds only to Phase I of the experiment [36], and for normal ordering of neutrino masses.Footnote 17 Details about this comparison will appear in a global fit by the GAMBIT Neutrino working group [60]. The results show a decent match with those reported by the SNO collaboration, with the best fit points laying very close to each other. The shape and reach of the contours is larger in our study, which can be attributed to a slight difference on the treatment of systematic uncertainties. It is crucial here to emphasize that a parameter scan of this magnitude is only feasible with the analytical implementation of PEANUTS, due to the large number of evaluations required. For reference, the scan sampled around 380k parameter points, each of which performed, on average, around 5k evaluations of the probability.
Profile likelihood ratio for the results of a statistical fit of the oscillation parameters \(\theta _{12}\) and \(\Delta m_{21}^2\) using PEANUTS (purple-blue) compared to the results reported by the Phase I of the SNO experiment (red). The fit was performed using GAMBIT [67] and the figure was generated with pippi [68]
7 Conclusions and outlook
We have presented in this paper PEANUTS, a fast and flexible software to automatically compute the energy spectra of solar active neutrinos, for arbitrary solar models and custom Earth density profiles. PEANUTS assumes adiabatic propagation of neutrinos within the Sun, and provides analytic computation for the coherent evolution of active neutrinos while crossing the Earth, thus completely avoiding any time-consuming numerical integration. This, together with extensive use of pre-compiled and just-in-time compilation optimisations, makes the software extremely fast and optimised for large-scale parameter scans.
PEANUTS provides algorithms to automatically perform the full chain of computations to simulate a solar neutrino experiment, as well as easy individual access to the modules and functions for specific computations. These include, for instance: mixing parameters in matter, incoherent flux at Sun surface, evolved neutrino state after Earth crossing, Earth density profile for given nadir angle, evolutor operator for given neutrino energy and nadir angle, nadir exposure for an experiment between two arbitrary days of the year, integrated probability of oscillation over a finite observation time. In the present version of PEANUTS we focused on providing automatisation for solar neutrinos, but the modularity of PEANUTS also allows a user to employ, for example, the function to compute the evolution of an atmospheric neutrino, or simulate the evolved spectra for hypothetical neutrinos produced in solar flares.
PEANUTS can be run in simple mode, for quick computations directly from the command line, as well as in expert mode, in which case the user provides a set of comprehensive instructions in the form of a YAML file. The expert mode is thus ideal for scripting, as it exploits all the possible functionalities of PEANUTS, and to perform simple explorations of the parameter space, as it natively allows the scanning of various input parameters on a grid.
We extensively validated PEANUTS against the results of the SNO experiment, and provide ready-to-run scripts to reproduce our results. We observed excellent agreement for the survival probability at Sun surface, distorted neutrino spectra for the \({}^8B\) and hep channels, annual nadir exposure and ability to reproduce the profile likelihood of the Phase I of the experiment for the parameters \(\theta _{12}\) and \(\Delta m^2_{21}\). We also validated our analytic computation of the evolved neutrino state with a numerical solution, and find excellent agreement on a wide range of energies. We performed a quick estimation of the CPU time scaling of the analytical and numerical computations with the number of evaluations, and conclusively found our analytical implementation to significantly outperform the numerical one for as few as \({\mathcal {O}}(10)\) evaluations. We also compared our results with those of nuSQuIDS and found good agreement as well. As with the numerical implementation, we found that our analytical solution vastly outperforms nuSQuIDS in terms of the computational time. PEANUTS thus presents a very fast alternative to existing tools without appreciable loss of precision. Therefore, due to its speed and user-friendly interface, we argue that PEANUTS is a very capable and useful tool for the computation of the propagation of neutrinos in the Sun and through Earth and a crucial addition to the software toolbox of the neutrino physics community.
Concerning the limitations of the software, the current PEANUTS version assumes adiabatic evolution within the Sun, which provides an excellent approximation for solar neutrino energies given the currently allowed range of oscillation parameters; the user is thus encouraged to check the validity of this regime if working in non-standard scenarios. We also stress that the code assumes coherent forward scattering for the propagation of neutrinos in matter: for Earth-type densities, inelastic scattering becomes important at energies above the TeV scale, and such effects must thus be taken into account. We plan to incorporate a more general routine for the arbitrary evolution of neutrinos in the Sun in a future version of PEANUTS. For inelastic scattering, other softwares are currently available, cf. e.g. [62, 69,70,71,72,73]. Though PEANUTS v1.0 does not yet provide all the functionalities that other software tools have, it vastly outperforms them in speed, which can be a critical factor in e.g. global studies, where the number of evaluations is very large.
Further improvements that will extend the scope of PEANUTS are under investigation, most notably the implementation of algorithms for the automatic computation of the atmospheric neutrino flux at a given location, as well as the simulation of accelerator neutrinos beams.
Data Availability
This manuscript has associated data in a data repository. [Authors’ comment: Data repository can be found at https://github.com/michelelucente/PEANUTS.]
Notes
Slow or fast here refers to the importance of variation of matter density over a neutrino oscillation length scale.
The oscillation dynamics would be different in case of a coherent flux [40].
Numerical data are available at http://www.sns.ias.edu/~jnb/.
See [46] for a comprehensive discussion on the relations between fields, plane waves and momentum eigenstates.
Since we always assume ultrarelativistic neutrinos, we can interchangeably use traveled distance x or elapsed time t to identify the evolved neutrino state.
For now we drop the tilde from the “reduced” evolutor \(\tilde{{\mathcal {U}}}\) for convenience, and to avoid confusion with the average \(\bar{{\mathcal {U}}}\). We will recover the notation at the end of the section when computing the full evolutor.
The Python package numba is an experimental package and thus prone to errors. In spite of that, numba is required to run PEANUTS, since computational speed is one of the main goals. As of the release version, PEANUTS works smoothly with numba 0.56. Some conda environments have shown issues with versions \(\ge 0.57\). In those cases, we recommend reverting back to 0.56, which should work effortlessly.
The default \(^7Be\) spectrum comes from ground-state transitions, which can also be provided as
. One can alternatively use the transitions from the excited \(^7Be\) state with
.
Although it is technically possible to specify a range for \(\Delta m_{3l}^2\) that includes negative and positive values, we do not recommend doing so, as the meaning of parameter changes from negative to positive (as the ordering of mass eigenstates change), which is statistically inconsistent. Hence we recommend scanning negative and positive values separately.
This was used, for instance, in an upcoming global study of neutrino oscillations by the GAMBIT neutrino working group [60].
Given \((c_e, c_\mu , c_\tau )\) the complex coefficients defining the final (evolved) state (cf. Eq. 18), the relative error is defined here as the norm of the difference between the numerical and analytical values of it, divided by the norm of their sum. This ensures that errors in both real and imaginary parts of the solution are correctly taken into account.
We choose not to compare our results with other neutrino tools, such as GLoBES [63, 64], Prob3++ [65] or nuCRAFT [66], as their main purpose is not solar neutrinos, but rather long baseline experiments, for the first two, and atmospheric neutrinos, for the latter, whereas nuSQuIDS is a general purpose tool.
This pattern is due to most of the maintenance and calibration operations taking place during daytime [35].
We have repeated the fit for inverted ordering and found the results to be almost identical to that of normal ordering, which is expected given that the oscillation of solar neutrinos is largely independent of \(\Delta m^2_{3l}\).
References
J.N. Bahcall, Neutrino Astrophysics (Cambridge University Press, Cambridge, 1989)
J.N. Bahcall, A.M. Serenelli, S. Basu, New solar opacities, abundances, helioseismology, and neutrino fluxes. Astrophys. J. Lett. 621, L85 (2005). https://doi.org/10.1086/428929. arXiv:astro-ph/0412440
J.N. Bahcall, R. Davis, Jr., An account of the development of the solar neutrino problem
R. Davis Jr., D.S. Harmer, K.C. Hoffman, Search for neutrinos from the sun. Phys. Rev. Lett. 20, 1205 (1968). https://doi.org/10.1103/PhysRevLett.20.1205
J.N. Bahcall, W.A. Fowler, I. Iben Jr., R.L. Sears, Solar neutrino flux. Astrophys. J. 137, 344 (1963). https://doi.org/10.1086/147513
R.L. Sears, Helium content and neutrino fluxes in solar models. Astrophys. J. 140, 477 (1964). https://doi.org/10.1086/147942
P. Pochoda, H. Reeves, A revised solar model with a solar neutrino spectrum. Planet. Space Sci. 12, 119 (1964). https://doi.org/10.1016/0032-0633(64)90116-3
J.N. Bahcall, Solar neutrinos. I: theoretical. Phys. Rev. Lett. 12, 300 (1964). https://doi.org/10.1103/PhysRevLett.12.300
D. Ezer, A.G.W. Cameron, A study of solar evolution. Can. J. Phys. 43, 1497 (1965). https://doi.org/10.1139/p65-140
D. Ezer, A.G.W. Cameron, Solar evolution with varying g. Can. J. Phys. 44, 593 (1966). https://doi.org/10.1139/p66-050
J.N. Bahcall, M. Cooper, P. Demarque, Dependence of the \(\hat{8}\)\(\{\)B\(\}\) solar neutrino flux on heavy element composition. ApJ 150, 723 (1967). https://doi.org/10.1086/149373
G. Shaviv, J.N. Bahcall, W.A. Fowler, Dependence of the \(\hat{8}\)\(\{\)B\(\}\) solar neutrino flux on the rate of the reaction \(\hat{3}\)He(\(\hat{3}\)He,2p)\(^{4}\)He. ApJ 150, 725 (1967). https://doi.org/10.1086/149374
J.N. Bahcall, N.A. Bahcall, W.A. Fowler, G. Shaviv, Solar neutrinos and low-energy nuclear cross sections. Phys. Lett. B 26, 359 (1968). https://doi.org/10.1016/0370-2693(68)90610-2
SNO Collaboration, Measurement of the rate of \(\nu _e+d \rightarrow p+p+e^-\) interactions produced by \(^8\)B solar neutrinos at the Sudbury Neutrino Observatory. Phys. Rev. Lett. 87, 071301 (2001). https://doi.org/10.1103/PhysRevLett.87.071301. arXiv:nucl-ex/0106015
Z. Maki, M. Nakagawa, S. Sakata, Remarks on the unified model of elementary particles. Prog. Theor. Phys. 28, 870 (1962). https://doi.org/10.1143/PTP.28.870
B. Pontecorvo, Neutrino experiments and the problem of conservation of leptonic charge. Zh. Eksp. Teor. Fiz. 53, 1717 (1967)
V.N. Gribov, B. Pontecorvo, Neutrino astronomy and lepton charge. Phys. Lett. B 28, 493 (1969). https://doi.org/10.1016/0370-2693(69)90525-5
I. Esteban, M.C. Gonzalez-Garcia, M. Maltoni, T. Schwetz, A. Zhou, The fate of hints: updated global analysis of three-flavor neutrino oscillations. JHEP 09, 178 (2020). https://doi.org/10.1007/JHEP09(2020)178. arXiv:2007.14792
P.F. de Salas, D.V. Forero, S. Gariazzo, P. Martínez-Miravé, O. Mena, C.A. Ternes et al., 2020 global reassessment of the neutrino oscillation picture. JHEP 02, 071 (2021). https://doi.org/10.1007/JHEP02(2021)071. arXiv:2006.11237
F. Capozzi, E. Di Valentino, E. Lisi, A. Marrone, A. Melchiorri, A. Palazzo, Global constraints on absolute neutrino masses and their ordering. Phys. Rev. D 95, 096014 (2017). https://doi.org/10.1103/PhysRevD.95.096014. arXiv:2003.08511
BOREXINO Collaboration, Experimental evidence of neutrinos produced in the CNO fusion cycle in the Sun. Nature 587, 577 (2020). https://doi.org/10.1038/s41586-020-2934-0. arXiv:2006.15115
BOREXINO Collaboration, First simultaneous precision spectroscopy of \(pp\), \(^7\)Be, and \(pep\) solar neutrinos with Borexino phase-II. Phys. Rev. D 100, 082004 (2019). https://doi.org/10.1103/PhysRevD.100.082004. arXiv:1707.09279
BOREXINO Collaboration, Comprehensive measurement of \(pp\)-chain solar neutrinos. Nature 562, 505 (2018). https://doi.org/10.1038/s41586-018-0624-y
Hyper-Kamiokande Proto Collaboration, Solar neutrino physics at hyper-Kamiokande. PoS ICRC2019, 1037 (2020). https://doi.org/10.22323/1.358.1037
IceCube Collaboration, Search for GeV neutrino emission during intense gamma-ray solar flares with the IceCube Neutrino Observatory. Phys. Rev. D 103, 102001 (2021). https://doi.org/10.1103/PhysRevD.103.102001. arXiv:2101.00610
Super-Kamiokande Collaboration, Searching for neutrinos from solar flares across solar cycles 23 and 24 with the Super-Kamiokande detector. arXiv:2210.12948
IceCube Collaboration, Recent progress in solar atmospheric neutrino searches with IceCube. PoS ICRC2021, 1174 (2021). https://doi.org/10.22323/1.395.1174. arXiv:2107.13696
IceCube Collaboration, Latest results and sensitivities for solar dark matter searches with IceCube. PoS ICRC2017, 912 (2018). https://doi.org/10.22323/1.301.0912
Super-Kamiokande Collaboration, Determination of solar neutrino oscillation parameters using 1496 days of Super-Kamiokande I data. Phys. Lett. B 539, 179 (2002). https://doi.org/10.1016/S0370-2693(02)02090-7. arXiv:hep-ex/0205075
J.N. Bahcall, C. Pena-Garay, Global analyses as a road map to solar neutrino fluxes and oscillation parameters. JHEP 11, 004 (2003). https://doi.org/10.1088/1126-6708/2003/11/004. arXiv:hep-ph/0305159
Super-Kamiokande Collaboration, Testing non-standard interactions between solar neutrinos and quarks with Super-Kamiokande. arXiv:2203.11772
Super-Kamiokande Collaboration, Search for solar electron anti-neutrinos due to spin-flavor precession in the Sun with Super-Kamiokande-IV. Astropart. Phys. 139, 102702 (2022). https://doi.org/10.1016/j.astropartphys.2022.102702. arXiv:2012.03807
L. Wolfenstein, Neutrino oscillations in matter. Phys. Rev. D 17, 2369 (1978). https://doi.org/10.1103/PhysRevD.17.2369
S.P. Mikheyev, A.Y. Smirnov, Resonance amplification of oscillations in matter and spectroscopy of solar neutrinos. Sov. J. Nucl. Phys. 42, 913 (1985)
N.F. Fiúza de Barros, Precision measurement of neutrino oscillation parameters: combined three-phase results of the Sudbury Neutrino Observatory. Ph.D. thesis, Lisbon U. (2011)
SNO Collaboration, Determination of the \(\nu _e\) and total \(^8\)B solar neutrino fluxes with the Sudbury neutrino observatory phase I data set. Phys. Rev. C 75, 045502 (2007). https://doi.org/10.1103/PhysRevC.75.045502. arXiv:nucl-ex/0610020
J.N. Bahcall, M.H. Pinsonneault, S. Basu, Solar models: current epoch and time dependences, neutrinos, and helioseismological properties. Astrophys. J. 555, 990 (2001). https://doi.org/10.1086/321493. arXiv:astro-ph/0010346
S.P. Mikheev, A.Y. Smirnov, Neutrino oscillations in matter, in International Symposium on Weak and Electromagnetic Interactions in Nuclei, pp. 405–415 (1987)
E. Lisi, D. Montanino, Earth regeneration effect in solar neutrino oscillations: an analytic approach. Phys. Rev. D 56, 1792 (1997). https://doi.org/10.1103/PhysRevD.56.1792. arXiv:hep-ph/9702343
D. Bruss, L.M. Sehgal, Distinguishing a coherent from an incoherent mixture of neutrino flavors. Phys. Lett. B 216, 426 (1989). https://doi.org/10.1016/0370-2693(89)91144-1
S.P. Mikheev, A.Y. Smirnov, Neutrino oscillations in a variable density medium and neutrino bursts due to the gravitational collapse of stars. Sov. Phys. JETP 64, 4 (1986). arXiv:0706.0454
P.B. Denton, H. Minakata, S.J. Parke, Compact perturbative expressions for neutrino oscillations in matter. JHEP 06, 051 (2016). https://doi.org/10.1007/JHEP06(2016)051. arXiv:1604.08167
P.B. Denton, S.J. Parke, Addendum to “Compact perturbative expressions for neutrino oscillations in matter”, arXiv:1801.06514
A. Ioannisian, S. Pokorski, Three neutrino oscillations in matter. Phys. Lett. B 782, 641 (2018). https://doi.org/10.1016/j.physletb.2018.06.001. arXiv:1801.10488
P.B. Denton, H. Minakata, S.J. Parke, Comment on arXiv:1801.10488v3
G. Fantini, A Gallo Rosso, F. Vissani, V. Zema, Introduction to the formalism of neutrino oscillations. Adv. Ser. Direct. High Energy Phys. 28, 37 (2018). https://doi.org/10.1142/9789813226098_0002. arXiv:1802.05781
T.-K. Kuo, J.T. Pantaleone, Neutrino oscillations in matter. Rev. Mod. Phys. 61, 937 (1989). https://doi.org/10.1103/RevModPhys.61.937
H.A. Bethe, J.N. Bahcall, Solar neutrinos and the Mikheyev–Smirnov–Wolfenstein theory. Phys. Rev. D 44, 2962 (1991). https://doi.org/10.1103/PhysRevD.44.2962
D. Harley, T.-K. Kuo, J.T. Pantaleone, Solar neutrinos with three flavor mixings. Phys. Rev. D 47, 4059 (1993). https://doi.org/10.1103/PhysRevD.47.4059. arXiv:hep-ph/9208241
E.K. Akhmedov, M.A. Tortola, J.W.F. Valle, A simple analytic three flavor description of the day night effect in the solar neutrino flux. JHEP 05, 057 (2004). https://doi.org/10.1088/1126-6708/2004/05/057. arXiv:hep-ph/0404083
N. Vinyoles, A.M. Serenelli, F.L. Villante, S. Basu, J. Bergström, M.C. Gonzalez-Garcia et al., A new generation of standard solar models. Astrophys. J. 835, 202 (2017). https://doi.org/10.3847/1538-4357/835/2/202. arXiv:1611.09867
J.N. Bahcall, Gallium solar neutrino experiments: absorption cross-sections, neutrino spectra, and predicted event rates. Phys. Rev. C 56, 3391 (1997). https://doi.org/10.1103/PhysRevC.56.3391. arXiv:hep-ph/9710491
C.E. Ortiz, A. Garcia, R.A. Waltz, M. Bhattacharya, A.K. Komives, Shape of the B-8 alpha and neutrino spectra. Phys. Rev. Lett. 85, 2909 (2000). https://doi.org/10.1103/PhysRevLett.85.2909. arXiv:nucl-ex/0003006
J.N. Bahcall, R.K. Ulrich, Solar models, neutrino experiments and helioseismology. Rev. Mod. Phys. 60, 297 (1988). https://doi.org/10.1103/RevModPhys.60.297
J.N. Bahcall, The Be-7 solar neutrino line: a reflection of the central temperature distribution of the Sun. Phys. Rev. D 49, 3923 (1994). https://doi.org/10.1103/PhysRevD.49.3923. arXiv:astro-ph/9401024
W.T. Winter, S.J. Freedman, K.E. Rehm, J.P. Schiffer, The B-8 neutrino spectrum. Phys. Rev. C 73, 025503 (2006). https://doi.org/10.1103/PhysRevC.73.025503. arXiv:nucl-ex/0406019
F.J. Dyson, The radiation theories of Tomonaga, Schwinger, and Feynman. Phys. Rev. 75, 486 (1949). https://doi.org/10.1103/PhysRev.75.486
T. Ohlsson, H. Snellman, Three flavor neutrino oscillations in matter. J. Math. Phys. 41, 2768 (2000). https://doi.org/10.1063/1.533270. arXiv:hep-ph/9910546
S.S. AbdusSalam et al., Simple and statistically sound recommendations for analysing physical theories. Rep. Prog. Phys. 85, 052201 (2022). https://doi.org/10.1088/1361-6633/ac60ac. arXiv:2012.09874
GAMBIT Neutrino Workgroup Collaboration, Global analysis of neutrino oscillations with gambit (2023, in preparation)
IceCube Collaboration, Measurement of the multi-TeV neutrino cross section with IceCube using Earth absorption. Nature 551, 596 (2017). https://doi.org/10.1038/nature24459. arXiv:1711.08119
C.A. Argüelles, J. Salvado, C.N. Weaver, nuSQuIDS: a toolbox for neutrino propagation. Comput. Phys. Commun. 277, 108346 (2022). https://doi.org/10.1016/j.cpc.2022.108346. arXiv:2112.13804
P. Huber, M. Lindner, W. Winter, Simulation of long-baseline neutrino oscillation experiments with GLoBES (General Long Baseline Experiment Simulator). Comput. Phys. Commun. 167, 195 (2005). https://doi.org/10.1016/j.cpc.2005.01.003. arXiv:hep-ph/0407333
P. Huber, J. Kopp, M. Lindner, M. Rolinec, W. Winter, New features in the simulation of neutrino oscillation experiments with GLoBES 3.0: general long baseline experiment simulator. Comput. Phys. Commun. 177, 432 (2007). https://doi.org/10.1016/j.cpc.2007.05.004. arXiv:hep-ph/0701187
Prob3++: https://webhome.phy.duke.edu/~raw22/public/prob3++/
M. Wallraff, C. Wiebusch, Calculation of oscillation probabilities of atmospheric neutrinos using nuCraft. Comput. Phys. Commun. 197, 185 (2015). https://doi.org/10.1016/j.cpc.2015.07.010. arXiv:1409.1387
GAMBIT Collaboration, GAMBIT: the global and modular beyond-the-standard-model inference tool. Eur. Phys. J. C 77, 784 (2017). https://doi.org/10.1140/epjc/s10052-017-5321-8. arXiv:1705.07908
P. Scott, Pippi—painless parsing, post-processing and plotting of posterior and likelihood samples. Eur. Phys. J. Plus 127, 138 (2012). https://doi.org/10.1140/epjp/i2012-12138-3. arXiv:1206.2245
A. Gazizov, M.P. Kowalski, ANIS: high energy neutrino generator for neutrino telescopes. Comput. Phys. Commun. 172, 203 (2005). https://doi.org/10.1016/j.cpc.2005.03.113. arXiv:astro-ph/0406439
A.C. Vincent, C.A. Argüelles, A. Kheirandish, High-energy neutrino attenuation in the Earth and its associated uncertainties. JCAP 11, 012 (2017). https://doi.org/10.1088/1475-7516/2017/11/012. arXiv:1706.09895
A. Garcia, R. Gauld, A. Heijboer, J. Rojo, Complete predictions for high-energy neutrino propagation in matter. JCAP 09, 025 (2020). https://doi.org/10.1088/1475-7516/2020/09/025. arXiv:2004.04756
I. Safa, J. Lazar, A. Pizzuto, O. Vasquez, C.A. Argüelles, J. Vandenbroucke, TauRunner: a public Python program to propagate neutral and charged leptons. Comput. Phys. Commun. 278, 108422 (2022). https://doi.org/10.1016/j.cpc.2022.108422. arXiv:2110.14662
D. Garg et al., Neutrino propagation in the Earth and emerging charged leptons with nuPyProp. JCAP 01, 041 (2023). https://doi.org/10.1088/1475-7516/2023/01/041. arXiv:2209.15581
Anaconda software distribution (2020)
Python package index—pypi
Acknowledgements
We would like to thank Aaron Vincent for helpful comments about this work, Roberto Ruiz de Austri for testing and suggestions, and the rest of the GAMBIT community for useful discussions. We also thank Will Handley for access to HPC resources, as for this work we used the Cambridge Service for Data Driven Discovery(CSD3), part of which is operated by the University of Cambridge Research Computing on behalf of the STFC DiRAC HPC Facility (http://www.dirac.ac.uk). The DiRAC component of CSD3 was funded by BEIS capital funding via STFC capital grants ST/P002307/1 and ST/R002452/1 and STFC operations grant ST/R00689X/1. DiRAC is part of the National e-Infrastructure. ML is funded by the European Union under the Horizon Europe’s Marie Sklodowska-Curie project 101068791 – NuBridge. ML acknowledges financial support from the Alexander von Humboldt Foundation during the early stages of the work, and thanks the UCLouvain Centre for Cosmology, Particle Physics and Phenomenology (CP3) for hosting him during the final stage. TEG is funded by the Deutsche Forschungsgemeinschaft (DFG) through the Emmy Noether Grant No. KA 4662/1-1.
Author information
Authors and Affiliations
Corresponding author
Appendix A: Installation guide with the conda environment
Appendix A: Installation guide with the conda environment
In this Appendix we provide a short guide to install and run PEANUTS from scratch in a system-agnostic way, using the conda [74] and pip [75] package managers.
First of all the user shall create a separate working environment, to avoid conflicts with existing packages:
![figure hy](http://media.springernature.com/lw685/springer-static/image/art%3A10.1140%2Fepjc%2Fs10052-024-12423-3/MediaObjects/10052_2024_12423_Fighy_HTML.png)
The first line will create a new conda environment named peanuts, simultaneously installing in it the listed packages ensuring mutual compatibility in their versions. The second line activates this environment, while the third one installs the additional required packages that are not currently available via conda, using instead the pip package manager.
The user can now download PEANUTS and move to the folder containing its Python scripts:
![figure hz](http://media.springernature.com/lw685/springer-static/image/art%3A10.1140%2Fepjc%2Fs10052-024-12423-3/MediaObjects/10052_2024_12423_Fighz_HTML.png)
At this point PEANUTS should be installed and ready to run. The user can test it on the provided example input files, for instance:
![figure ia](http://media.springernature.com/lw685/springer-static/image/art%3A10.1140%2Fepjc%2Fs10052-024-12423-3/MediaObjects/10052_2024_12423_Figia_HTML.png)
The above-described procedure installs the latest version of the packages that are mutually compatible at a given time. It has been successfully tested at time of publication, and the resulting environment is provided in the PEANUTS folder as peanuts_env.yml. The user can reproduce this installation by running
![figure ib](http://media.springernature.com/lw685/springer-static/image/art%3A10.1140%2Fepjc%2Fs10052-024-12423-3/MediaObjects/10052_2024_12423_Figib_HTML.png)
This command will take care of installing both the pip and conda packages with versions as defined in peanuts_env.yml.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
Funded by SCOAP3.
About this article
Cite this article
Gonzalo, T.E., Lucente, M. PEANUTS: a software for the automatic computation of solar neutrino flux and its propagation within Earth. Eur. Phys. J. C 84, 119 (2024). https://doi.org/10.1140/epjc/s10052-024-12423-3
Received:
Accepted:
Published:
DOI: https://doi.org/10.1140/epjc/s10052-024-12423-3