smiet.jax.io.base_shower module

class smiet.jax.io.base_shower.Shower

Bases: object

Base class to contain the shower parameters.

The Shower class is used to hold the geometric information for a shower, like the zenith/azimuth, as well as the longitudinal profile. It can be used to specify the target parameters for a shower in template synthesis.

property GH_parameters : dict

Get the Gaisser-Hillas parameters as a dictionary.

property azimuth : float

The azimuthal angle in radians.

property core : Array

The core (x, y, z in NRR CS) where the EAS hit in the simulation.

property geomagnetic_angle : float

The angle between the magnetic field vector and the shower axis.

property geometry : Array

Store the zenith and azimuth. These must be provided in the internal units system.

get_transformer()

Get the transformer from jax_radio_tools that contains the coordinate transformations from shower to ground frame, as well to on-sky coordinates.

Returns:

transformer – The coordinate transformer from jax_radio_tools.

Return type:

cstrafo

property grammages : Array

Array of atmospheric slices in g/cm^2.

property long_profile : float

The longitudinal profile of electrons and positrons in each atmospheric slice.

property magnet : float

Magnetic field vector in the NRR coordinate system.

property nmax : float

The $N_{max}$ of the shower, from fitting a GH to the longitudinal profile.

property nr_slices : int

The number of slices in the array.

set_parameters(grammages: Array | ndarray | bool_ | number | bool | int | float | complex, long_profile: Array | ndarray | bool_ | number | bool | int | float | complex, xmax: Array | ndarray | bool_ | number | bool | int | float | complex, nmax: Array | ndarray | bool_ | number | bool | int | float | complex, zenith: Array | ndarray | bool_ | number | bool | int | float | complex, azimuth: Array | ndarray | bool_ | number | bool | int | float | complex, magnetic_field: Array | ndarray | bool_ | number | bool | int | float | complex, core: Array | ndarray | bool_ | number | bool | int | float | complex) None

Set the parameters of the shower model from a dictionary of parameters.

This is a convenience function to set all parameters at once.

Parameters:
grammages : jax.typing.ArrayLike

an array of atmospheric depth in g/cm^2

long_profile : jax.typing.ArrayLike

an array of the longitudinal profile of the shower

xmax : jax.typing.ArrayLike

depth of shower maximum in g/cm^2

nmax : jax.typing.ArrayLike

number of particles at shower maximum

zenith : jax.typing.ArrayLike

zenith angle in radians

azimuth : jax.typing.ArrayLike

azimuthal angle in radians

magnetic_field : jax.typing.ArrayLike

magnetic field vector in Gauss. Must be a 3-vector

core : jax.typing.ArrayLike

core position in meters. Must be a 3-vector

property slice_grammage : float

The spacing between each grammage in g/cm^2.

transform_profile_to_origin(origin_grammages: Array | ndarray | bool_ | number | bool | int | float | complex) None

Transform the longitudinal profile to match those of the origin shower.

This is needed such that the grammages of the origin and target match.

Parameters:
origin_grammages : jax.typing.ArrayLike

The grammages of the origin shower.

property xmax : float

The $X_{max}$ of the shower, from fitting a GH to the longitudinal profile.

property zenith : float

The zenith angle in radians.