alms2fits*

This routine stores $a_{\ell m}$ values in a binary FITS file. Each FITS file extension created will contain one integer column with $index=\ell^2+\ell+m+1$, and 2 or 4 single (or double) precision columns with real/imaginary $a_{\ell m}$ values and real/imaginary standard deviation. One can store temperature $a_{\ell m}$ or temperature and polarisation, $a^T_{\ell m}$, $a^E_{\ell m}$ and $a^B_{\ell m}$. If temperature is specified, a FITS file with one extension is created. If polarisation is specified, a FITS file with 3 extensions one for each set of $a_{\ell m}$, $a_{\ell m}^T$, $a_{\ell m}^E$ and $a_{\ell m}^B$ is created.

Location in HEALPix directory tree: src/f90/mod/fitstools.F90 


FORMAT

call alms2fits*( filename, nalms, alms, ncl, header, nlheader, next )


ARGUMENTS

name & dimensionality kind in/out description
       
filename(LEN=filenamelen) CHR IN filename for the FITS file to store the $a_{\ell m}$ in.
nalms I4B IN number of $a_{\ell m}$ to store.
ncl I4B IN number of columns in the FITS file. If an standard deviation is given, this number is 5, otherwise it is 3.
next I4B IN the number of extensions. 1 for temperature only, 3 for temperature and polarisation.
name & dimensionality kind in/out description
       
alms(1:nalms,1:ncl+1,1:next) SP/ DP IN the $a_{\ell m}$ to write to the file. alms(i,1,j) and alms(i,2,j) contain the $\ell$ and $m$ values for the ith $a_{\ell m}$ (j=1,2,3 for (T,E,B)). alms(i,3,j) and alms(i,4,j) contain the real and imaginary value of the ith $a_{\ell m}$. Finally, the standard deviation for the ith $a_{\ell m}$ is contained in alms(i,5,j) (real) and alms(i,6,j) (imaginary).
nlheader I4B IN number of header lines to write to the file.
header(LEN=80) (1:nlheader, 1:next) CHR IN the header to the FITS file.


EXAMPLE:

call alms2fits ('alms.fits', 65*66/2, alms, 3, header, 80, 3)
Creates a FITS file with the $a_{\ell m}^T$, $a_{\ell m}^E$ and $a_{\ell m}^B$ values given in alms(1:65*66/2,1:4,1:3). The last index specifies (T,E,B). The second index gives l, m, real( $a_{\ell m}$ ), imaginary( $a_{\ell m}$ ) for each of the $a_{\ell m}$. The number 65*66/2 is the number of $a_{\ell m}$ values up to an $\ell$ value of 64. 80 lines from header(1:80,1:3) is written to each extension.


MODULES & ROUTINES

This section lists the modules and routines used by alms2fits*.

write_alms
routine called by alms2fits* for each extension.
fitstools
module, containing:
printerror
routine for printing FITS error messages.
cfitsio
library for FITS file handling.

RELATED ROUTINES

This section lists the routines related to alms2fits*

fits2alms, read_conbintab
routines to read $a_{\ell m}$ from a FITS file
dump_alms
has the same function as alms2fits* but with parameters passed differently.

Version 3.82, 2022-07-28