PyREx

pyrex.EventKernel

class pyrex.EventKernel(generator, antennas, ice_model=<pyrex.ice_model.AntarcticIce object>, ray_tracer=<class 'pyrex.ray_tracing.SpecializedRayTracer'>, signal_model=<class 'pyrex.askaryan.ARZAskaryanSignal'>, signal_times=array([-5.000e-08, -4.995e-08, -4.990e-08, ..., 4.985e-08, 4.990e-08, 4.995e-08]), event_writer=None, triggers=None, offcone_max=40, weight_min=None, attenuation_interpolation=0.1)

High-level kernel for controlling event simulation.

The kernel is responsible for handling the classes and objects which control the major simulation steps: particle creation, signal production, signal propagation, and antenna response. The modular kernel structure allows for easy switching of the classes or objects which handle any of the simulation steps.

Parameters
generator

A particle generator to create neutrino events.

antennas

An iterable object consisting of antenna objects which can receive and store signals.

ice_modeloptional

An ice model describing the ice surrounding the antennas.

ray_traceroptional

A ray tracer capable of propagating signals from the neutrino vertex to the antenna positions.

signal_modeloptional

A signal class which generates signals based on the particle.

signal_timesarray_like, optional

The array of times over which the neutrino signal should be generated.

event_writerFile, optional

A file object to be used for writing data output.

triggersfunction or dict, optional

A function or dictionary with function values representing trigger conditions of the detector. If a dictionary, must have a “global” key with its value representing the global detector trigger.

offcone_maxfloat or None, optional

The maximum angle away from the Cherenkov angle to be simulated. Antennas which view an event with an angle larger than this angle will skip the calculation of the Askaryan signal and assume no significant signal is seen. If None, no offcone cut is applied.

weight_minfloat or tuple or None, optional

The minimum particle weight(s) which should be simulated. If a float, particles with a total weight less than this value will be skipped. If a tuple, particles with a survival weight less than the first element of the tuple or with an interaction weight less than the second element of the tuple will be skipped. If None, no minimum weight is applied.

attenuation_interpolationfloat or None, optional

The logarithmic (base 10) interpolation step size to be used for interpolating attenuation along the ray path. If None, no interpolation of the attenuation is applied.

See also

pyrex.Event

Class for storing a tree of Particle objects representing an event.

pyrex.Particle

Class for storing particle attributes.

pyrex.ice_model.AntarcticIce

Class describing the ice at the south pole.

pyrex.RayTracer

Class for calculating the ray-trace solutions between points.

pyrex.AskaryanSignal

Class for generating Askaryan signals according to ARZ parameterization.

pyrex.File

Class for reading or writing data files.

Notes

The kernel is designed to be modular so individual parts of the simulation chain can be exchanged. In order to interchange the pieces, their classes require the following at a minimum:

The particle generator generator must have a create_event method which takes no arguments and returns a Event object consisting of Particle objects with vertex, direction, energy, and weight attributes.

The antenna iterable antennas must yield each antenna object once when iterating directly over antennas. Each antenna object must have a position attribute and a receive method which takes a signal object as its first argument, and ndarray objects as direction and polarization keyword arguments.

The ice_model must have an index method returning the index of refraction given a (negative-valued) depth, and it must support anything required of it by the ray_tracer.

The ray_tracer must be initialized with the particle vertex and an antenna position as its first two arguments, and the ice_model of the kernel as the ice_model keyword argument. The ray tracer must also have exists and solutions attributes, the first of which denotes whether any paths exist between the given points and the second of which is an iterable revealing each path between the points. These paths must have emitted_direction, received_direction, and path_length attributes, as well as a propagate method which takes a signal object and applies the propagation effects of the path in-place to that object.

The signal_model must be initialized with the signal_times array, a Particle object from the Event, the viewing_angle and viewing_distance according to the ray_tracer, and the ice_model. The object created should be a Signal object with times and values attributes representing the time-domain Askaryan signal produced by the Particle.

Attributes
gen

The particle generator responsible for particle creation.

antennas

The iterable of antennas responsible for handling applying their response and storing the resulting signals.

ice

The ice model describing the ice containing the antennas.

ray_tracer

The ray tracer responsible for signal propagation through the ice.

signal_model

The signal class to use to generate signals based on the particle.

signal_times

The array of times over which the neutrino signal should be generated.

writer

The file object to be used for writing data output.

triggers

The trigger condition(s) of the detector.

offcone_max

The maximum angle away from the Cherenkov angle to be simulated.

weight_min

The minimum particle weight(s) which should be simulated.

attenuation_interpolationfloat or None, optional

The logarithmic (base 10) interpolation step size to be used for interpolating attenuation along the ray path.

Methods

event()

Create a neutrino event and run it through the simulation chain.

PyREx

A Python package for simulation of neutrinos and radio antennas in ice. Version 1.10.0

Navigation