simtools-production-generate-grid

simtools-production-generate-grid#

Generate a grid of simulation points using flexible axes definitions.

This application generates a grid of simulation points based on the provided axes definitions. The axes definitions (range, binning) are specified in a file. The viewcone, radius and energy thresholds are provided as a lookup table and are interpolated based on the generated grid points. The generated grid points are filtered based on the specified telescope IDs and the limits from the lookup table. The generated grid points are saved to a file. It can also convert the generated points to RA/Dec coordinates if the selected coordinate system is ‘ra_dec’.

Command line arguments#

axes (str, required)

Path to a YAML or JSON file defining the axes of the grid.

coordinate_system (str, optional, default=’zenith_azimuth’)

The coordinate system for the grid generation (‘zenith_azimuth’ or ‘ra_dec’).

observing_time (str, optional, default=now)

Time of the observation (format: ‘YYYY-MM-DD HH:MM:SS’).

lookup_table (str, required)

Path to the lookup table for simulation limits. The table should contain varying azimuth and/or zenith angles.

telescope_ids (list of int, optional)

List of telescope IDs as used in sim_telarray to filter the events.

output_file (str, optional, default=’grid_output.json’)

Output file for the generated grid points (default: ‘grid_output.json’).

Example#

To generate a grid of simulation points, execute the script as follows:

simtools-production-generate-grid --site North --model_version 6.0.0 \
  --axes  tests/resources/production_grid_generation_axes_definition.yml \
  --coordinate_system ra_dec --observing_time "2017-09-16 00:00:00" \
  --lookup_table tests/resources/corsika_simulation_limits_lookup.ecsv \
    --telescope_ids 1
production_generate_grid.load_axes(file_path: str)[source]#

Load axes definitions from a YAML or JSON file.

Parameters:
file_pathstr

Path to the axes YAML or JSON file.

Returns:
list[dict]

List of axes definitions with Quantity values.

production_generate_grid.main()[source]#

Run the Grid Generation application.