Projection

class showermodel.projection.Projection(telescope, track)

Bases: DataFrame

DataFrame containing the projection of a shower track.

The track is viewed from a telescope position in both horizontal coordinates system and FoV coordinates system as well as the fraction of the track within the telescope field of view.

Parameters
  • telescope (Telescope) – Telescope object to be used.

  • track (Track or Shower) – Track object to be used.

distance

Column 0, shower-to-telescope distance in km.

Type

float

alt

Column 1, altitude in degrees (from horizon).

Type

float

az

Column 2, azimuth in degrees (from north, clockwise).

Type

float

theta

Column 3, offset angle in degrees relative to the telescope pointing direction.

Type

float

phi

Column 4, position angle in degrees from north in FoV projection.

Type

float

beta

Column 5, angle in degrees relative to the apparent source position.

Type

float

time

Column 6, arrival time in microseconds of photons emitted at each point of the shower, where time=0 for photons produced at the top of the atmosphere.

Type

float

FoV

Column 7, True if the shower point is within the telescope field of view, False otherwise.

Type

bool

atmosphere

Atmosphere object that is used.

Type

Atmosphere

track

Track object that is used.

Type

Track

telescope

Telescope object that is used.

Type

Telescope

distance_top

Distance in km to shower point at the top of the atmosphere.

Type

float

beta_top

Beta angle in degrees of the shower point at the top of the atmosphere.

Type

float

distance_0

Distance in km to the shower impact point at ground.

Type

float

beta_0

Beta angle in degrees of the shower impact point at ground.

Type

float

distance_i

Distance in km to the first interaction point of the shower.

Type

float

beta_i

Beta angle in degrees of the first interaction point of the shower.

Type

float

distance_min

Minimum distance in km to (infinite) line going to the shower axis.

Type

float

alt_inf

Altitude in degrees of the apparent source position.

Type

float

az_inf

Azimuth in degrees of the apparent source position.

Type

float

theta_inf

Offset angle in degrees of the apparent source position.

Type

float

phi_inf

Position angle in degrees of the apparent source position.

Type

float

show()

Show the projection of the shower track viewed by the telescope.

hor_to_FoV()

Convert cartesian coordinates from horizontal system to FoV system.

FoV_to_hor()

Convert cartesian coordinates from FoV system to horizontal system.

thetaphi_to_altaz()

Convert FoV coordinates theta/phi to horizontal coordinates alt/az.

altaz_to_thetaphi()

Convert horizontal coordinates alt/az to FoV coordinates theta/phi.

spherical()

Calculate the spherical coordinates in both horizontal and FoV systems.

Methods:
Projection.show(axes=True, max_theta=30.0, X_mark=None)

Show the projection of the shower track viewed by the telescope in both horizontal and FoV coordinates systems.

Parameters
  • axes (bool, default True) – Show the axes of both frames of reference.

  • max_theta (float, default 30 degrees) – Maximum offset angle in degrees relative to the telescope pointing direction.

  • X_mark (float) – Reference slant depth in g/cm^2 of the shower track to be marked in the figure. If None, no mark is included.

Returns

ax1, ax2

Return type

PolarAxesSubplot

Projection.hor_to_FoV(x_hor, y_hor, z_hor)

Convert cartesian coordinates from horizontal system to FoV system.

In the FoV coordinates system, x_FoV grows in the right-hand direction, y_FoV grows downward and z_FoV grows toward the pointing direction from the telescope point of view.

Parameters
  • x_hor (float or array-like) –

  • y_hor (float or array-like) –

  • z_hor (float or array-like) –

Returns

x_FoV, y_FoV, z_FoV

Return type

floar or array_like

See also

Projection.FoV_to_hor

Convert cartesian coordinates from FoV system to horizontal system.

Projection.altaz_to_thetaphi

Convert horizontal coordinates alt, az to FoV coordinates theta, phi.

Projection.FoV_to_hor(x_FoV, y_FoV, z_FoV)

Convert cartesian coordinates from FoV system to horizontal system.

In the FoV coordinates system, x_FoV grows in the right-hand direction, y_FoV grows downward and z_FoV grows toward the pointing direction from the telescope point of view.

Parameters
  • x_FoV (float or array_like) –

  • y_FoV (float or array_like) –

  • z_FoV (float or array_like) –

Returns

x_hor, y_hor, z_hor

Return type

float or array_like.

See also

Projection.hor_to_FoV

Convert cartesian coordinates from horizontal system to FoV system.

Projection.thetaphi_to_altaz

Convert FoV coordinates theta, phi to horizontal coordinates alt, az.

Projection.thetaphi_to_altaz(theta, phi)

Convert FoV coordinates theta, phi to horizontal coordinates alt, az.

Parameters
  • theta (float or array_like) –

  • phi (float or array_like) –

Returns

alt, az

Return type

float or array_like

See also

Projection.FoV_to_hor

Convert cartesian coordinates from FoV system to horizontal system.

Projection.altaz_to_thetaphi

Convert horizontal coordinates alt, az to FoV coordinates theta, phi.

Projection.altaz_to_thetaphi(alt, az)

Convert polar horizontal coordinates alt, az to FoV coordinates theta, phi.

Parameters
  • alt (float or array_like) –

  • az (float or array_like) –

Returns

theta, phi

Return type

float or array-like

See also

Projection.hor_to_FoV

Convert cartesian coordinates from horizontal system to FoV system.

Projection.thetaphi_to_altaz

Convert FoV coordinates theta, phi to horizontal coordinates alt, az.

Projection.spherical(x, y, z)

Calculate the spherical coordinates in both horizontal and FoV systems from the ‘absolute’ x, y, z coordinates.

Parameters
  • x (float or array_like) –

  • y (float or array_like) –

  • z (float or array_like) –

Returns

distance, alt, az, theta, phi

Return type

float or array_like