NuRadioMC.utilities.earth_attenuation module
- NuRadioMC.utilities.earth_attenuation.get_weight(theta_nu, pnu, flavors, mode='simple', cross_section_type='ctw', vertex_position=None, phi_nu=None)[source]
calculates neutrino weight due to Earth absorption for different models
- Parameters:
- theta_nu: float or array of floats
the zenith angle of the neutrino direction (where it came from, i.e., opposite to the direction of propagation)
- pnu: float or array of floats
the momentum of the neutrino
- mode: string
‘simple’: assuming interaction happens at the surface and approximating the Earth with constant density
‘core_mantle_crust_simple’: assuming interaction happens at the surface and approximating the Earth with 3 layers of constant density
‘core_mantle_crust’: approximating the Earth with 3 layers of constant density, path through Earth to interaction vertex is considered
‘PREM’: density of Earth is parameterized as a fuction of radius, path through Earth to interaction vertex is considered
- cross_section_type: string
‘ghandi’, ‘ctw’ or ‘csms’ (see description in cross_sections.py)
- vertex_position: 3-dim array or None (default)
the position of the neutrino interaction
- phi_nu: float
the azimuth angle of the neutrino direction
- NuRadioMC.utilities.earth_attenuation.get_simple_weight(theta_nu, pnu, cross_section_type='ctw')[source]
calculates neutrino weight due to Earth absorption, i.e. probability of the neutrino to reach the detector
simple parametrization using only momentum and zenith angle information of the neutrino, adapted from ShelfMC
- Parameters:
- theta_nu: float or array of floats
the zenith angle of the neutrino direction (where it came from, i.e., opposite to the direction of propagation)
- pnu: float or array of floats
the momentum of the neutrino
- NuRadioMC.utilities.earth_attenuation.get_core_mantle_crust_weight(theta_nu, pnu, flavors, cross_section_type='ctw')[source]
calculates neutrino weight due to Earth absorption with a three layers earth model, i.e. probability of the neutrino to reach the detector
simple parametrization using momentum, zenith angle, flavor and current type information of the neutrino
parameters from ARAsim (2018)
- Parameters:
- theta_nu: float or array of floats
the zenith angle of the neutrino direction (where it came from, i.e., opposite to the direction of propagation)
- pnu: float or array of floats
the momentum of the neutrino
- flavors: float or array of floats
the flavor of the neutrino
- class NuRadioMC.utilities.earth_attenuation.PREM[source]
Bases:
object
Class describing the Earth’s density.
Uses densities from the Preliminary reference Earth Model (PREM).
Notes
The density calculation is based on the Preliminary reference Earth Model [1].
References
[1]A. Dziewonski & D. Anderson, “Preliminary reference Earth model.” Physics of the Earth and Planetary Interiors 25, 297–356 (1981). https://doi.org/10.1016/0031-9201(81)90046-7
- Attributes:
- earth_radiusfloat
Mean radius of the Earth (m).
- radiituple
Boundary radii at which the functional form of the density of the Earth changes. The density function in
densities
at index i corresponds to the radius range from radius at index i-1 to radius at index i.- densitiestuple
Functions which calculate the density of the Earth in a specific radius range as described by
radii
. The parameter of each function is the fractional radius, e.g. radius divided byearth_radius
. Scalar values denote constant density over the range of radii.
Methods
density
(r)Calculates the Earth's density at a given radius.
slant_depth
(endpoint, direction[, step])Calculates the column density of a chord cutting through Earth.
- earth_radius = 6371000.0
- radii = (1221500.0, 3480000.0, 5701000.0, 5771000.0, 5971000.0, 6151000.0, 6346600.0, 6356000.0, 6368000.0, 6371000.0)
- densities = (<function PREM.<lambda>>, <function PREM.<lambda>>, <function PREM.<lambda>>, <function PREM.<lambda>>, <function PREM.<lambda>>, <function PREM.<lambda>>, <function PREM.<lambda>>, 1.810037825908342e+40, 1.6227925335729963e+40, 6.366339939401755e+39)
- density(r)[source]
Calculates the Earth’s density at a given radius.
Supports passing an array of radii or a single radius.
- Parameters:
- rarray_like
Radius (m) at which to calculate density.
- Returns:
- array_like
Density (g/cm^3) of the Earth at the given radii.
- slant_depth(endpoint, direction, step=500)[source]
Calculates the column density of a chord cutting through Earth.
Integrates the Earth’s density along the chord, resulting in a column density (or material thickness) with units of mass per area.
- Parameters:
- endpointarray_like
Vector position of the chord endpoint, in a coordinate system centered on the surface of the Earth (e.g. a negative third coordinate represents the depth below the surface).
- directionarray_like
Vector direction of the chord, in a coordinate system centered on the surface of the Earth (e.g. a negative third coordinate represents the chord pointing into the Earth).
- stepfloat, optional
Step size for the integration.
- Returns:
- float
Column density along the chord starting from depth and passing through the Earth at angle.
See also
PREM.density
Calculates the Earth’s density at a given radius.
- class NuRadioMC.utilities.earth_attenuation.CoreMantleCrustModel[source]
Bases:
PREM
Class describing the Earth’s density.
Uses densities from the Core-Mantle-Crust model. Parameters from ARASim
- Attributes:
- earth_radiusfloat
Mean radius of the Earth (m).
- radiituple
Boundary radii (m) at which the functional form of the density of the Earth changes. The density function in
densities
at index i corresponds to the radius range from radius at index i-1 to radius at index i.- densitiestuple
Functions which calculate the density of the Earth (g/cm^3) in a specific radius range as described by
radii
. The parameter of each function is the fractional radius, e.g. radius divided byearth_radius
. Scalar values denote constant density over the range of radii.
Methods
density
(r)Calculates the Earth's density at a given radius.
slant_depth
(endpoint, direction[, step])Calculates the column density of a chord cutting through Earth.
- earth_radius = 6378140.0
- radii = (3464101.6151377545, 6338140.0, 6378140.0)
- densities = (8.738113642316134e+40, 2.122113313133918e+40, 1.810037825908342e+40)
- density(r)
Calculates the Earth’s density at a given radius.
Supports passing an array of radii or a single radius.
- Parameters:
- rarray_like
Radius (m) at which to calculate density.
- Returns:
- array_like
Density (g/cm^3) of the Earth at the given radii.
- slant_depth(endpoint, direction, step=500)
Calculates the column density of a chord cutting through Earth.
Integrates the Earth’s density along the chord, resulting in a column density (or material thickness) with units of mass per area.
- Parameters:
- endpointarray_like
Vector position of the chord endpoint, in a coordinate system centered on the surface of the Earth (e.g. a negative third coordinate represents the depth below the surface).
- directionarray_like
Vector direction of the chord, in a coordinate system centered on the surface of the Earth (e.g. a negative third coordinate represents the chord pointing into the Earth).
- stepfloat, optional
Step size for the integration.
- Returns:
- float
Column density along the chord starting from depth and passing through the Earth at angle.
See also
PREM.density
Calculates the Earth’s density at a given radius.