simtools-production-derive-corsika-limits#
Derives the limits for energy, radial distance, and viewcone to be used in CORSIKA simulations.
The limits are derived based on the event loss fraction specified by the user.
Command line arguments#
- event_data_files (str, required)
Path to a file containing event data file paths.
- telescope_ids (str, required)
Path to a file containing telescope configurations.
- loss_fraction (float, required)
Fraction of events to be lost.
- plot_histograms (bool, optional)
Plot histograms of the event data.
- output_file (str, optional)
Path to the output file for the derived limits.
Example#
Derive limits for a given file with a specified loss fraction.
simtools-production-derive-corsika-limits \\
--event_data_files path/to/event_data_files.yaml \\
--telescope_ids path/to/telescope_configs.yaml \\
--loss_fraction 1e-6 \\
--plot_histograms \\
--output_file corsika_simulation_limits_lookup.ecsv
- production_derive_corsika_limits.create_results_table(results, loss_fraction)[source]#
Create an Astropy Table from the results.
- Parameters:
- resultslist[dict]
- List of dictionaries containing the computed limits for each file
and telescope configuration.
- loss_fractionfloat
Fraction of events to be lost, added as metadata to the table.
- Returns:
- astropy.table.Table
An Astropy Table containing the results with appropriate units and metadata.
- production_derive_corsika_limits.main()[source]#
Derive limits for energy, radial distance, and viewcone.
- production_derive_corsika_limits.process_file(file_path, telescope_ids, loss_fraction, plot_histograms)[source]#
Process a single file and compute limits.
- Parameters:
- file_pathstr
Path to the event data file.
- telescope_idslist[int]
List of telescope IDs to filter the events.
- loss_fractionfloat
Fraction of events to be lost.
- plot_histogramsbool
Whether to plot histograms.
- Returns:
- dict
Dictionary containing the computed limits.