Trigger simulations.#
telescope_trigger_rates#
Trigger rate calculation for telescopes and arrays of telescopes.
- telescope_trigger_rates.PARTICLE_SPECTRUM_MAP = {'electron': PowerLawWithExponentialGaussian(2.385e-09 1 / (TeV s sr cm2) * (E / 1.0 TeV)**-3.43 * (1 + 1.95 * (exp(Gauss(log10(E / 1.0 TeV), -0.101, 0.741)) - 1)), 'proton': PowerLaw(9.8e-06 1 / (TeV s sr cm2) * (E / 1.0 TeV)**-2.62)}#
Mapping from primary particle common name to default cosmic-ray spectrum.
- telescope_trigger_rates.get_cosmic_ray_spectrum(primary_particle=None, cr_spectrum_file=None)[source]#
Return the cosmic-ray spectrum to use for trigger rate calculations.
If a YAML spectrum file is provided, the spectrum is loaded from that file. Otherwise, the spectrum is selected based on the primary particle name. An explicit spectrum file is required when the primary particle is not supported.
- Parameters:
- primary_particlestr, optional
Common name of the simulated primary particle (e.g. ‘proton’, ‘electron’).
- cr_spectrum_filestr or Path, optional
Path to a YAML file describing the cosmic-ray spectrum.
- Returns:
- spectrum
A callable spectrum object from ctao_cr_spectra.
- telescope_trigger_rates.telescope_trigger_rates(args_dict, context=None)[source]#
Calculate trigger rates for single telescopes or arrays of telescopes.
Main function to read event data, fill histograms, and derive trigger rates.
- Parameters:
- args_dictdict
Dictionary with configuration parameters.
- Returns:
- dict
Dictionary with array names as keys and trigger rates (astropy.units.Quantity) as values. Example: {“array_name”: 1234.5 * u.Hz}