  Non-Gaussianity in the cosmic microwave background and the large-scale
structure of galaxies provides an increasingly powerful probe of the universe.
I implement an algorithm to generate realisations of fields that possess an
arbitrary probability distribution function and an arbitrary power spectrum and
demonstrate the code with a number of examples, including the uniform
distribution, the Laplace distribution, the $\chi$ and $\chi^2$ distributions,
Rayleigh and Maxwell-Boltzmann distributions. The code is available at
http://sourceforge.net/projects/nongaussian.
