IsothermalAtmosphere#
- class MCEq.geometry.density_profiles.IsothermalAtmosphere(location, season, hiso_km=6.3, X0=1300.0)[source]#
Bases:
EarthsAtmosphereIsothermal model of the atmosphere.
This model is widely used in semi-analytical calculations. The isothermal approximation is valid in a certain range of altitudes and usually one adjust the parameters to match a more realistic density profile at altitudes between 10 - 30 km, where the high energy muon production rate peaks. Such parametrizations are given in the book “Cosmic Rays and Particle Physics”, Gaisser, Engel and Resconi (2016). The default values are from M. Thunman, G. Ingelman, and P. Gondolo, Astropart. Physics 5, 309 (1996).
- Parameters:
location (str) – no effect
season (str) – no effect
hiso_km (float) – isothermal scale height in km
X0 (float) – Ground level overburden
Attributes Summary
Depth at altitude 0.
Density at altitude 0.
Spline for conversion from depth to density.
Spline for conversion from altitude to depth.
Spline for conversion from depth to altitude.
Methods Summary
X2h(X)Returns the height above surface as a function of slant depth for currently selected zenith angle.
X2rho(X)Returns the density \(\rho(X)\).
calculate_density_spline([n_steps])Calculates and stores a spline of \(\rho(X)\).
gamma_cherenkov_air(h_cm)Returns the Lorentz factor gamma of Cherenkov threshold in air (MeV).
get_density(h_cm)Returns the density of air in g/cm**3.
get_mass_overburden(h_cm)Returns the mass overburden in atmosphere in g/cm**2.
h2X(h)Returns the depth along path as function of height above surface.
moliere_air(h_cm)Returns the Moliere unit of air for US standard atmosphere.
nref_rel_air(h_cm)Returns the refractive index - 1 in air (density parametrization as in CORSIKA).
r_X2rho(X)Returns the inverse density \(\frac{1}{\rho}(X)\).
set_h_obs(h_obs)Set the elevation of the observation (detector) level in cm.
set_theta(theta_deg)Configures geometry and initiates spline calculation for \(\rho(X)\).
theta_cherenkov_air(h_cm)Returns the Cherenkov angle in air (degrees).
Attributes Documentation
- max_X#
Depth at altitude 0.
- max_den#
Density at altitude 0.
- s_X2rho#
Spline for conversion from depth to density.
- s_h2X#
Spline for conversion from altitude to depth.
- s_lX2h#
Spline for conversion from depth to altitude.
Methods Documentation
- X2h(X)#
Returns the height above surface as a function of slant depth for currently selected zenith angle.
The spline s_lX2h is used, which was calculated or retrieved from cache during the
set_theta()call.- Parameters:
X (float) – slant depth in g/cm**2
- Returns:
height above surface in cm
- Return type:
float h
- X2rho(X)#
Returns the density \(\rho(X)\).
The spline s_X2rho is used, which was calculated or retrieved from cache during the
set_theta()call.- Parameters:
X (float) – slant depth in g/cm**2
- Returns:
\(\rho\) in cm**3/g
- Return type:
float
- calculate_density_spline(n_steps=2000)#
Calculates and stores a spline of \(\rho(X)\).
- Parameters:
n_steps (int, optional) – number of \(X\) values to use for interpolation
- Raises:
Exception – if
set_theta()was not called before.
- gamma_cherenkov_air(h_cm)#
Returns the Lorentz factor gamma of Cherenkov threshold in air (MeV).
- get_density(h_cm)[source]#
Returns the density of air in g/cm**3.
- Parameters:
h_cm (float) – height in cm
- Returns:
density \(\rho(h_{cm})\) in g/cm**3
- Return type:
float
- get_mass_overburden(h_cm)[source]#
Returns the mass overburden in atmosphere in g/cm**2.
- Parameters:
h_cm (float) – height in cm
- Returns:
column depth \(T(h_{cm})\) in g/cm**2
- Return type:
float
- h2X(h)#
Returns the depth along path as function of height above surface.
The spline s_X2rho is used, which was calculated or retrieved from cache during the
set_theta()call.- Parameters:
h (float) – vertical height above surface in cm
- Returns:
X slant depth in g/cm**2
- Return type:
float
- moliere_air(h_cm)#
Returns the Moliere unit of air for US standard atmosphere.
- nref_rel_air(h_cm)#
Returns the refractive index - 1 in air (density parametrization as in CORSIKA).
- r_X2rho(X)#
Returns the inverse density \(\frac{1}{\rho}(X)\).
The spline s_X2rho is used, which was calculated or retrieved from cache during the
set_theta()call.- Parameters:
X (float) – slant depth in g/cm**2
- Returns:
\(1/\rho\) in cm**3/g
- Return type:
float
- set_h_obs(h_obs)#
Set the elevation of the observation (detector) level in cm.
- set_theta(theta_deg)#
Configures geometry and initiates spline calculation for \(\rho(X)\).
If the option ‘use_atm_cache’ is enabled in the config, the function will check, if a corresponding spline is available in the cache and use it. Otherwise it will call
calculate_density_spline(), make the functionr_X2rho()available to the core code and store the spline in the cache.- Parameters:
theta_deg (float) – zenith angle \(\theta\) at detector
- theta_cherenkov_air(h_cm)#
Returns the Cherenkov angle in air (degrees).