AIRSAtmosphere#

class MCEq.geometry.density_profiles.AIRSAtmosphere(location, season, extrapolate=True, *args, **kwargs)[source]#

Bases: EarthsAtmosphere

Interpolation class for tabulated atmospheres.

This class is intended to read preprocessed AIRS Satellite data.

Parameters:

Attributes Summary

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 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_temperature(h_cm)

Returns the temperature in K.

h2X(h)

Returns the depth along path as function of height above surface.

init_parameters(location, **kwargs)

Loads tables and prepares interpolation.

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_IC79_day(IC79_day)

set_date(year, doy)

set_h_obs(h_obs)

Set the elevation of the observation (detector) level in cm.

set_season(month)

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.

Interpolates table at requested value for previously set year and day of year (doy).

Parameters:

h_cm (float) – height in cm

Returns:

density \(\rho(h_{cm})\) in g/cm**3

Return type:

float

get_temperature(h_cm)[source]#

Returns the temperature in K.

Interpolates table at requested value for previously set year and day of year (doy).

Parameters:

h_cm (float) – height in cm

Returns:

temperature \(T(h_{cm})\) in K

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

init_parameters(location, **kwargs)[source]#

Loads tables and prepares interpolation.

Parameters:
  • location (str) – supported is only “SouthPole”

  • doy (int) – Day Of Year

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_IC79_day(IC79_day)[source]#
set_date(year, doy)[source]#
set_h_obs(h_obs)#

Set the elevation of the observation (detector) level in cm.

set_season(month)[source]#
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 function r_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).