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 aEvent
object consisting ofParticle
objects withvertex
,direction
,energy
, andweight
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 areceive
method which takes a signal object as its first argument, andndarray
objects asdirection
andpolarization
keyword arguments.The
ice_model
must have anindex
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 theice_model
keyword argument. The ray tracer must also haveexists
andsolutions
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 haveemitted_direction
,received_direction
, andpath_length
attributes, as well as apropagate
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 theEvent
, theviewing_angle
andviewing_distance
according to the ray_tracer, and theice_model
. The object created should be aSignal
object withtimes
andvalues
attributes representing the time-domain Askaryan signal produced by theParticle
.- 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.