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


This program can be used to create a file containing the precomputed values of the associated Legendre polynomials $P_{lm}(\theta)$ (and, if requested, of the tensor spherical harmonics) for faster execution of the HEALPix map analysis/synthesis. The map resolution parameter, nsmax, and the maximum value of the spherical harmonic order lmax must be specified.

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


% plmgen


nsmax =
Defines the resolution parameter for the map to be analysed/synthesized with the precomputed harmonics. (default= 32)
nlmax =
Defines the lmax value for the execution. (default= 64)
simul_type =
Defines whether only scalar, or scalar and tensor harmonics are to be precomputed, 1=scalar only, 2=scalar AND tensor. (default=1)
outfile =
Defines the name for the file that will contain the precomputed harmonics. (default='plm.fits')


The recursion of Legendre polynomials and tensor harmonics during the analysis and synthesis of HEALPix maps can be time consuming. Especially when repetitive applications are desired there is no need to compute the recursions every time. For such applications the values of $P_{lm}(\theta)$ can be precomputed with plmgen and stored in a file. When using synfast or anafast this file can be read in to shorten the analysis/synthesis execution time.

The memory (and disc) consumption of plmgen is $8 N_\lambda N_p$ bytes, with $N_\lambda = {\tt nsmax} ({\tt nlmax}+1)({\tt nlmax}+2)$ and Np is either 1 or 3, depending whether tensor harmonics are computed.

Currently an extra limitation $N_\lambda < 2^{31} = 2147483648$ also applies, corresponding to, eg, lmax $\le 1446$ for nsmax =1024.


The following datasets are involved in the plmgen processing.

Dataset Description
None required  


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

This HEALPix facility can generate a map using precomputed harmonics made from plmgen.
This HEALPix facility can analyse a map using precomputed harmonics.
Fortran subroutine used to generate the harmonics



plmgen runs in interactive mode, self-explanatory.


plmgen filename  

When `filename' is present, plmgen 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 = 86
outfile = plm.fits


* Initial release HEALPix 1.00


This section describes error messages generated by plmgen

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.
Error: these values of Nside and l_max $\ldots$ are too large $\ldots$ Fatal You are exceeding the limitation on Nside and l_max. Try a lower l_max.

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

CL 03-2650