PyREx

Version History

Version 1.10.0

New Features

  • Added a cut in the EventKernel to skip the simulation of events with observation angles larger than a given value away from the Cherenkov angle.

  • Added a cut in the EventKernel to skip the simulation of events with weight(s) below a given value.

  • Added an option to interpolate attenuation calculations to speed up ray tracing steps.

  • Added a toggle in event generators to opt in/out of using the secondary interaction approximations.

  • Added the ability to toggle generators between the expected neutrino ratios from astrophysical or cosmogenic origins.

  • Added volume and solid_angle properties to generator objects.

  • Earth model moved into earth, an instance of the new PREM class.

  • Added the CoreMantleCrustModel class to replicate the Earth model used in AraSim.

  • Added pyrex.custom.ara.stations which implements the layouts of the deployed ARA stations in Detector subclasses.

  • New HDF5 file version 1.1 which changes how string data is handled due to changes in the h5py package.

  • Added the File.get_data() method to read arbitrary datasets from files.

Changes

  • Minimum versions of dependencies increased (numpy>=1.17, scipy>=1.4, h5py>=3.0).

  • Added support for Askaryan signals observed directly at the Cherenkov angle.

  • Implemented alternative form factor for hadronic interactions in Askaryan model.

  • Askaryan models now inherit from FunctionSignal, improving the accuracy of their values after the application of multiple filters.

  • Added optional buffers to the start and end of FunctionSignal times.

  • Changed the default times array of the EventKernel to be symmetric about zero.

  • Implemented extrapolation of attenuation data in ArasimIce to match the implementation in AraSim.

  • All physical constants now pulled from scipy.constants rather than hard-coded.

  • Removed the previously deprecated classes: IceModel, ShadowGenerator, and NumpyFileGenerator.

  • Renamed ARVZAskaryanSignal to ARZAskaryanSignal to properly match the paper authors.

Bug Fixes

  • Fixed the relative timing of Askaryan pulses inside vs outside of the Cherenkov cone.

  • Fixed a numerical error in the attenuation calculation in deep ice with slowly changing index of refraction.

  • Fixed an error in the indirect ray launch angle minimization in deep ice.

  • Improved the slant depth calculation in the Earth models to use the proper endpoint in the ice rather than (0, 0).

  • Fixed the calculation of the ThermalNoise rms value based on a proper antenna system connected to ground.

Performance Improvements

  • FunctionSignal values are now lazily evaluated, including delayed application of filters.

  • Improved performance of Askaryan signal calculation by shifting the relevant portion of the convolution rather than calculating and truncating a larger convolution.

  • Default ThermalNoise class now uses a faster FFT-based calculation. The old behavior was moved to the FullThermalNoise class.

  • HDF5 file reader improved to read data in chunks rather than line-by-line.

Version 1.9.0

New Features

  • Added a GreenlandIce ice model based on measurements at Summit Station.

  • Added the AVZAskaryanSignal Askaryan model from J. Alvarez-Muniz et al (2000) for comparison across simulation packages.

  • Added UniformIce ice model with a constant index of refraction, along with the corresponding ray tracing with UniformRayTracer and UniformRayTracePath.

  • Added pyrex.custom.layered_ice for ice models with indices of refraction defined in stratified layers in the z-direction and the corresponding ray tracing.

  • Added complex_interp() and complex_bilinear_interp() functions for interpolating arrays of complex values using Cartesian or Euler methods.

Changes

  • IceModel has been deprecated in favor of the ice object, an object of the preferred ice model class (currently AntarcticIce).

  • Removed the NewcombIce ice model.

  • Handling of s-polarized and p-polarized signals by the RayTracer have now been split. This resulted in different behavior for the RayTracePath.propagate() and Antenna.receive() methods, as well as a new method Antenna.apply_response().

  • Renamed Antenna.response() method to Antenna.frequency_response().

  • ARA antennas have been updated to use the latest XFDTD simulations from the Chiba group.

  • The behavior of the CylindricalShadowGenerator and RectangularShadowGenerator classes have been moved into the CylindricalGenerator and RectangularGenerator classes, respectively, when the shadow argument is set to True.

Bug Fixes

  • The handling of phase shifts between s-polarized and p-polarized signals during total internal reflection is now properly implemented.

  • Fixed a bug in the antenna response of ARA antennas which resulted in an extra factor of sin(theta) for VpolAntenna objects and had an unexplored effect on HpolAntenna objects.

  • Fixed an off-by-one error in the final event count given by ListGenerator objects.

  • Fixed a bug in the Earth shadowing effect produced by CylindricalGenerator and RectangularGenerator classes.

Version 1.8.2

New Features

  • Added CylindricalGenerator, RectangularGenerator, CylindricalShadowGenerator, and RectangularShadowGenerator classes to provide options for generation volumes and how to account for shadowing by the Earth. RectangularShadowGenerator has the same behavior as the existing ShadowGenerator, so ShadowGenerator is being deprecated.

  • Added ability to add Detector (and Antenna or AntennaSystem) objects into a CombinedDetector for ease of use.

  • Added ability to multiply (and divide) Signal objects by numeric types.

  • Added support for total events thrown in simulation, accessed by the File.total_events_thrown attribute of file readers.

Changes

  • Separated Particle.weight into Particle.survival_weight and Particle.interaction_weight. Now Particle.weight serves as a convenience attribute which gives the product of the two weights.

  • Changed FileGenerator to read from simulation output files rather than numpy files. For the time being numpy files can be read with NumpyFileGenerator.

  • All generator classes now have a count attribute for keeping track of the total number of events thrown.

Bug Fixes

  • Fixed error in ARAAntenna signal amplitudes introduced in version 1.8.1.

  • Fixed minor bugs in File interfaces.

Performance Improvements

  • Changed AskaryanSignal charge profile and RAC calculations to accept numpy arrays. Should result in marginal improvements in signal calculation speed.

Version 1.8.1

New Features

  • Added ability to write (and subsequently read) simulation data files using File objects.

  • File I/O supports HDF5 files, but should be considered to be in a public-beta state until the release of version 1.9.0.

  • EventKernel now accepts event_writer and triggers arguments for writing simulation data to output files.

Changes

  • ThermalNoise now uses Rayleigh-distributed amplitudes in frequency space by default.

  • Handling of signal polarizations has been more closely integrated with the ray tracer; RayTracer.propagate() now propagating the polarization vector as well as the signal.

  • 3 dB splitter effect moved from ARAAntenna.response() to ARAAntennaSystem.front_end() for a more logical separation of antenna and front-end.

  • Adjusted default noise rms of ARIANNAAntennaSystem to the expected value in ARIANNA.

Bug Fixes

  • Corrected signal polarization calculation.

  • Fixed calculation of fresnel factors in surface reflection.

  • Fixed bug in antenna gains of asymmetric antennas for theta angles near 180 degrees.

  • Corrected effective height of antennas modeled by WIPL-D (i.e. LPDA).

Version 1.8.0

New Features

  • Added model of the ARIANNA LPDA based primarily on the implementation in NuRadioReco.

  • Added Antenna.is_hit_mc and AntennaSystem.is_hit_mc which test noise-only triggers to determine whether a triggered antenna as truly triggered by signal or not.

  • Added require_mc_truth argument to Detector.triggered() to toggle whether a true Monte Carlo signal trigger (described above with Antenna.is_hit_mc) is required for a detector trigger.

  • Added AntennaSystem.lead_in_time which allows front-end systems time to equilibrate before waveforms are recorded.

Changes

  • Antenna.waveforms and Antenna.all_waveforms now include all relevant signals in the waveform during that time, similar to Antenna.full_waveform().

  • ARAAntenna.interpolate_filter() moved to ARAAntennaSystem.interpolate_filter(), since this better matches the logical location of the front-end electronics.

Bug Fixes

  • Fixed error in calculation of ARA Hpol polarization gain.

  • Corrected amplification of ARAAntennaSystem (previously was silently ignored).

  • Corrected tunnel diode and other triggers to use standard deviation from mean rather than rms.

  • Fixed accidental duplication of antennas when Detector.build_antennas() is called more than once.

  • Fixed numerical issue when checking that antenna axes are perpendicular.

Version 1.7.0

New Features

  • Moved pyrex.custom.ara module into main PyREx package instead of being a plug-in.

  • All docstrings now follow numpy docstring style.

  • Added particle types and interaction information to Particle class.

  • Added Interaction classes GQRSInteraction and CTWInteraction for defining different neutrino interaction models. Preferred model (CTWInteraction) aliased to NeutrinoInteraction.

  • Added ShadowGenerator.get_vertex(), ShadowGenerator.get_direction(), ShadowGenerator.get_particle_type(), ShadowGenerator.get_exit_points(), and ShadowGenerator.get_weight() methods for generating neutrinos more modularly.

  • Added Event class for holding a tree of Particle objects. Event objects are now returned by generators and the EventKernel.

  • Added ZHSAskaryanSignal class for the Zas, Halzen, Stanev parameterization of Askaryan pulses. Mostly for comparison purposes.

Changes

  • ShadowGenerator.create_particle() changed to ShadowGenerator.create_event() and now returns an Event object.

  • Generator classes moved to pyrex.generation module.

  • Signal.ValueTypes changed to Signal.Type to match Particle.Type and Interaction.Type.

  • FastAskaryanSignal changed to ARVZAskaryanSignal. This class is still the preferred parameterization aliased to AskaryanSignal.

  • Arguments of AskaryanSignal changed to take a Particle object rather than taking its parameters individually.

  • Removed unused SlowAskaryanSignal.

  • Now that AskaryanSignal can handle different particle and shower types, secondary particle generation was added to determine shower fractions: NeutrinoInteraction.em_frac and NeutrinoInteraction.had_frac.

  • Changed IREX envelope antennas to be an envelope front-end on top of an ARA antenna. Results in IREXAntennaSystem becoming EnvelopeHpol and EnvelopeVpol.

Version 1.6.0

New Features

  • EventKernel can now take arguments to specify the ray tracer to be used and the times array to be used in signal generation.

  • Added shell scripts to more easily work with git branching model.

Changes

  • ShadowGenerator energy_generator argument changed to energy and can now take a function or a scalar value, in which case all particles will have that scalar value for their energy.

  • EventKernel now uses pyrex.IceModel as its ice model by default.

  • Antenna.receive() method (and receive() method of all inheriting antennas) now uses direction argument instead of origin argument to calculate directional gain.

  • Antenna.clear() and Detector.clear() functions can now optionally reset the noise calculation by using the reset_noise argument.

  • Antenna classes can now set the unique_noise_waveforms argument to specify the expected number of unique noise waveforms needed.

  • ArasimIce.attenuation_length() changed to more closely match AraSim.

  • IceModel reverted to AntarcticIce with new index of refraction coefficients matching those of ArasimIce.

  • prem_density() can now be calculated for an array of radii.

Performance Improvements

  • Improved performance of slant_depth() calculation.

  • Improved performance of IceModel.attenuation_length() calculation.

  • Using the Antenna unique_noise_waveforms argument can improve noise waveform calculation speed (previously assumed 100 unique waveforms were necessary).

Bug Fixes

  • Fixed received direction bug in EventKernel, which had still been assuming a straight-ray path.

  • Lists in function keyword arguments were changed to tuples to prevent unexpected mutability issues.

  • Fixed potential errors in BasicRayTracer and BasicRayTracePath.

Version 1.5.0

Changes

  • Changed structure of Detector class so a detector can be built up from strings to stations to the full detector.

  • Detector.antennas attribute changed to Detector.subsets, which contains the pieces which make up the detector (e.g. antennas on a string, strings in a station).

  • Iterating the Detector class directly retains its effect of iterating each antenna in the detector directly.

New Features

Bug Fixes

  • Preserve value_type of Signal objects passed to IREXAntennaSystem.front_end().

Version 1.4.2

Performance Improvements

  • Improved performance of FastAskaryanSignal by reducing the size of the convolution.

Changes

  • Adjusted time step of signals generated by kernel slightly (2000 steps instead of 2048).

Version 1.4.1

Changes

  • Improved ray tracing and defaulted to the almost completely analytical SpecializedRayTracer and SpecializedRayTracePath classes as RayTracer and RayTracePath.

  • Added ray tracer into EventKernel to replace PathFinder completely.

Version 1.4.0

New Features

Version 1.3.1

New Features

  • Added diode bridge rectifier envelope circuit analytic model to irex.frontends and made it the default analytic envelope model in IREXAntennaSystem.

  • Added allow_reflection attribute to EventKernel class to determine whether ReflectedPathFinder solutions should be allowed.

Changes

  • Changed neutrino interaction model to include all neutrino and anti-neutrino interactions rather than only charged-current neutrino (relevant for ShadowGenerator class).

Version 1.3.0

New Features

  • Added and implemented ReflectedPathFinder class for rays which undergo total internal reflection and subsequently reach an antenna.

Changes

  • Change AskaryanSignal angle to always be positive and remove < 90 degree restriction (Alvarez-Muniz, Romero-Wolf, & Zas paper suggests the algorithm should work for all angles).

Performance Improvements

  • Improve performance of ice index calculated at many depths.

Version 1.2.1

New Features

Bug Fixes

  • Fixed bug where Antenna._convert_to_antenna_coordinates() function was returning coordinates relative to (0,0,0) rather than the antenna’s position.

Version 1.2.0

Changes

  • Changed custom module to a package containing irex module.

  • custom package leverages “Implicit Namespace Package” structure to allow plug-in style additions to the package in either the user’s ~/.pyrex-custom/ directory or the ./pyrex-custom directory.

Version 1.1.2

New Features

  • Added Signal.with_times() method for interpolation/extrapolation of signals to different times.

  • Added Antenna.full_waveform() and Antenna.is_hit_during() methods for calculation of waveform over arbitrary time array and whether said waveform triggers the antenna, respectively.

  • Added IREXAntenna.front_end_processing() method for processing envelope, amplifying signal, and downsampling result (downsampling currently inactive).

Changes

  • Change Antenna.make_noise() to use a single master noise object and use ThermalNoise.with_times() to calculate noise at different times.

    • To ensure noise is not obviously periodic (for <100 signals), uses 100 times the recommended number of frequencies, which results in longer computation time for noise waveforms.

Version 1.1.1

Changes

  • Moved ValueTypes inside Signal class. Now access as Signal.ValueTypes.voltage, etc.

  • Changed signal envelope calculation in custom IREXAntenna from hilbert transform to a basic model. Spice model also available, but slower.

Version 1.1.0

New Features

  • Added Antenna.directional_gain() and Antenna.polarization_gain() methods to base Antenna.

    • Antenna.receive() method should no longer be overwritten in most cases.

    • Antenna now has orientation defined by z_axis and x_axis.

    • antenna_factor and efficiency attributes added to Antenna for more flexibility.

  • Added value_type attribute to Signal class and derived classes.

    • Current value types are ValueTypes.undefined, ValueTypes.voltage, ValueTypes.field, and ValueTypes.power.

    • Signal objects now must have the same value_type to be added (though those with ValueTypes.undefined can be coerced).

Changes

  • Made units consistent across PyREx.

  • Added ability to define Antenna noise by RMS voltage rather than temperature and resistance if desired.

  • Allow DipoleAntenna to guess at effective_height if not specified.

Performance Improvements

  • Increase speed of IceModel.__atten_coeffs() method, resulting in increased speed of attenuation length calculations.

Version 1.0.3

New Features

  • Added custom module to contain classes and functions specific to the IREX project.

Version 1.0.2

New Features

Changes

  • Allow passing of numpy arrays of depths and frequencies into most IceModel methods.

    • IceModel.gradient() must still be calculated at individual depths.

  • Added ability to specify RMS voltage of ThermalNoise without providing temperature and resistance.

  • Removed (deprecated) Antenna.isHit().

Performance Improvements

  • Allowing for IceModel to calculate many attenuation lengths at once improves speed of PathFinder.propagate().

  • Improved speed of PathFinder.time_of_flight() and PathFinder.attenuation() (and improved accuracy to boot).

Version 1.0.1

Changes

  • Changed Antenna to not require a temperature and frequency range if no noise is produced.

Bug Fixes

  • Fixed bugs in AskaryanSignal that caused the convolution to fail.

  • Fixed bugs resulting from converting IceModel.temperature() from Celsius to Kelvin.

Version 1.0.0

  • Created PyREx package based on original notebook.

  • Added all signal classes to produce full-waveform Askaryan pulses and thermal noise.

  • Changed Antenna class to DipoleAntenna to allow Antenna to be a base class.

  • Changed Antenna.isHit() method to Antenna.is_hit property.

  • Introduced IceModel alias for AntarcticIce (or any future preferred ice model).

  • Moved AntarcticIce.attenuationLengthMN() to its own NewcombIce class inheriting from AntarcticIce.

  • Added PathFinder.propagate() to propagate a Signal object in a customizable way.

  • Changed naming conventions to be more consistent, verbose, and “pythonic”:

    • AntarcticIce.attenuationLength() becomes AntarcticIce.attenuation_length().

    • In pyrex.earth_model, RE becomes EARTH_RADIUS.

    • In pyrex.particle, neutrino_interaction becomes NeutrinoInteraction.

    • In pyrex.particle, NA becomes AVOGADRO_NUMBER.

    • particle class becomes Particle namedtuple.

    • Particle.vtx becomes Particle.vertex.

    • Particle.dir becomes Particle.direction.

    • Particle.E becomes Particle.energy.

    • In pyrex.particle, next_direction() becomes random_direction().

    • shadow_generator becomes ShadowGenerator.

    • PathFinder.exists() method becomes PathFinder.exists property.

    • PathFinder.getEmittedRay() method becomes PathFinder.emitted_ray property.

    • PathFinder.getPathLength() method becomes PathFinder.path_length property.

    • PathFinder.propagateRay() split into PathFinder.time_of_flight() (with corresponding PathFinder.tof property) and PathFinder.attenuation().

Version 0.0.0

Original PyREx python notebook written by Kael Hanson:

https://gist.github.com/physkael/898a64e6fbf5f0917584c6d31edf7940