CORSIKA Blocks

Classes corresponding to CORSIKA blocks and sub-blocks

The classes in this module correspond one-to-one with the sub-blocks (and blocks) as specified in the CORSIKA users manual.

Author: Javier Gonzalez

class sapphire.corsika.blocks.Format

The binary format information of the file.

As specified in the CORSIKA user manual, Section 10.2.1.

class sapphire.corsika.blocks.RunHeader(subblock)

The run header sub-block

As specified in the CORSIKA user manual, Table 7.

thickness_to_height(thickness)

“Calculate height (m) for given thickness (gramms/cm**2)

As specified in the CORSIKA user manual, Appendix D.

height_to_thickness(height)

Thickness (gramms/cm**2) of atmosphere given a height (m)

As specified in the CORSIKA user manual, Appendix D.

class sapphire.corsika.blocks.EventHeader(subblock)

The event header sub-block

As specified in the CORSIKA user manual, Table 8.

property hadron_model_low
property hadron_model_high
property computer
class sapphire.corsika.blocks.RunEnd(subblock)

The run end sub-block

As specified in the CORSIKA user manual, Table 14.

class sapphire.corsika.blocks.EventEnd(subblock)

The event end sub-block

As specified in the CORSIKA user manual, Table 13.

sapphire.corsika.blocks.particle_data(subblock)

Get particle data.

As specified in the CORSIKA user manual, Table 10. High-performing version of the ParticleData class, but without all the easy-to-use attribute access.

Transformations are needed for the x, y and p_z values from CORSIKA. CORSIKA coordinate conventions are mentioned in Figure 1 and Table 10.

Returns:

tuple with p_x, p_y, p_z, x, y, t, id, r, hadron_generation, observation_level, phi data.

sapphire.corsika.blocks.particle_data_thin(subblock)

Get thinned particle data.

Similar to particle_data(), but includes particle weight.

Returns:

tuple with p_x, p_y, p_z, x, y, t, id, r, hadron_generation, observation_level, phi, weight data.

class sapphire.corsika.blocks.ParticleData(subblock)

The particle data sub-block

As specified in the CORSIKA user manual, Table 10.

property is_detectable

Get True or False if the particle is detectable

Note: gamma particles are currently not included.

property particle
property is_particle
property is_nucleus
property is_cherenkov
property atomic_number
property atom
class sapphire.corsika.blocks.CherenkovData(subblock)

The cherenkov photon sub-block

As specified in CORSIKA user manual, Table 11.

The number of CherenkovData records in a sub-block depends on compilation options.

class sapphire.corsika.blocks.FormatThin

The format information of the thinned file

As specified in CORSIKA user manual, Section 10.2.2.

class sapphire.corsika.blocks.ParticleDataThin(subblock)

The thinned particle data sub-block

As specified in the CORSIKA user manual, Table 10.

class sapphire.corsika.blocks.CherenkovDataThin(subblock)

The thinned cherenkov photon sub-block

As specified in CORSIKA user manual, Table 11.

The number of CherenkovData records in a sub-block depends on compilation options.