read_fits_partial

This routine reads unpolarised or polarised partial sky HEALPix map from a FITS file.
For more information on the FITS file format supported in HEALPix, including the one implemented in read_fits_partial, see https://healpix.sourceforge.io/data/examples/healpix_fits_specs.pdf.

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


FORMAT

call read_fits_partial( filename, pixel, cutmap, [header, extno] )

Arguments appearing in italic are optional.


ARGUMENTS

name & dimensionality kind in/out description
       
filename(LEN=filenamelen) CHR IN FITS file to be read from, containing a partial sky map
pixel(0:np-1) I4B/ I8B OUT index of observed (or valid) pixels
cutmap(0:np-1,1:nc) SP/ DP OUT value of unpolarised or polarised map for each observed pixel
header(LEN=80)(1:) CHR OUT FITS extension header
extno I4B IN extension number (0 based) for which map is read. Default = 0 (first extension).


EXAMPLE:

use healpix_modules
character(len=FILENAMELEN) :: file
integer(i4b) :: nmaps, polarisation, npix, nside
integer(i4b), allocatable, dimension(:) :: pixel
real(SP), allocatable, dimension(:,:) :: data
character(len=80), dimension(1:100) :: header=“”

file=“https://healpix.sourceforge.io/data/examples/partial_TQU.fits
npix = getsize_fits(file, nmaps=nmaps, polarisation=polarisation)
print*, npix, nmaps, polarisation
allocate(pixel(0:npix-1))
allocate(data(0:npix-1,1:3))
call read_fits_partial(file, pixel, data, header=header)
print*,pixel(0), data(0,1:3)
reads a remote partial sky FITS file and prints the index and IQU values of the first pixel its contains.

MODULES & ROUTINES

This section lists the modules and routines used by read_fits_partial.

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 read_fits_partial

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 full sky HEALPix map
write_fits_partial
subroutine to write a partial map into a FITS file which can be read by read_fits_partial and/or input_map.

Version 3.82, 2022-07-28