NASA - Jet Propulsion Laboratory
    + View the NASA Portal
Search JPL
Jet Propulsion Laboratory Home Earth Solar System Stars & Galaxies Technology
Introduction Background Software Links


sky_ng_sim


This program can be used to create temperature HEALPix maps computed as realisations of random Non-Gaussian fields on a sphere (either even power of a Gaussian distribution, or Simple Harmonics Oscillator PDF, see Description section for details).
It is directly adapted from the NGSIMS code described in Rocha et al, MNRAS, 357, 1 (2005)
The operation count is dominated by a term scaling as ${\cal {O}}(N_{\rm pix}^{1/2} l_{\rm max}^2)$. The map angular power spectrum, resolution, Gaussian beam FWHM or arbitrary beam window and random seed for the simulation can be selected by the user.


Location in HEALPix directory tree: src/f90/ngsims_full_sky/sky_ng_sim.F90


FORMAT

% sky_ng_sim [parameter_file]


QUALIFIERS


infile =
Defines the input power spectrum file, (default= HEALPIX/test/cl.fits).
outfile =
Defines the output map file, (default= test.fits).
nsmax =
Defines the resolution of the map. (default= 32)
nlmax =
Defines the maximum l value to be used in the simulation. WARNING: lmax can not exceed the value $4\cdot$ nsmax, because the coefficients of the average Fourier pixel window functions are precomputed and provided up to this limit. (default= 2*nsmax)
fwhm_arcmin =
Defines the FWHM size in arcminutes of the simulated Gaussian beam. (default= 0.0)
beam_file =
Defines the FITS file describing the Legendre window function of the circular beam to be used for the simulation. If set to an existing file name, it will override the fhwm_arcmin given above. (default=`')
windowfile =
Defines the input filename for the pixel smoothing windows (default= pixel_window_n????.fits, see Notes on default files and directories on page [*])
winfiledir =
Defines the directory in which windowfile is located (default : see Notes on default files and directories on page [*]).
iseed =
Defines the seed of the pseudo-random sequence to be used for the generation of the non-gaussian white noise (default= 1)
plot =
If sky_ng_simwas linked with the PGPLOT library during compilation, and if plot is set to (case unsensitive) .true., t, yes, y or 1, then the histogram of the simulated non-gaussian is produced, overplotted with the theoretical PDF; the histogram of the final map pixel values, overplotted with a PDF of a gaussian of same mean and variance is subsequently produced. (default=.false.)
pdf_choice=1
Choice of non-Gaussian PDF to use: 1= Simple Harmonics oscillator (see Eq 2 below)
* sigma0= RMS of oscillator ground state
* na= Integer in {0, 20}. Number of $\alpha$ coefficients to be given (default=3). Note: analytical calculation of the PDF moments can only be done for na$\le 3$.
* alpha_1=, alpha_2=, ... Real values of $\alpha_i$ coefficients for i in $[1, {\tt na}]$
pdf_choice=2
Choice of non-Gaussian PDF to use: 2=Power of a Gaussian (see Eq 3 below)
* npower = Positive integer in {1,4} (default=1). The gaussian will be set to the power 2*npower.


DESCRIPTION


A random non-Gaussian white noise map is generated, using either
* a simple linear harmonic oscillator, where the PDF of the pixel temperature t is
\begin{displaymath}
\rho_{\rm SHO}(t) = \left\vert \psi_n\right\vert^2 = e^{-t^...
...C_i H_i \left(\frac{t}{\sqrt{2}\sigma_0}\right)\right\vert^2
\end{displaymath} (2)

where Hi are the Hermite polynomials, Ci their normalization constants, $\sigma_0^2$ the variance of the (Gaussian) ground state $\left\vert\psi_0\right\vert^2,$ $\alpha_i$ for $i\ge 1$ are free parameters, while $\alpha_0 =
\left(1 - \sum_i^n \vert\alpha_i\vert^2\right)^{1/2}$ is constrained;
* or, an even power of a gaussian PDF, where the temperature of pixel q is

tq = gq2 P (3)

where g is a zero mean, unit variance Gaussian variable, and P is a user-defined positive integer.
The resulting map is analyzed into its alm coefficients, which are then multiplied by the beam, pixel and spectrum window
\begin{displaymath}
a_{lm} \longrightarrow a_{lm} \left[C(l)\right]^{1/2} B(l) w_{\rm pix}(l) \nonumber
\end{displaymath}  

The resulting alm coefficients are turned back into a map, which is therefore non-gaussian, with an effective angular power spectrum $C(l) B(l)^2
w_{\rm pix}(l)^2$ (Rocha et al, 2005).
Notes: the code has been modified from the original NGSIMS package in two respects: the seed parameter is named iseed instead of idum, to be consistent with other HEALPix simulation codes; and the SHO generator has been dramatically sped up, without loss of accuracy.


DATASETS

The following datasets are involved in the sky_ng_sim processing.

Dataset Description
   
/data/pixel_window_nxxxx.fits Files containing pixel windows for various nsmax.
   
 


SUPPORT

This section lists those routines and facilities (including those external to the Healpix distribution) which can assist in the utilisation of sky_ng_sim.


map2gif
This HEALPix Fortran facility can be used to visualise the output map.
mollview
This HEALPix IDL facility can be used to visualise the output map.
anafast
This HEALPix Fortran facility can analyse a HEALPix map and save the alm and Cls to be read by sky_ng_sim.


EXAMPLE # 1:

sky_ng_sim  

sky_ng_sim runs in interactive mode, self-explanatory.


EXAMPLE # 2:

sky_ng_sim filename  

When 'filename' is present, sky_ng_sim enters the non-interactive mode and parses its inputs from the file 'filename'. This has the following structure: the first entry is a qualifier which announces to the parser which input immediately follows. If this input is omitted in the input file, the parser assumes the default value. If the equality sign is omitted, then the parser ignores the entry. In this way comments may also be included in the file. In this example, the file contains the following qualifiers:
nsmax = 128
nlmax = 256
fwhm_arcmin = 30.0
infile = cl.fits
pdf_choice = 1
iseed = 1
na = 3
sigma0 = 1.0
alpha_1 = 0.0
alpha_2 = 0.0
alpha_3 = 0.2
outfile = !test_ngfs.fits

sky_ng_sim reads in the Cl power spectrum in 'cl.fits' up to l256, and produces the map 'map.fits' which has $N_{\rm side}=128$. The non-gaussian white noise was generated assuming a SHO PDF (see Eq 2 above) with $\sigma_0=1$ and $\alpha_i = (0, 0, 0.2)$. The map is convolved with a beam of FWHM 30.0 arcminutes. The iseed=1 sets the random seed for the realisation. A different iseed would have given a different realisation from the same power spectrum.

Since
beam_file
windowfile
were omitted, they take their default values (empty strings). This means that no beam were read and sky_ng_sim attempts to find the pixel window files in the default directories (see page [*]).


RELEASE NOTES

* Initial release (HEALPix 2.10)


MESSAGES

This section describes error messages generated by sky_ng_sim

Message Severity Text
     
can not allocate memory for array xxx Fatal You do not have sufficient system resources to run this facility at the map resolution you required. Try a lower map resolution.
     

this is not a binary table

  the fitsfile you have specified is not of the proper format
     
there are undefined values in the table!   the fitsfile you have specified is not of the proper format
     
the header in xxx is too long   the fitsfile you have specified is not of the proper format
     
XXX-keyword not found   the fitsfile you have specified is not of the proper format
     
found xxx in the file, expected:yyyy   the specified fitsfile does not contain the proper amount of data.
     

   

Eric Hivon 2010-06-18
Privacy / Copyright
FIRST GOV Contact: NASA Home Page Site Manager:
Webmaster:

CL 03-2650