Event
- class showermodel.event.Event(observatory, shower, event_type=None, atm_trans=True, tel_eff=True, **kwargs)
Bases:
objectContain 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) – Observatory that observes the shower.
shower (Shower) – Shower to be observed.
atm_trans (bool, default True) – Include the atmospheric transmision 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.
**kwargs ({wvl_ini, wvl_fin, wvl_step}) – These parameters will be passed to the Signal constructor to modify the wavelength interval when tel_eff==False. If None, the wavelength interval defined in each telescope is used.
- event_type
Name given to the event. Default to None.
- Type
str
- fluorescence
- Type
- atmosphere
- Type
- observatory
- Type
- 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 transmision 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.
- make_images()
Generate shower images.
- show_images()
Show shower images (if already exist).
- class showermodel.event.GridEvent(grid, shower, atm_trans=True, tel_eff=True, **kwargs)
Bases:
EventDaughter class of Event used to calculate ground distributions.
A Grid object must be input to create a GridEvent. The event_type is set to ‘GridEvent’ and the attribute observatory is replaced by grid. The method show_distribution does not accept arguments.
- Methods:
- Event.show_projection(tel_index=0, shower_size=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) – Index of the chosen telescope of the observatory.
shower_size (bool, default True) – Make the radii of the shower track points proportional to the shower size.
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 or None) – Reference slant depth in g/cm^2 of the shower track to be marked in the figure, default to X_max. If X_mark is set to None, no mark is included.
- 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_size=True, signal_size=True, tel_index=False)
Show the shower track together with the telescope positions in a 2D plot.
- Parameters
x_min (float) – Lower limit of the coordinate x in km.
x_max (float) – Upper limit of the coordinate x in km.
y_min (float) – Lower limit of the coordinate y in km.
y_max (float) – 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, default to X_max. If X_mark is set to None, no mark is included.
shower_size (bool, default True) – Make the radii of the shower track points proportional to the shower size.
signal_size (bool) – Make the radii of the telescope position points proportional to the signal.
tel_index (bool) – 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_size=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) – Lower limit of the coordinate x in km.
x_max (float) – Upper limit of the coordinate x in km.
y_min (float) – Lower limit of the coordinate y in km.
y_max (float) – 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, default to X_max. If X_mark is set to None, no mark is included.
shower_size (bool, default True) – Make the radii of the shower track points proportional to the shower size.
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.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 (book) – Use a NKG lateral profile to spread the signal. If False, a linear shower is assumed.
NSB (float) – Night sky background in MHz/m^2/deg^2.
- Returns
images – List of Image objects.
- Return type
list
See also
ImageConstructor 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) – Number of columns of the figure. Default to 5.
size (float, default 2) – Subplot size in cm.