simulate_prod#

Generate simulation configuration and run simulations (if required).

Multipipe scripts will be produced as part of this application. Allows to run array layout simulation including shower and detector simulations

The entire simulation chain, parts of it, or nothing is executed:

  • shower simulations with CORSIKA only

  • shower simulations with CORSIKA which are piped directly to sim_telarray using the sim_telarray multipipe mechanism.

Command line arguments#

model_version (str, required)

The telescope model version to use (e.g., 5.0.0).

site (str, required)

North or South (case insensitive).

primary (str, required)

Name or ID of the primary particle to simulate. Allowed are common names like gamma, proton, or IDs for CORSIKA7 (e.g. 14 for proton) and PDG (e.g. 2212 for proton). Use the ‘primary_id_type’ option to specify the type of ID.

azimuth_angle (str or float, required)

Telescope pointing direction in azimuth. It can be in degrees between 0 and 360 or one of north, south, east or west (case insensitive). Note that North is 0 degrees and the azimuth grows clockwise, so East is 90 degrees.

zenith_angle (float, required)

Zenith angle in degrees.

nshow (int, optional)

Number of showers to simulate. The Number of simulated events depends on the number of times a shower is re-used in the telescope simulation. The number provided here is before any reuse factors.

start_run (int, required)

Start run number such that the actual run number will be ‘start_run’ + ‘run’. This is useful in case a new transform is submitted for the same production. It allows the transformation system to keep using sequential run numbers without repetition.

run (int, required)

Run number (actual run number will be ‘start_run’ + ‘run’).

data_directory (str, optional)

The location of the output directories corsika-data and simtel-data. the label is added to the data_directory, such that the output will be written to data_directory/label/simtel-data.

pack_for_grid_register (bool, optional)

Set whether to prepare a tarball for registering the output files on the grid. The files are written to the output_path/directory_for_grid_upload directory.

log_level (str, optional)

Log level to print.

Example#

Run the application:

simtools-simulate-prod \\
--model_version 5.0.0 --site north --primary gamma --azimuth_angle north \\
--zenith_angle 20 --start_run 0 --run 1

By default the configuration is saved in simtools-output/test-production together with the actual simulation output in corsika-data and simtel-data within. The location of the latter directories can be set to a different location via the option –data_directory, but the label is always added to the data_directory, such that the output will be written to data_directory/label/simtel-data.

simulate_prod.pack_for_register(logger, simulator, args_dict)[source]#

Pack the output files for registering on the grid.

Parameters:
logger: logging.Logger

Logger object.

simulator: Simulator

Simulator object.