Event

class showermodel.event.Event(observatory, shower, atm_trans=True, tel_eff=True, wvl_ini=290.0, wvl_fin=430.0, wvl_step=3.0)

Bases: object

Contain the characteristics of a shower detected by an observatory.

The signal produced by the shower in each telescope of the observatory is stored in a list. The shower, the observatory, etc. are stored as object attributes.

Parameters:
  • observatory (Observatory, mandatory) – Observatory that observes the shower.

  • shower (Shower, mandatory) – Shower to be observed.

  • atm_trans (bool, default True) – Include the atmospheric transmission to transport photons.

  • tel_eff (bool, default True) – Include the telescope efficiency to calculate the signals. If False, 100% efficiency is assumed for a given wavelength interval.

  • wvl_ini (float, default 290) – Initial wavelength in nm of the interval to calculate the signal when tel_eff==False.

  • wvl_fin (float, default 430) – Final wavelength in nm of the interval to calculate the signal when tel_eff==False.

  • wvl_step (float, default 3) – Discretization step in nm of the interval to calculate the signal when tel_eff==False.

shower
Type:

Shower

track
Type:

Track

profile
Type:

Profile

fluorescence
Type:

Fluorescence

cherenkov
Type:

Cherenkov

atmosphere
Type:

Atmosphere

observatory
Type:

Observatory

projections

List of Projection objects, one per telescope.

Type:

list

signals

List of Signal objects, one per telescope.

Type:

list

images

List of Image objects, one per telescope. Only available if generated via the method make_images.

Type:

list or None

atm_trans

True if the atmospheric transmission is included.

Type:

bool

tel_eff

True if the telescope efficiency is included.

Type:

bool

show_projection()

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

show_profile()

Show the shower profile as a function of slant depth.

show_light_production()

Show the production of both Cherenkov and fluorescence photons as a function of slant depth.

show_signal()

Show the signal evolution for a chosen telescope of the observatory.

show_geometry2D()

Show the shower track and the telescope positions in a 2D plot.

show_geometry3D()

Show the shower track and the telescope positions in a 3D plot.

show_distribution()

Make an Event from a Grid object and show the distribution of photons per m^2 in a 1D or 2D plot.

make_images()

Generate shower images.

show_images()

Show shower images (if already exist).

Methods:
Event.show_projection(tel_index=0, shower_Edep=True, axes=True, max_theta=30.0, X_mark='X_max')

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

Parameters:
  • tel_index (int, default 0) – Index of the chosen telescope of the observatory.

  • shower_Edep (bool, default True) – Make the radii of the shower track points proportional to the energy deposited in each step length.

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

  • max_theta (float, default 30) – 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 set to None, no mark is included. By default, the mark is placed at X_max.

Returns:

(ax1, ax2)

Return type:

PolarAxesSubplot

Event.show_profile()

Show the shower profile, both number of charged particles and energy deposit, as a function of slant depth.

Returns:

(ax1, ax2)

Return type:

AxesSubplot

Event.show_light_production()

Show the production of both Cherenkov and fluorescence photons in the 290 - 430 nm range as a function of slant depth.

Returns:

(ax1, ax2)

Return type:

AxesSubplot

Event.show_signal(tel_index=0)

Show the signal evolution as a function of both time and beta angle (relative to the shower axis direction) for a chosen telescope of the observatory.

Parameters:

tel_index (int, default 0) – Index of the chosen telescope of the observatory.

Returns:

(ax1, ax2)

Return type:

AxesSubplot

Event.show_geometry2D(x_min=-1.0, x_max=1.0, y_min=-1, y_max=1.0, X_mark='X_max', shower_Edep=True, signal_size=True, tel_index=False)

Show the shower track together with the telescope positions in a 2D plot.

Parameters:
  • x_min (float, default -1) – Lower limit of the coordinate x in km.

  • x_max (float, default 1) – Upper limit of the coordinate x in km.

  • y_min (float, default -1) – Lower limit of the coordinate y in km.

  • y_max (float, default 1) – Upper limit of the coordinate y in km.

  • X_mark (float) – Reference slant depth in g/cm^2 of the shower track to be marked in the figure. By default, the mark is placed at X_max.

  • shower_Edep (bool, default True) – Make the radii of the shower track points proportional to the energy deposited in each step length.

  • signal_size (bool, default True) – Make the radii of the telescope position points proportional to the signal.

  • tel_index (bool, default False) – Show the telescope indexes together the telescope position points.

Returns:

ax

Return type:

AxesSubplot

Event.show_geometry3D(x_min=-1.0, x_max=1.0, y_min=-1, y_max=1.0, X_mark='X_max', shower_Edep=True, signal_size=True, xy_proj=True, pointing=False)

Show the shower track together with the telescope positions in a 3D plot.

Parameters:
  • x_min (float, default -1) – Lower limit of the coordinate x in km.

  • x_max (float, default 1) – Upper limit of the coordinate x in km.

  • y_min (float, default -1) – Lower limit of the coordinate y in km.

  • y_max (float, default 1) – Upper limit of the coordinate y in km.

  • X_mark (float) – Reference slant depth in g/cm^2 of the shower track to be marked in the figure. By default, the mark is placed at X_max.

  • shower_Edep (bool, default True) – Make the radii of the shower track points proportional to the energy deposited in each step length.

  • signal_size (bool, default True) – Make the radii of the telescope position points proportional to the signal.

  • xy_proj (bool, default True) – Show the xy projection of the shower track.

  • pointing (bool, default False) – Show the telescope axes.

Returns:

ax

Return type:

Axes3DSubplot

Event.show_distribution(grid=None, tel_index=0, size_x=2.0, size_y=2.0, N_x=10, N_y=10, **kwargs)

Make a new Event from a Grid object based on one of the telescopes of the observatory and show the distribution of photons (or photoelectrons) per m^2 in this grid. Results are shown in an either 1D or 2D plot, depending on the grid dimensions.

Parameters:
  • tel_index (int, default 0) – Index of the telescope used to generate the grid when grid==None. The grid is centered at the telescope location and the pointing direction is set to be the same.

  • size_x (float, defaut 2) – Size of the grid in km across the x direction.

  • size_y (float, default 2) – Size of the grid in km across the y direction.

  • N_x (int, default 10) – Number of cells across the x direction.

  • N_y (int, default 10) – Number of cells across the y direction.

  • atm_trans (bool) – Include the atmospheric transmission to transport photons. By default, this option is set to be the same as the Event object.

  • tel_eff (bool) – Include the telescope efficiency to calculate the signals. By default, this option is set to be the same as the Event object.

  • wvl_ini (float) – Initial wavelength in nm of the interval to calculate the signal when tel_eff==False. By default, this parameter is set to be the same as the Event object.

  • wvl_fin (float) – Final wavelength in nm of the interval to calculate the signal when tel_eff==False. By default, this parameter is set to be the same as the Event object.

  • wvl_step (float) – Discretization step in nm of the interval to calculate the signal when tel_eff==False. By default, this parameter is set to be the same as the Event object.

Returns:

  • grid_event (Event)

  • ax (AxesSubplot) – If 1D grid.

  • (ax1, ax2, cbar) (AxesSubplot and Colorbar) – If 2D grid.

Event.make_images(lat_profile=True, NSB=40.0)

Generate a time-varying shower image for each telescope assuming a circular camera with square pixels of same solid angle. The list of images is stored in the attribute images of the Event object.

Parameters:
  • lat_profile (bool, default True) – Use a NKG lateral profile to spread the signal. If False, a linear shower is assumed.

  • NSB (float, default 40) – Night sky background in MHz/m^2/deg^2.

Returns:

images – List of Image objects.

Return type:

list

See also

Image

Constructor of Image object.

Event.show_images(col=5, size=2)

Show subplots of shower images (if already exist). Each subplot is labelled with the telescope id.

Parameters:
  • col (int, default 5) – Number of columns of the figure.

  • size (float, default 2) – Subplot size in cm.