Random number generators

XSPEC uses the Luxury Pseudorandom Number generator proposed by Marsaglia and Zaman then implemented by James and Luescher in Fortran 77. It was translated to C++ for XSPEC. On start-up XSPEC generates an initial seed based on clock time. This can then be used to make pseudorandom numbers drawn from the following distributions. All these routines take a RealArray& argument which contains the random numbers on output. For PoissonRand the array should contain the Poisson means on input.

GaussRand Random numbers on G(0,1) (in Gauss.cxx)
PoissonRand Poisson random numbers based on the input means (in Poisson.cxx)
UniformRand Random numbers on U[0,1] (in UniformRand.cxx)
CauchyRand Random numbers on Cauchy(0,1) (in CauchyRand.cxx)




HEASARC Home | Observatories | Archive | Calibration | Software | Tools | Students/Teachers/Public

Last modified: Wednesday, 23-Mar-2022 17:16:50 EDT

HEASARC Home | Observatories | Archive | Calibration | Software | Tools | Students/Teachers/Public

Last modified: 23-Mar-2022