simtools-derive-trigger-rates#

Derive cosmic-ray trigger rates for a single telescope or an array of telescopes.

Uses simulated background events (e.g. from proton primaries) to calculate the trigger rates. Input is reduced event data generated from simulations for the given configuration.

Command line arguments

event_data_file (str, required)

Event data file containing reduced event data.

array_layout_name (list, optional)

Name of the array layout to use for the simulation.

telescope_config_file (str, optional)

Path to a file containing telescope configurations.

plot_histograms (bool, optional)

Plot histograms of the event data.

model_version (str, optional)

Version of the simulation model to use.

site (str, optional)

Name of the site where the simulation is being run.

cr_spectrum (str, optional)

Path to a YAML file defining a user-provided cosmic-ray spectrum. Supported spectrum types: PowerLaw, LogParabola, PowerLawWithExponentialGaussian. If not given, the spectrum is selected from the CTAO spectrum library.

Example

Derive trigger rates for the South Alpha layout:

simtools-derive-trigger-rates \\
    --site South \\
    --model_version 6.0.0 \\
    --event_data_file /path/to/event_data_file.h5 \\
    --array_layout_name alpha\\
    --plot_histograms

Derive trigger rates with a user-defined spectrum:

simtools-derive-trigger-rates \\
    --site South \\
    --model_version 6.0.0 \\
    --event_data_file /path/to/event_data_file.h5 \\
    --array_layout_name alpha \\
    --cr_spectrum /path/to/spectrum.yml

Command line arguments#

options#

–help

show this help message and exit

–plot_histograms

Plot histograms of the event data.

–cr_spectrum

Path to a YAML file defining the cosmic-ray spectrum. Supported types: PowerLaw, LogParabola, PowerLawWithExponentialGaussian. If not given, the spectrum is selected from the CTAO spectrum library.

application#

–telescope_config_file

Path to a file containing telescope configurations.

–event_data_file

Event data file or glob pattern containing reduced event data.

Required.

–show_options

Print available values for a supported option and exit.

simulation model#

–model_version

Simulation production model version(s). Use –show_options model_version.

–overwrite_model_parameters

JSON string with model parameters to overwrite

–site

Observatory site (e.g., North, South). Use –show_options site.

–array_layout_name

Array layout name(s) (e.g., CTAO-North-Alpha, LSTN-01). Telescope names are assumed as single-telescope layouts. Use –show_options array_layout_name.

–array_element_list

list of array elements (e.g., LSTN-01, LSTN-02, MSTN).

output#

–output_file

Output data file.

–output_file_format

file format of output data

Default: ecsv.

–skip_output_validation

skip output data validation against schema

model repository#

–simulation_models_path

Path containing the simulation-model repository to read.

–simulation_models_git_path

Path to a local normal, bare, or mirror Git repository containing simulation models.

–simulation_models_git_revision

Git tag, ref, or commit to read from the simulation-model repository.

Examples#

Derive proton trigger rates for North arrays#

Use reduced proton events and repository array layouts to derive trigger rates for an LST and the North Alpha array.

Application: simtools-derive-trigger-rates

Integration test: derive_trigger_rates_model_repository_arrays_short.yml

Command

simtools-derive-trigger-rates --config tests/integration_tests/config/derive_trigger_rates_model_repository_arrays_short.yml

Configuration

array_layout_name:
  by_version:
    <7.0.0:
    - LSTN-01
    - alpha
    '>=7.0.0':
    - LSTN-01
    - CTAO-North-Alpha
event_data_file: ${generated:proton_run000001_za20deg_azm180deg_North_CTAO-North-Alpha_7.0.0_test.reduced_event_data.hdf5}
model_version: 7.0.0
output_path: simtools-output
plot_histograms: false
site: North

Derive proton trigger rates for a user spectrum#

Weight reduced proton events with a user-defined cosmic-ray spectrum and derive array trigger rates.

Application: simtools-derive-trigger-rates

Integration test: derive_trigger_rates_user_spectrum.yml

Command

simtools-derive-trigger-rates --config tests/integration_tests/config/derive_trigger_rates_user_spectrum.yml

Configuration

array_layout_name:
  by_version:
    <7.0.0:
    - LSTN-01
    - alpha
    '>=7.0.0':
    - LSTN-01
    - CTAO-North-Alpha
event_data_file: ${generated:proton_run000001_za20deg_azm180deg_North_CTAO-North-Alpha_7.0.0_test.reduced_event_data.hdf5}
model_version: 7.0.0
cr_spectrum: ${static:trigger_rates_user_spectrum_powerlaw.yml}
output_path: simtools-output
plot_histograms: false
site: North