NuRadioMC.utilities.cross_sections module

NuRadioMC.utilities.cross_sections.param(energy, inttype='cc', parameterization='ctw')[source]

Parameterization and constants as used in get_nu_cross_section() See documentation there for details.

NuRadioMC.utilities.cross_sections.csms(energy, inttype, flavors)[source]

Neutrino cross sections according to Amanda Cooper-Sarkar, Philipp Mertsch, Subir Sarkar JHEP 08 (2011) 042

NuRadioMC.utilities.cross_sections.get_nu_cross_section(energy, flavors, inttype='total', cross_section_type='hedis_bgr18')[source]

Returns neutrino cross-section

Parameters:
energy: float / array of floats

neutrino energies/momenta in standard units

flavors: float / array of floats

neutrino flavor (integer) encoded as using PDG numbering scheme, particles have positive sign, anti-particles have negative sign, relevant are:

  • 12: electron neutrino

  • 14: muon neutrino

  • 16: tau neutrino

inttype: str, array of str

interaction type. Options:

  • nc : neutral current

  • cc : charged current

  • total: total (for non-array type)

  • total_up : (only for ctw) total cross-section up uncertainty

  • total_down : (only for ctw) total cross-section down uncertainty

cross_section_type: {‘ctw’, ‘ghandi’, ‘csms’, ‘hedis_bgr18’}, default ‘hedis_bgr18’

defines model of cross-section. Options:

  • ctw : A. Connolly, R. S. Thorne, and D. Waters, Phys. Rev.D 83, 113009 (2011). cross-sections for all interaction types and flavors

  • ghandi : according to Ghandi et al. Phys.Rev.D58:093009,1998 only one cross-section for all interactions and flavors

  • csms : A. Cooper-Sarkar, P. Mertsch, S. Sarkar, JHEP 08 (2011) 042

  • hedis_bgr18 : Parameterization from arXiv:2004.04756v2 (prepared for JCAP)

Returns:
crscn: float / array of floats

Cross-section in m^2

NuRadioMC.utilities.cross_sections.get_interaction_length(Enu, density=5.723464435717068e+39, flavor=12, inttype='total', cross_section_type='hedis_bgr18')[source]

calculates interaction length from cross section

Parameters:
Enu: float

neutrino energy

density: float (optional)

density of the medium, default density of ice = 0.917 g/cm**3

flavors: float / array of floats

Neutrino flavor (integer) encoded as using PDG numbering scheme. For more information see get_nu_cross_section()

inttype: str, array of str

interaction type. For options see get_nu_cross_section()

cross_section_type: str (default: ‘hedis_bgr18’)

Defines model of cross-section. For options see get_nu_cross_section()

Returns:
L_int: float

interaction length

NuRadioMC.utilities.cross_sections.integrate_pwpl(y, x, low=None, high=None, full_output=False)[source]

Integrate y over x, assuming y(x) is a piecewise-continuous power law.

Analytic integral of y(x)dx, assuming y(x) is a piecewise-continuous power law; that is, y(x) = A x**b with different values for A and b between each pair of subsequent values.

The integration is always over the last axis of y, so x should either be of a compatible shape to y or be a 1D-array with length y.shape[-1]. The integral limits are from x[0] to x[-1] unless low or high are given.

Parameters:
yarray of floats

The values of the function to integrate.

xarray of floats

The values of the dependent variable to integrate over. Should match the last axis of y, which is always the axis which is integrated over. Additionally, x should be sorted.

lowfloat, optional

Extend the lower limit of the integral from x[0] to low, by linearly extrapolating (in log-log space). Note that low should satisfy 0 <= low < x[0]

highfloat, optional

Extend the upper limit of the integral from x[-1] to high, by linearly extrapolating (in log-log space). Note that high should satisfy high > x[-1].

full_outputbool, optional

If True, returns additional output. Default is False.

Returns:
resfloat | array of floats

The result of the integration over the last axis of y.

(integral, x)tuple of arrays, optional

(Only if full_output==True) A tuple with the integral Y(x) and the (optionally extended to include low and high) array x. Y(x) is the value of the integral integrated from low to x, and will have the same length as x in the last axis.

The integral Y(x) may be useful if e.g. y(x) describes a probability distribution function (PDF), in which case Y(x) is the cumulative distribution function (CDF).

Notes

The function y is assumed to be of the form \(y_i(x) = A_i x^{b_i}\) for \(x_i <= x < x_{i+1}\); thus, the integrand \(Y_i = \int_{x_i}^{x_{i+1}} y(x) dx\) on each interval is

\[Y_i = \frac{A_i}{b_i+1} [x_{i+1}^{b_i+1} - x_i^{b_i+1}]\]