Simulator#
Base modules for calling external simulation software.
simulator#
Simulator class for managing simulations of showers and array of telescopes.
- class simulator.Simulator(args_dict, label=None, extra_commands=None, mongo_db_config=None)[source]#
Simulator is managing the simulation of showers and of the array of telescopes.
It interfaces with simulation software packages (e.g., CORSIKA or sim_telarray).
The configuration is set as a dict corresponding to the command line configuration groups (especially simulation_software, simulation_model, simulation_parameters).
- Parameters:
- args_dictdict
Configuration dictionary (includes simulation_software, simulation_model, simulation_parameters groups).
- label: str
Instance label.
- extra_commands: str or list of str
Extra commands to be added to the run script before the run command.
- mongo_db_config: dict
MongoDB configuration.
- get_file_list(file_type='output')[source]#
Get list of files generated by simulations.
Options are “input”, “output”, “hist”, “log”. Not all file types are available for all simulation types. Returns an empty list for an unknown file type.
- Parameters:
- file_typestr
File type to be listed.
- Returns:
- list
List with the full path of all output files.
- print_list_of_files(file_type='output')[source]#
Print list of output files generated by simulations.
Options are “input”, “output”, “hist”, “log”.
- Parameters:
- file_typestr
File type to be listed.
- resources(input_file_list=None)[source]#
Print a simple report on computing resources used.
Includes run time per run only at this point.
- Parameters:
- input_file_list: str or list of str
Single file or list of files of shower simulations.
- simulate(input_file_list=None)[source]#
Submit a run script as a job.
- Parameters:
- input_file_list: str or list of str
Single file or list of files of shower simulations.
- property simulation_software#
The attribute simulation_software.