ShowerPy is a set of Python classes that provides users with a simple interface to create single-shower CORSIKA simulations, extract full particle track information, and generate shower plots.
All data is available as pandas DataFrames, allowing you to create custom plots and perform detailed analysis. A quick overview of the workflow is shown below
The ShowerPy classes use pyeventio and pycorsikaio to load the fortran files produced by CORSIKA. Further, demo install on woodycap uses CORSIKA 7.8000 (Released February 2025). For more information visit the official website. You can also cite the showerpy releases using the Zenodo DOI.
First, create and activate the showerpy
mamba environment using the following commands:
mamba env create -f environment.yml
mamba activate showerpy
Then, open the demo notebook Demo.ipynb
, which provides an introduction to using ShowerPy.
As shown in the demo notebook, the CorsikaRunner
class is used to generate the necessary simulations. If you’re running the demo on woodycap5
or woodycap6
, no additional setup is required, as the CORSIKA executable points to a public installation.
If you want to simulate showers locally, please first register as a new CORSIKA user. After registering, you will receive login credentials to download CORSIKA. Once downloaded, unpack the archive using:
tar -xzf corsika*
To compile CORSIKA, you need to install GFortran on your machine.
In the root of the extracted directory, run the following command:
./coconut -e
(The -e
flag enters expert mode.)
You will then be prompted for different compile-time options. Select the following options in order, pressing Enter after each selection:
- Compiler Selection:
2
(compiler default) - High-Energy Hadronic Interaction Model:
3
(QGSJETIII-01)
-> You can also switch to a different model depending on your use case. Please note that when using EPOS, a modification to the input_template is required. - Low-Energy Hadronic Interaction Model:
3
(URQMD 1.3cr) - Date and time routine:
1
(automatic detection by configure) - Detector Geometry:
2
(non-flat volume detector geometry)
Next, you will arrive at the selection for additional CORSIKA program options. Please type the following string into the prompt:
1b 8a 9a
These will configure the use of Konrad Bernlöhr's IACT routines (1b), the compilation of the PLOTSH script (8a), and the use of an external atmosphere profile (9a).
You will then proceed to configure these options:
- Particles at detector level not stored in IACT file:
1
- Photons counted only in step where emitted:
1
- Emission angle depending on wavelength:
2
After this, press Enter to compile the plottracks
script (PLOTSH
).
Then, press Enter again and confirm with yes
to accept the selected CORSIKA program options.
Please Note:
- If you are re-running
coconut
, the settings used for the previous compilation are cached. You can automatically select them by pressing Enter. - If you want to start fresh, you can disable cached options using
./coconut --no-cached -e
.
Finally, to begin the compilation process select f
and press Enter again.
To test the successful compilation you can execute the binary ./run/corsika78000Darwin_QGSIII_urqmd
. If you are greeted with the CORSIKA message, everything has compiled successfully.
By default, the internal atmospheric profile is used. If you want to use an external, site-specific profile, you can specify this when configuring the simulation run (see demo notebook). For H.E.S.S. members and CTA members, such files (e.g., atmprof10.dat
) are provided and are typically based on local balloon flight measurements.