CORSIKA and sim_telarray#

Support module for running CORSIKA and sim_telarray.

corsika_simtel_runner#

Run simulations with CORSIKA and pipe it to sim_telarray using the multipipe functionality.

class corsika_simtel.corsika_simtel_runner.CorsikaSimtelRunner(common_args=None, corsika_args=None, simtel_args=None)[source]#

Run simulations with CORSIKA and pipe it to sim_telarray using the multipipe functionality.

CORSIKA is set up using corsika_autoinputs program provided by the sim_telarray package. It creates the multipipe script and sim_telarray command corresponding to the requested configuration.

It uses CorsikaConfig to manage the CORSIKA configuration and SimulatorArray for the sim_telarray configuration. User parameters must be given by the common_args, corsika_args and simtel_args arguments. The corsika_args and simtel_args are explained in CorsikaRunner and SimulatorArray respectively. An example of the common_args is given below.

common_args = {
    'label': 'test-production',
    'simtel_source_path': '/workdir/sim_telarray/',
}
Parameters:
common_args: dict

Arguments common to both CORSIKA and sim_telarray runners

corsika_args: dict

Arguments for the CORSIKA runner (see full list in CorsikaRunner documentation).

simtel_args: dict

Arguments for the sim_telarray runner (see full list in SimulatorArray documentation).

export_multipipe_script(**kwargs)[source]#

Write the multipipe script used in piping CORSIKA to sim_telarray.

Parameters:
kwargs: dict
The following optional parameters can be provided:
run_number: int

Run number.

Returns:
Path:

Full path of the run script file.

get_file_name(file_type, run_number=None, **kwargs)[source]#

Get a CORSIKA or sim_telarray style file name for various file types.

See the implementations in CorsikaRunner and SimulatorArray for details.

get_info_for_file_name(run_number)[source]#

Get a dictionary necessary for building a CORSIKA or sim_telarray runner file names.

Returns:
dict

Dictionary with the keys necessary for building a CORSIKA or sim_telarray runner file names.

prepare_run_script(use_pfp=False, **kwargs)[source]#

Get the full path of the run script file for a given run number.

Parameters:
use_pfp: bool

Whether to use the preprocessor in preparing the CORSIKA input file

kwargs: dict
The following optional parameters can be provided:
run_number: int

Run number.

Returns:
Path:

Full path of the run script file.