%N gaus %F $MIR/src/subs/noise.for
%D Generate gaussianly distributed random variables.
%P rjs
%: random-variables, noise
%B
        subroutine gaus(data,n)

        implicit none
        integer n
        real data(n)

  Generate gaussian noise. This works on any machine, but the Gaussian
  noise it produces is system dependent and not extremely accurate.

  Gaussian noise is produced by adding 12 variates uniformly distributed
  in [0,1], then subtracting 6. This will have zero
  mean, and a variance of 1, and by the Central Limit Theorem, will
  approximate gaussian noise.

  Inputs:
    n          Number of gaussian numbers to produce.

  Output:
    data       An array of gaussian noise.
