synfast


This program can be used to create HEALPix maps (temperature only or temperature and polarisation) computed as realisations of random Gaussian fields on a sphere characterized by the user provided theoretical power spectra, or as constrained realisations of such fields characterised by the user provided alm coefficients and/or power spectra. Total operation count scales as $ \cal {O}$(Npix3/2) with a prefactor dependent on the limiting spherical harmonics order lmax of the actual problem. The map resolution, Gaussian beam FWHM, and random seed for the simulation can be selected by the user. Spherical harmonics are either generated using the recurrence relations during the execution of spectral synthesis, or precomputed and read in before the synthesis is executed to shorten the computation in repetitive applications.


Location in HEALPix directory tree: src/f90/synfast/synfast.f90


FORMAT

% synfast


QUALIFIERS


infile =
Defines the input power spectrum file. (default= cl.fits). Note that infile is now optional : synfast can run even if only almsfile is provided.
outfile =
Defines the output map file. (default= map.fits)
simul_type =
Defines the simulation type, 1=temperature only, 2=polarisation. (default= 1)
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 . nsmax, because the coefficients of the average Fourier pixel window functions are precomputed and provided up to this limit. (default= 64)
iseed =
Defines the random seed to be used for the generation of alms from the power spectrum. (default= -1)
fwhm_arcmin =
Defines the FWHM size in arcminutes of the simulated Gaussian beam. (default= 420.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=`` ")
almsfile =
Defines the input filename for a file containing alms for constrained realisations. (default= `` ")
plmfile =
Defines the input filename for a file containing precomputed Legendre polynomials Plm. (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 [*]).


DESCRIPTION


Synfast reads the power spectrum from a file in ascii-FITS format. This can contain either just the temperature power spectrum CTls or temperature and polarisation power spectra: CTl, CEl, CBl and CT×El. If simul_type = 1 synfast generates Q and U maps as well as the temperature map. The output map(s) is (are) saved in a FITS-file. The Cls are used up to the specified llmax, which can not exceed nsmax.

The random seed for generation of alm from the power spectrum should be a negative integer. The map can be convolved with a gaussian beam for which a beamsize can be specified, or for an arbitrary circular beam for which the Legendre transform is provided. The map is automatically convolved with a pixel window function. These are stored in FITS files in the healpix/data directory. If synfast is not run in a directory which has these files, or from a directory which can reach these files by a `../data/' or `./data/' specification, the system variable HEALPIX is used to locate the main HEALPix directory and its data subdirectory is scanned. Failing this, the location of these files must be specified (using winfiledir). In the interactive mode this is requested only when necessary (see Notes on default directories in section [*]).

If some of the alm in the simulations are constrained eg. from observations, a FITS-file with these alm can be read. This FITS file contains the alm for certain l and m values and also the standard deviation for these alm. The sky realisation which synfast produces will be statistically consistent with the constraining alm.

Spherical harmonics values in the synthesis are obtained from a recurrence on associated Legendre polynomials Plm($ \theta$). This recurrence consumes most of the CPU time used by synfast. We have therefore included the option to read in the precomputed values of Plm($ \theta$) from a file generated by the HEALPix facility plmgen. This represents a tradeoff between memory usage and computing time.

Synfast will issue a warning if the input FITS file for the power spectrum does not contain the keyword POLNORM. This keyword indicates that the convention used for polarization is consistent with CMBFAST (and consistent with HEALPix 1.2). See the HEALPix Primer for details on the polarization convention and the interface with CMBFAST. If the keyword is not found, no attempt will be made to renormalize the power spectrum. If the keyword is present, it will be inherited by the simulated map.


DATASETS

The following datasets are involved in the synfast 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 synfast.


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 facility can analyse a HEALPix map and save the alm and Cls to be read by synfast.
plmgen
This HEALPix facility can be used to generate precomputed Legendre polynomials.


EXAMPLE # 1:

synfast  

Synfast runs in interactive mode, self-explanatory.


EXAMPLE # 2:

synfast filename  

When 'filename' is present, synfast 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:
simul_type = 1
nsmax = 32
nlmax = 64
iseed = -1
fwhm_arcmin = 420.0
infile = cl.fits
outfile = map.fits

Synfast reads in the Cl power spectrum in cl.fits up to l = 64, and produces the map map.fits which has Nside = 32. The map is convolved with a beam of FWHM 420.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
almsfile
plmfile
beam_file
windowfile
were omitted, they take their default values (empty strings). This means that no file for constrained realisation or precomputed Legendre polynomials are read and synfast attempts to find the pixel window files in the default directories (see section [*]).


RELEASE NOTES

*
Initial release (HEALPix 0.90)
*
Optional non-interactive operation. Proper FITS file support. Improved reccurence algorithm for Plm($ \theta$) which can compute to higher l values. Improved pixel windows averaged over actual HEALPix pixels. New functionality: constrained realisations, precomputed Plm. (HEALPix 1.00)
*
New functionality: constrained realisations and pixel windows are now available for polarization as well. Arbitrary circular beams can be used. New parser (HEALPix 1.20)


MESSAGES

This section describes error messages generated by synfast

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 2003-02-07