NuRadioReco.utilities.cr_flux module

NuRadioReco.utilities.cr_flux.get_measured_data(type='data_auger_19')[source]

Helper function get data points in NuRadio base units

Parameters:
type: string

choose between data_auger_19 and data_TA_21

Returns
——-
E: array of floats

energie in eV

J: array of floats

flux of cosmic ray

Err_up: array of floats

upper error bar on flux

Err_low: array of floats

lower error bar on flux

NuRadioReco.utilities.cr_flux.get_interpolated_cr_flux(log10_energy, type='data_auger_19')[source]

Evaluates the scipy interpolation of the measured data at a given energy

Parameters:
log10_energy: float

energies (in log10(E / eV)))

type: string

choose between data_auger_19 and data_TA_21

Return
——-

scipy interpolation of data in NuRadio base units (which are 1/(eV m^2 sr ns) )

NuRadioReco.utilities.cr_flux.get_analytic_cr_flux(log10_energy, type='auger_19')[source]
Parameters:
log10_energy: float

energies (in log10(E / eV)))

type: string

choose between auger_17, auger_19 and TA_19

Returns
——-
analytic parametrization of spectrum in NuRadio base units (which are 1/(eV m^2 sr ns)
NuRadioReco.utilities.cr_flux.get_flux_per_energy_bin(log10e_min, log10e_max, type='auger_19')[source]

Returns an scipy integration of the measured data or the analytic spectrum over given interval.

Parameters:
log10e_min: float

Input energy lower bound (in log10(E / eV)))

log10e_max: float

Input energy upper bound (in log10(E / eV)))

type: string

choose between data_auger_19, data_TA_21, auger_17, auger_19, TA_19

Returns:
scipy integration of data in NuRadio base units (which are 1/(eV m^2 sr ns))
NuRadioReco.utilities.cr_flux.get_cr_event_rate(log10energy=18, zenith=0.8726646259971648, a_eff=1, type='auger_19')[source]

Cosmic ray event rate at a specific energy and zenith angle assuming a detector with effective area ‘A_eff’. The detector projection and solid range are taken into account. The flux is calculated with the analytic spectrum.

Parameters:
log10energy: float

energy in units log10(energy/eV)

zenith: float

zenith angle

a_eff:

effective area of detector

type: string

choose between auger_17, auger_19 and TA_19

Returns
——-
eventrate for an isotropic flux with given energy and zenith angle.
The differential flux is returned in d/d zenith_angle, not d/d solid_angle.
NuRadioReco.utilities.cr_flux.plot_measured_spectrum(ax=None, scale=2.7, type='data_auger_19', base_units=False)[source]

Plot measured spectrum. Attention: time unit is year instead of ns.

Parameters:
ax:

axis on which the data is plotted

scale:

scale factor for energy, default = 2.7

type: string

choose between data_auger_19 and data_TA_21

base_units: bool
if False spectrum will be plotted in

[m^{-2} yr^{-1} sr^{-1} eV^{%scale-1}] instead of NuRadio base units

Returns:
plot of data without plt.show()