write_fits_cut4

This routine writes a cut sky HEALPix map into a FITS file. The format used for the FITS file follows the one used for Boomerang98 and is adapted from COBE/DMR. This routine can be used to store polarized maps, where the information relative to the Stokes parameters I, Q and U are placed in extension 0, 1 and 2 respectively by successive invocation of the routine.

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


FORMAT

call write_fits_cut4( filename, np, pixel, signal, n_obs, serror[, header, coord, nside, order, units, extno, polarisation] )

Arguments appearing in italic are optional.


ARGUMENTS

name&dimensionality kind in/out description
       
filename(LEN=filenamelen) CHR IN FITS file into which the cut sky map will be written
np I4B IN number of pixels to be written in the file
pixel(0:np-1) I4B IN index of observed (or valid) pixels
signal(0:np-1) SP IN value of signal in each observed pixel
n_obs(0:np-1) I4B IN number of observation per pixel
serror(0:np-1) SP IN rms of signal in pixel, for white noise, this is $\propto 1/\sqrt{{\rm n\_obs}}$.
header(LEN=80)(1:) (OPTIONAL) CHR IN FITS extension header to be included in the FITS file
coord(LEN=1) CHR IN astrophysical coordinates ('C' or 'Q' Celestial/eQuatorial, 'G' for Galactic, 'E' for Ecliptic)
nside I4B IN HEALPix resolution parameter of data set
order I4B IN HEALPix ordering scheme, 1: RING, 2: NESTED
units(LEN=20) CHR IN maps units (applies only to Signal and Serror)
extno I4B IN (0 based) extension number in which to write data. default:0. If set to 0 (or not set) a new file is written from scratch. If set to a value larger than 1, the corresponding extension is added or updated, as long as all previous extensions already exist. All extensions of the same file should use the same Nside, Order and Coord
polarisaton I4B IN if set to a non zero value, specifies that file will contain the I, Q and U polarisation Stokes parameter in extensions 0, 1 and 2 respectively, and sets the FITS header keywords accordingly. If not set, the keywords found in header will prevail.
      Note: the information relative to Nside, Order and Coord has to be given, either thru these keyword or via the FITS Header.


MODULES & ROUTINES

This section lists the modules and routines used by write_fits_cut4.

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 write_fits_cut4

anafast
executable that reads a HEALPix map and analyses it.
synfast
executable that generate full sky HEALPix maps
getsize_fits
routine to know the size of a FITS file and its type (eg, full sky vs cut sky)
input_map
all purpose routine to input a map of any kind from a FITS file
output_map
subroutine to write a FITS file from a HEALPix map
read_fits_cut4
subroutine to read a HEALPix cut sky map from a FITS file
write_minimal_header
routine to write minimal FITS header

Version 3.83, 2024-11-13