simtools-production-merge-corsika-limits#

Merge CORSIKA limit tables from multiple grid points and check grid completeness.

The corsika limit tables are first generated by the application ‘simtools-production-derive-corsika-limits’ and contain derived limits for energy, radial distance, and viewcone for different observational conditions. The individual tables are merged into a single table for each grid point by the application ‘merge_tables’. This tool finalizes the merging process and checks the completeness of the grid against a provided grid definition file.

This tool supports three main use cases:

  1. Merge multiple CORSIKA limit tables into a single file and optionally generate plots of the derived limits.

  2. Merge tables and also check for grid completeness against a provided grid definition file. This requires the –grid_definition parameter. Coverage plots can also be generated.

  3. Check grid completeness of an already merged table file. This requires both the –merged_table and –grid_definition parameters.

Command line arguments#

input_files (str)

Directory containing corsika_simulation_limits_lookup*.ecsv files to be merged, or a list of specific files to merge. Not used if –merged_table is provided.

input_files_list (str)

Path to a text file containing a list of input files (one file path per line) to be merged. Not used if –merged_table is provided.

merged_table (str)

Path to an already merged table file. Used for checking grid completeness.

grid_definition (str)

Path to a YAML file defining the expected grid points. Required for grid completeness checks and coverage plots.

output_file (str, optional)

Name of the output file for the merged limits table. Default is “merged_corsika_limits.ecsv”.

plot_grid_coverage (bool, optional)

Flag to generate plots showing grid coverage. Requires –grid_definition.

plot_limits (bool, optional)

Flag to generate plots showing the derived limits.

Examples#

  1. Merge CORSIKA limit tables from a directory:

    simtools-production-merge-corsika-limits \\
        --input_files "simtools-output/corsika_limits/" \\
        --output_file merged_limits.ecsv --plot_limits
    
  2. Merge tables and check grid completeness:

    simtools-production-merge-corsika-limits \\
        --input_files "simtools-output/corsika_limits/" \\
        --grid_definition grid_definition.yaml \\
        --output_file merged_limits.ecsv --plot_grid_coverage
    
  3. Check grid completeness of an existing merged table:

    simtools-production-merge-corsika-limits \\
        --merged_table merged_limits.ecsv \\
        --grid_definition grid_definition.yaml --plot_grid_coverage
    
  4. Merge tables using a list of files from a text file:

    simtools-production-merge-corsika-limits \\
        --input_files_list file_list.txt \\
        --output_file merged_limits.ecsv
    
production_merge_corsika_limits.main()[source]#

Merge CORSIKA limit tables and check grid completeness.