PyREx

pyrex.generation.Generator.get_direction

Generator.get_direction()

Get the direction of the next particle to be generated.

Randomly generates a cartesian unit vector uniformly distributed over the unit sphere.

Returns
ndarray

(Unit) vector direction.

Notes

Generates random vector direction by pulling from uniform distributions for -1<cos(theta)<1 and 0<phi<2*pi.

PyREx

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

Navigation