Query CORSIKA overview for simulations

class sapphire.corsika.corsika_queries.CorsikaQuery(data, simulations_group='/simulations')

Setup variables to point to the tables

Parameters:
  • data – either a PyTables file or path to a HDF5 file

  • simulations_group – path to the simulations group

finish()

Clean-up after using

Do not use if you opened the file yourself and still intent to use it.

all_simulations(iterator=False)

Get all simulations

Returns:

all simulations.

seeds(simulations, iterator=False)

Get combined seeds for set of simulations

Returns:

combined seed1 and seed2.

get_info(seeds)

Get info for a simulation

Parameters:

seeds – combined string with seed1 and seed2.

Returns:

row matching the seeds.

property all_energies

All available energies

Returns:

set of available simulation energies in log10(eV).

property all_particles

All available particles

Returns:

set of available simulation particles.

property all_azimuths

All available azimuths

Returns:

set of available simulation azimuths.

property all_zeniths

All available zeniths

Returns:

set of available simulation zeniths.

simulations(particle='proton', energy=None, zenith=None, azimuth=None, iterator=False)

Set of available energies given the requirements

Parameters:
  • particle – primary particle must be this kind, name of particle. Defaults to proton.

  • energy – primary energy must be this value, in log10(eV).

  • zenith – shower zenith must be this value, in degrees.

  • azimuth – shower azimuth must be this value, in degrees.

Returns:

simulations matching the query.

available_parameters(parameter, *args, **kwargs)

Get set of available values of type parameter for a subset

Parameters:

parameter – name of the parameter for which the available values are returned.

Param:

use the arguments available to simulations() to filter the simulations.

Returns:

set of available values.

filter(key, value)

Filter to be in a range

Parameters:
  • key – variable to filter.

  • value – value to match.

Returns:

query.

float_filter(key, value)

Filter float values

Take into account that the values are likely not a perfect match.

Parameters:
  • key – variable to filter.

  • value – value to match.

Returns:

query.

range_filter(key, min_value=None, max_value=None)

Filter to be in a range

Parameters:
  • key – variable to filter.

  • min_value,max_value – limits on the value.

Returns:

query.

perform_query(query, iterator=False)

Perform a query on the simulations table

Parameters:

query – a valid PyTables query string for the simulations table.

Returns:

simulations matching the query.