Simulations based on time structure of EAS shower fronts

Perform simple simulations for timing

Throw a simulated shower front on a cluster from various angles. Simulate just the arrival times.

Example usage:

>>> import tables

>>> from sapphire import FlatFrontSimulation, ScienceParkCluster

>>> data = tables.open_file('/tmp/test_showerfront_simulation.h5', 'w')
>>> cluster = ScienceParkCluster()

>>> sim = FlatFrontSimulation(cluster, data, '/', 200)
>>> sim.run()
class sapphire.simulations.showerfront.FlatFrontSimulation(*args, **kwargs)
generate_shower_parameters()

Generate shower parameters, i.e. azimuth and zenith angles.

For this groundparticles simulation, only the shower core position and rotation angle of the shower are generated. Do not interpret these parameters as the position of the cluster, or the rotation of the cluster! Interpret them as shower parameters.

Returns:

dictionary with shower parameters: core_pos (x, y-tuple) and azimuth.

simulate_detector_response(detector, shower_parameters)

Simulate detector response to a shower.

Return the arrival time of shower front passing the center of the detector.

get_arrival_time(detector, shower_parameters)

Calculate arrival time

Assumes a flat shower front and core position to be the center of the cluster.

Equation based on Fokkema2012 sec 4.2, eq 4.9. With additions to account for altitude. (DOI: 10.3990/1.9789036534383) The directional vector c * dt should be negative, not apparent in Fokkema2012 fig 4.4.

Returns:

Shower front arrival time in ns.

simulate_gps(station_observables, shower_parameters, station)

Simulate gps timestamp

Ensure that all detector arrival times are positive.

class sapphire.simulations.showerfront.FlatFrontSimulationWithoutErrors(*args, **kwargs)

This simulation does not simulate errors/uncertainties

This should result in perfect timing for the detectors.

class sapphire.simulations.showerfront.FlatFrontSimulation2D(*args, **kwargs)

This simulation ignores detector altitudes.

get_arrival_time(detector, shower_parameters)

Calculate arrival time

Ignore detector altitudes

Equation based on Fokkema2012 sec 4.2, eq 4.9. (DOI: 10.3990/1.9789036534383)

class sapphire.simulations.showerfront.FlatFrontSimulation2DWithoutErrors(*args, **kwargs)

Ignore altitude of detectors and do not simulate errors.

class sapphire.simulations.showerfront.ConeFrontSimulation(max_core_distance, *args, **kwargs)

This simulation uses a cone shaped shower front.

The opening angle of the cone is given in the init

Example usage:

>>> import tables

>>> from sapphire import ConeFrontSimulation, ScienceParkCluster

>>> data = tables.open_file('/tmp/test_showerfront_simulation.h5', 'w')
>>> cluster = ScienceParkCluster()

>>> sim = ConeFrontSimulation(100, cluster, data, '/', 200)
>>> sim.run()

Calculate arrival time

Parameters:

cone_angle – half of the opening angle of the cone.

generate_shower_parameters()

Generate shower parameters

For this cone-shaped showerfront, the core position, the azimuth and zenith angle of the shower are generated.

Returns:

dictionary with shower parameters: core_pos (x, y-tuple), azimuth and zenith.

get_arrival_time(detector, shower_parameters)

Calculate arrival time

class sapphire.simulations.showerfront.FlatFront

Simple flat shower front

delay_at_r(r)
front_shape(r)
class sapphire.simulations.showerfront.ConeFront

Simple cone shaped shower front

delay_at_r(r)
front_shape(r)

Delay of the showerfront relative to flat as function of distance

Parameters:

r – distance to the shower core in shower frame.

Returns:

delay time of shower front.

class sapphire.simulations.showerfront.CorsikaStationFront

Shower front shape derrived from CORSIKA simulations on a station.

A set of CORSIKA generated showers were used to determine the median detected arrival time in a 4-detector station as a function of core distance.

At large core distances the detection probability decreases and the arrival time becomes less accurate.

Currently only support for energies between 1e15 and 1e17 eV.

delay_at_r(r, energy=1e+16, particle='proton')
front_shape(r, energy, particle='proton')