icecube.simprod.jcorsika.corsika_builder module

class icecube.simprod.jcorsika.corsika_builder.CorsikaBuilder(version)

Bases: object

build(options, suffix=None, cwd=None, fluka_dir=None, fluka_tarball=None, log_file=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>)

convenience function that just compiles Fluka and then calls coconut

build_fluka(fluka_dir, fluka_tarball, fortran='gfortran', force=False, log_file=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>, **kwargs)

Create fluka directory, cd into it and build fluka. If force==True, previous build is removed.

This is not a general purpose script!

coconut(options, log_file, suffix=None, cwd=None)

Spawn a process to compile CORSIKA.

This function calls coconut and passes the options required through coconut’s stdin. If a suffix is provided, the executable name is renamed by replacing everything after the first occurrence of ‘_’.

The options parameter must be a dictionary like this:

{'float': '2',
 'geometry': '1',
 'he_model': '6',
 'le_model': '2',
 'other': ['9', '6', 'i', 's']}

Note that each key corresponds to a section in coconut and the values are the ones that correspond to each option.