PyREx

pyrex.generation.FileGenerator

class pyrex.generation.FileGenerator(files, slice_range=100, interaction_model=<class 'pyrex.particle.CTWInteraction'>)

Class to generate neutrino events from simulation file(s).

Generates neutrinos by pulling their attributes from a (list of) simulation output file(s). Designed to make reproducing simulations easier.

Parameters
filesstr or list of str

List of file names containing neutrino event information. If only a single file name is provided, creates a list with that file alone.

slice_rangeint, optional

Number of events to load into memory at a time from the files. Increasing this value should result in an improvement in speed, while decreasing this value should result in an improvement in memory consumption.

interaction_modeloptional

Class used to describe the interactions of the stored particles.

Warning

This generator only supports Event objects containing a single level of Particle objects. Any dependencies among Particle objects will be ignored and they will all appear in the root level.

See also

pyrex.particle.Interaction

Base class for describing neutrino interaction attributes.

pyrex.Event

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

pyrex.Particle

Class for storing particle attributes.

Attributes
countint

Number of neutrinos produced by the generator.

fileslist of str

List of file names containing neutrino information.

Methods

create_event()

Generate a neutrino.

PyREx

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

Navigation