Track
- class showermodel.track.Track(theta=0.0, alt=None, az=0.0, x0=0.0, y0=0.0, xi=0.0, yi=0.0, zi=None, atmosphere=None, h0=0.0, h_top=None, N_steps=550, atm_model=1, rho_w_sl=7.5e-06, h_scale=2.0)
Bases:
DataFrameDataFrame containing a linear-shower track discretization.
Use sm.Track() to construct a default Track object.
- Parameters:
theta (float, default 0) – Zenith angle in degrees of the apparent position of the source.
alt (float, default None) – Altitude in degrees of the apparent position of the source. If None, theta is used. If given, theta is overwritten.
az (float, default 0) – Azimuth angle (from north, clockwise) in degrees of the apparent position of the source.
x0 (float, default 0) – East coordinate in km of shower impact point on ground.
y0 (float, default 0) – North coordinate in km of shower impact point on ground.
xi (float, default 0) – East coordinate in km of the first interaction point of the shower. If zi==None, xi and yi are ignored and the shower impacts at (x0, y0) on ground. If zi is given, x0 and y0 are ignored and the shower starts at (xi,yi,zi).
yi (float, default 0) – North coordinate in km of the first interaction point of the shower. If zi==None, xi and yi are ignored and the shower impacts at (x0, y0) on ground. If zi is given, x0 and y0 are ignored and the shower starts at (xi,yi,zi).
zi (float, default None) – Height in km of the first interaction point of the shower. If zi==None, xi and yi are ignored and the shower impacts at (x0, y0) on ground. If zi is given, x0 and y0 are ignored and the shower starts at (xi,yi,zi).
atmosphere (Atmosphere, default None) – Atmosphere object to be used. If None, a new Atmosphere object is generated. If given, h0, h_top, N_steps, atm_model, rho_w_sl and h_scale are ignored.
h0 (float, default 0) – Ground level in km above sea level for the atmosphere discretization to be generated when atmosphere==None.
h_top (float or None, default None) – Upper limit in km above sea level for the atmosphere discretization to be generated when atmosphere==None. If h_top is None, the top level of the selected atmospheric model is taken.
N_steps (int, default 550) – Number of discretization steps for the atmosphere discretization to be generated when atmosphere==None.
atm_model (int or DataFrame, default 1) – Atmospheric model used when atmosphere==None. If an int value is given, atm_model is searched from either CORSIKA atmospheric models (from 1 to 29) or a file named atm_models.toml in the working directory containing user-defined models. If a DataFrame is given, it should have two columns, one labelled as h with height in km and other labelled as X_vert or P, depending on whether vertical depth in g/cm^2 or pressure in hPa is given.
rho_w_sl (float, default 7.5e-6) – Water-vapor density in g/cm^3 at sea level to calculate a simple exponential profile of water-vapor when atmosphere==None. Set to zero if dry air is assumed.
h_scale (float, default 2.0) – Scale height in km to be used in the water-vapor exponential profile when atmospere==None.
- x
Column 0, east coordinate in km.
- Type:
float
- y
Column 1, north coordinate in km.
- Type:
float
- z
Column 2, height in km from ground level.
- Type:
float
- t
Column 3, travel time in microseconds. t=0 at the first interaction point. The shower is assumed to propagate with the speed of light.
- Type:
float
- atmosphere
- Type:
- theta
Zenith angle in degrees of the apparent position of the source.
- Type:
float
- alt
Altitude in degrees of the apparent position of the source.
- Type:
float
- az
Azimuth angle (from north, clockwise) in degrees of the apparent position of the source.
- Type:
float
- ux, uy, uz
Coordinates of a unit vector pointing to the source position (antiparallel to the shower propagation vector).
- Type:
float
- vx, vy, vz
Coordinates of a unit vector perpendicular to the shower axis and parallel to horizontal plane.
- Type:
float
- wx, wy, wz
Coordinates of a unit vector perpendicular to both u and v.
- Type:
float
- x0, y0, z0
Coordinates in km of shower impact point at ground (z0=0). Set to None for ascending showers beginning at zi>0.
- Type:
float or None
- xi, yi, zi
Coordinates in km of the first interaction point of the shower.
- Type:
float
- t_total
Total travel time in microseconds.
- Type:
float
- x_top, y_top, z_top
Coordinates in km of shower at the top of the atmosphere. Set to None for descending showers beginning at zi<z_top.
- Type:
float or None
- dl
Size in km of discretization step along the shower axis.
- Type:
float
- h_to_xyz()
Get the spatial coordinates from height above sea level.
- z_to_t()
Get travel time mass density from height.
- Xv_to_xyz()
Get the spatial coordinates from vertical depth.
- X_to_xyz()
Get the spatial coordinates from travel depth.
- Projection()
Make a Projection object containing the coordinates of a shower track relative to a telescope position.
- show_projection()
Make a Projection object and show it.
See also
ShowerMake a discretization of a shower.
- Methods:
- Track.h_to_xyz(h)
Get the x, y, z coordinates from height above sea level.
- Parameters:
h (float or array_like) –
- Returns:
x, y, z
- Return type:
float, array_like or None
- Track.z_to_t(z)
Get the travel time from height above ground level.
- Parameters:
z (float or array_like) –
- Returns:
t
- Return type:
float, array_like or None
- Track.X_to_xyz(X)
Get the x, y, z coordinates from travel depth.
- Parameters:
X (float) –
- Returns:
x, y, z
- Return type:
float or None
- Track.Projection(telescope)
Obtain the coordinates of a shower track relative to the telescope position in both zenith and camera projection and determine the fraction of the track within the telescope field of view.
- Parameters:
telescope (Telescope, mandatory) –
- Returns:
projection
- Return type:
See also
Projection.show
- Track.show_projection(telescope, axes=True, max_theta=30.0, X_mark=None)
Obtain the polar coordinates of a shower track relative to a telescope position in both horizontal and FoV coordinates systems and determine the fraction of the track within the telescope field of view. In addition, show the projection of the shower track as viewed by the telescope.
- Parameters:
telescope (Telescope, mandatory) –
axes (bool, default True) – Show the axes of both coordinate systems of reference.
max_theta (float, default 30) – Maximum offset angle in degrees relative to the telescope pointing direction.
X_mark (float, default None) – Reference slant depth in g/cm^2 of the shower track to be marked in the figure. If None, no mark is included.
- Returns:
projection (Projection)
(ax1, ax2) (PolarAxesSubplot)
See also
Projection.show