Unleash the magic of simultaneous shower simulations with this Coreas generator.
Jelena Köhler @jelenakhlr
@date: January 2024
original version by @fedbont94
forked from https://github.com/fedbont94/Horeka
-
Select the proper branch
"radio_mpi" for the mpi version
"radio_classic" for the non-mpi version -
Compile the version of Corsika you need
for mpi: Make sure to use the PARALLEL option and to compile with MPILIBRARY
(do not use these for non-mpi)
For more info, see the Corsika manual: https://web.iap.kit.edu/corsika/usersguide/usersguide.pdf
and the Coreas manual: https://web.ikp.kit.edu/huege/downloads/coreas-manual.pdf -
Make sure you have all relevant python packages You can get miniradiotools from https://github.com/jelenakhlr/miniradiotools (only needed to create starshapes. You can also load antenna positions directly from a file instead.)
-
Check paths:
When using these scripts, make sure to modify paths, usernames, etc. in these files:
SubFile.sub
corsikaSim.sh
ExecuteSubfile.sh
utils/FileWriter.py
MakeCorsikaSim.py
Also check if you need to modify things in
utils/RadioFilesGenerator.py
utils/SimulationMaker.py -
Select your antenna layout
Inside utils/RadioFilesGenerator.py, select or adapt the antenna layout.\
Once you have set all paths and input values according to your needs, simply run
./ExecuteSubFile.sh
If you want to go rogue and manually submit a shower, you need to make sure you have the sub file and the inp, reas and list file ready.
Then you can submit the sub file on Horeka (or the cluster of your preference) using the command:
sbatch -p cpuonly -A ./SIMxxxxxx.sub
by @fedbont94
ExecuteSubFile.sh - Is an executable that submits on slurm (Horeka cluster) the SubFile.sub
SubFile.sub - Contains all the requests in terms of memory, time, node... for the cluster
It loads .bashrc (can be taken out if not necessary)
It cd in the corsika/run/ folder, you may need to change the path
It calls the python script with all arguments that need to be passed and MUST be adapted to your interests.
MakeCorsikaSim.py - Is the main script that for Corsika air shower simulation (more documentation in the script) MakeDetectorResponse.py - Is the main script that for detector response simulation (more documentation in the script)
utils/FileWriter.py - Contains a class that can be used to create and write a Corsika inp file and create "data", "temp", "log", "inp" folders.
(more documentation in the script)
utils/SimulationMaker.py - Contains a class that can be used for generating the submission stings and sh executable files.
It also has the generator function which yields the keys and string to submit,
made via the combinations of file and energies
(more documentation in the script)
utils/Submitter.py - Contains a class that can be used to spawns subprocesses for multiple instances instead of multiple job submissions. (more documentation in the script)\
utils/DetectorSimulator.py - Contains a class that can be used to simulate the detector response for a given corsika file.
(more documentation in the script)
utils/MultiProcesses.py - Contains a class that can be used to spawn multiple processes for the detector response simulation.
(more documentation in the script)