template_synthesis.jax.utilities.atmosphere.atmosphere module

class template_synthesis.jax.utilities.atmosphere.atmosphere.Atmosphere(model: int = 17, n0: float = 1.000292, observation_level: float = 0.0)

Bases: object

Interface to manage the calculation of atmospheric properties of the air shower.

Ported over from radiotools.atmosphere.models and jaxified. Currently only the tools used in template synthesis are ported over, but in principle can port over other modules as well.

get_atmosphere(height: Array | ndarray | bool | number | bool | int | float | complex) Array

Get the atmospheric depth from a given height(s).

Parameters:
height : jax.typing.ArrayLike

The height in m

Returns:

X – the grammage (atmospheric depth) in g/m^2

Return type:

jax.Array

get_cherenkov_angle(grammage: Array | ndarray | bool | number | bool | int | float | complex, zenith: Array | ndarray | bool | number | bool | int | float | complex) Array

Calculate the cherenkov angle from the atmospheric depth and zenith angle.

Parameters:
grammage : jax.typing.ArrayLike

The atmospheric depth in g/cm^2

zenith : jax.typing.ArrayLIke

The zenith angle of the shower in radians

Returns:

cherenkov_angle – the cherenkov angle in units of radian

Return type:

jax.Array

get_density(grammage: Array | ndarray | bool | number | bool | int | float | complex, zenith: Array | ndarray | bool | number | bool | int | float | complex) Array

Get the density at a specific atmospheric depth and zenith angle.

Parameters:
grammage : jax.typing.ArrayLike

The atmospheric depth in g/cm^2

zenith : jax.typing.ArrayLIke

The zenith angle of the shower in radians

Returns:

dens – the density in each atmospheric depth in g/m^3

Return type:

jax.Array

get_geometric_distance_grammage(grammage: Array | ndarray | bool | number | bool | int | float | complex, zenith: Array | ndarray | bool | number | bool | int | float | complex) Array

Get the geometrical distance from some grammage in the shower.

Parameters:
grammage : jax.typing.ArrayLike

The atmospheric depth in g/cm^2

zenith : jax.typing.ArrayLIke

The zenith angle of the shower in radians

Returns:

dis_above_ground – the geometric distance above the observation level

Return type:

jax.Array

get_refractive_index(grammage: Array | ndarray | bool | number | bool | int | float | complex, zenith: Array | ndarray | bool | number | bool | int | float | complex) Array

Calculate the refractive index of the atmosphere at a given height.

Parameters:
grammage : jax.typing.ArrayLike

The atmospheric depth in g/cm^2

zenith : jax.typing.ArrayLIke

The zenith angle of the shower in radians

Returns:

n – the refractive index at the given height(s).

Return type:

jax.Array

get_vertical_height(at: Array | ndarray | bool | number | bool | int | float | complex) Array

Get vertical height from atmosphere, i.e., mass overburden for different layer.

Parameters:
at : jax,ArrayLike

the zenith-angle-corrected atmopheric depth in g/m^2

Returns:

h – the vertical height above sea level in meters

Return type:

jax.Array

get_xmax_from_distance(distance: Array | ndarray | bool | number | bool | int | float | complex, zenith: Array | ndarray | bool | number | bool | int | float | complex) Array

Calculate the cherenkov angle from the atmospheric depth and zenith angle.

Parameters:
distance : jax.typing.ArrayLike

The distance of the shower from the core axis in m

zenith : jax.typing.ArrayLIke

The zenith angle of the shower in radians

Returns:

Xmax – The shower maximum in g/cm^2

Return type:

jax.Array

template_synthesis.jax.utilities.atmosphere.atmosphere.r_e = 6371000.0

All functions use “grams” and “meters”, only the functions that receive and return “atmospheric depth” use the unit “g/cm^2”

Atmospheric density models as used in CORSIKA. The parameters are documented in the CORSIKA manual the parameters for the Auger atmospheres are documented in detail in GAP2011-133 The May and October atmospheres describe the annual average best.