simtools-generate-corsika-histograms#
Generates a set of histograms with Cherenkov photon distributions from CORSIKA output.
The Cherenkov photons (from observation level) are read from a CORSIKA IACT output file(s) provided as input.
The following 2D histograms are generated:
Density of Cherenkov photons on the ground
Incoming direction (directive cosines) of the Cherenkov photons
Time of arrival (ns) vs altitude of production (km)
The following 1D histograms are generated:
Wavelength distribution of Cherenkov photons
Time of arrival (ns) distribution of Cherenkov photons
Altitude of production (km) distribution of Cherenkov photons
Lateral distribution of Cherenkov photons (distance from shower core in m)
Command line arguments
- input_files (str, required)
The name(s) of the CORSIKA IACT file(s) resulted from the CORSIKA simulation.
- output_file (str, required)
The name of the output pdf file to save the histograms (alias:
pdf_file_name).- file_labels (str, optional)
Labels for the input files (in the same order as input_files). If not provided, the file names are used as labels.
Example
Fill and plot histograms for a test IACT file:
simtools-generate-corsika-histograms --input_files /workdir/external/simtools/\\ tests/resources/tel_output_10GeV-2-gamma-20deg-CTAO-South.corsikaio \\ --output_file test.pdf
Fill and plot histograms for several files:
simtools-generate-corsika-histograms --input_files file1 file 2 \\ --file_lablels label1 label2 \\ --output_file test.pdf
Notes
The typical use case of this application is to generate lateral photon density distribution to compare different CORSIKA simulation settings or different CORSIKA versions. The following steps are recommended:
generate a ‘star’-like array of telescopes with the ‘simtools-generate-regular-arrays’ application. There should be a sufficient number of telescopes (e.g. 50 or more) in the layout with non-overlapping telescope definitions
run CORSIKA simulations with the desired settings using this telescope layout (use the ‘overwrite_model_parameters’ option to point to the generated layout simulation model change file (in the format given by ‘simulation_models_info.schema.yml’).
run this application to generate the histograms for the produced CORSIKA IACT output
Command line arguments#
options#
- –help
show this help message and exit
- –input_files
Name(s) of the CORSIKA IACT file(s) to process
Required.
- –file_labels
Labels for the input files (in the same order as input_files)
- –normalization
Normalization method for histograms. Options: ‘per-telescope’, ‘per-bin’
Default: per-telescope. Choices: per-telescope, per-bin.
- –axis_distance
Distance from x/y axes to consider when calculating lateral density profiles (in meters).
Default: 1000.0.
- –output_file
Output PDF file with the histograms.
Required.
application#
- –show_options
Print available values for a supported option and exit.
Example#
Plot CORSIKA shower distributions#
Read a gamma-ray CORSIKA event file and produce diagnostic histograms of the simulated showers.
Application: simtools-generate-corsika-histograms
Integration test: generate_corsika_histograms_plot.yml
Command
simtools-generate-corsika-histograms --config tests/integration_tests/config/generate_corsika_histograms_plot.yml
Configuration
input_files: ${generated:gamma_run000007_za40deg_azm180deg_South_subsystem_lsts_7.0.0_test.corsika.zst}
output_path: simtools-output
output_file: tel_output_10GeV-2-gamma-20deg-CTAO-South.pdf
file_labels: CORSIKA IO output