SimulatedEventsInfo
- class pyirf.simulations.SimulatedEventsInfo(n_showers, energy_min, energy_max, max_impact, spectral_index, viewcone_min, viewcone_max)[source]
Bases:
object
Information about all simulated events, for calculating event weights.
- Attributes:
- n_showers: int
Total number of simulated showers. If reuse was used, this should already include the reuse.
- energy_min: u.Quantity[energy]
Lower limit of the simulated energy range
- energy_max: u.Quantity[energy]
Upper limit of the simulated energy range
- max_impact: u.Quantity[length]
Maximum simulated impact parameter
- spectral_index: float
Spectral Index of the simulated power law with sign included.
- viewcone_min: u.Quantity[angle]
Inner angle of the viewcone
- viewcone_max: u.Quantity[angle]
Outer angle of the viewcone
Attributes Summary
Upper limit of the simulated energy range
Lower limit of the simulated energy range
Maximum simualted impact radius
Total number of simulated showers, if reuse was used, this must already include reuse
Spectral index of the simulated power law with sign included
Outer viewcone angle
Inner viewcone angle
Methods Summary
calculate_n_showers_3d_lonlat
(energy_bins, ...)Calculate number of showers that were simulated in the given energy and 2D fov bins in nominal coordinates.
calculate_n_showers_3d_polar
(energy_bins, ...)Calculate number of showers that were simulated in the given energy and 2D fov bins in polar coordinates.
calculate_n_showers_per_energy
(energy_bins)Calculate number of showers that were simulated in the given energy intervals
Calculate number of showers that were simulated in the given energy and fov bins.
calculate_n_showers_per_fov
(fov_bins)Calculate number of showers that were simulated in the given fov bins.
Attributes Documentation
- energy_max
Upper limit of the simulated energy range
- energy_min
Lower limit of the simulated energy range
- max_impact
Maximum simualted impact radius
- n_showers
Total number of simulated showers, if reuse was used, this must already include reuse
- spectral_index
Spectral index of the simulated power law with sign included
- viewcone_max
Outer viewcone angle
- viewcone_min
Inner viewcone angle
Methods Documentation
- calculate_n_showers_3d_lonlat(energy_bins, fov_longitude_bins, fov_latitude_bins, subpixels=20)[source]
Calculate number of showers that were simulated in the given energy and 2D fov bins in nominal coordinates.
This assumes the events were generated uniformly distributed per solid angle, and from a powerlaw in energy like CORSIKA simulates events.
- Parameters:
- energy_bins: astropy.units.Quantity[energy]
The energy bin edges for which to calculate the number of simulated showers
- fov_longitude_bins: astropy.units.Quantity[angle]
The FOV longitude bin edges for which to calculate the number of simulated showers
- fov_latitude_bins: astropy.units.Quantity[angle]
The FOV latitude bin edges for which to calculate the number of simulated showers
- Returns:
- n_showers: numpy.ndarray(ndim=3)
The expected number of events inside each of the
energy_bins
,fov_longitude_bins
andfov_latitude_bins
. Dimension (n_energy_bins, n_fov_longitude_bins, n_fov_latitude_bins) This is a floating point number. The actual numbers will follow a poissionian distribution around this expected value.
- calculate_n_showers_3d_polar(energy_bins, fov_offset_bins, fov_position_angle_bins)[source]
Calculate number of showers that were simulated in the given energy and 2D fov bins in polar coordinates.
This assumes the events were generated uniformly distributed per solid angle, and from a powerlaw in energy like CORSIKA simulates events.
- Parameters:
- energy_bins: astropy.units.Quantity[energy]
The energy bin edges for which to calculate the number of simulated showers
- fov_offset_bins: astropy.units.Quantity[angle]
The FOV radial bin edges for which to calculate the number of simulated showers
- fov_position_angle_bins: astropy.units.Quantity[radian]
The FOV azimuthal bin edges for which to calculate the number of simulated showers
- Returns:
- n_showers: numpy.ndarray(ndim=3)
The expected number of events inside each of the
energy_bins
,fov_offset_bins
andfov_position_angle_bins
. Dimension (n_energy_bins, n_fov_offset_bins, n_fov_position_angle_bins) This is a floating point number. The actual numbers will follow a poissionian distribution around this expected value.
- calculate_n_showers_per_energy(energy_bins)[source]
Calculate number of showers that were simulated in the given energy intervals
This assumes the events were generated and from a powerlaw like CORSIKA simulates events.
- Parameters:
- energy_bins: astropy.units.Quantity[energy]
The interval edges for which to calculate the number of simulated showers
- Returns:
- n_showers: numpy.ndarray
The expected number of events inside each of the
energy_bins
. This is a floating point number. The actual numbers will follow a poissionian distribution around this expected value.
- calculate_n_showers_per_energy_and_fov(energy_bins, fov_bins)[source]
Calculate number of showers that were simulated in the given energy and fov bins.
This assumes the events were generated uniformly distributed per solid angle, and from a powerlaw in energy like CORSIKA simulates events.
- Parameters:
- energy_bins: astropy.units.Quantity[energy]
The energy bin edges for which to calculate the number of simulated showers
- fov_bins: astropy.units.Quantity[angle]
The FOV bin edges for which to calculate the number of simulated showers
- Returns:
- n_showers: numpy.ndarray(ndim=2)
The expected number of events inside each of the
energy_bins
andfov_bins
. Dimension (n_energy_bins, n_fov_bins) This is a floating point number. The actual numbers will follow a poissionian distribution around this expected value.
- calculate_n_showers_per_fov(fov_bins)[source]
Calculate number of showers that were simulated in the given fov bins.
This assumes the events were generated uniformly distributed per solid angle, like CORSIKA simulates events with the VIEWCONE option.
- Parameters:
- fov_bins: astropy.units.Quantity[angle]
The FOV bin edges for which to calculate the number of simulated showers
- Returns:
- n_showers: numpy.ndarray(ndim=2)
The expected number of events inside each of the
fov_bins
. This is a floating point number. The actual numbers will follow a poissionian distribution around this expected value.