program s2_skymask ! Uses use s2_types_mod use s2_sky_mod use s2_error_mod use healpix_types, only: HPX_SBADVAL ! Calls call parse_options call s2_error call s2_sky_free call s2_sky_get_map call s2_sky_io_fits_write call s2_sky_write_map_file ! Variables real (kind=s2_sp), parameter :: FITS_DISPLAY_GREY_MAGIC_NUMBER = HPX_SBADVAL real (kind=s2_sp), parameter :: ZERO_TOL = 1e-5 character (len=*), parameter :: MAP_FILE = 'map' character (len=*), parameter :: SKY_FILE = 'sky' integer :: file_type = S2_SKY_FILE_TYPE_MAP integer :: ext = 1 character (len=S2_STRING_LEN) :: filename_sky character (len=S2_STRING_LEN) :: filename_mask character (len=S2_STRING_LEN) :: filename_out character (len=S2_STRING_LEN) :: file_type_str = MAP_FILE type (s2_sky) :: sky type (s2_sky) :: mask type (s2_sky) :: prod real (kind=s2_sp), allocatable, dimension (:) :: mask_map real (kind=s2_sp), allocatable, dimension (:) :: prod_map logical :: display = .true. integer :: npix integer :: nside integer :: pix_scheme integer :: lmax integer :: mmax integer :: fail ! Subroutines and functions subroutine parse_options () end program s2_skymaskApply a mask (containing only ones and zeros) to a sky. The output map is the product of the mask and sky maps. If the display status is set then masked pixels of the output map are overwritten with a magic number that appears grey when plotted. Output maps producted with the display option set should only be used for display purposes, and not for any subsequent analysis.
Usage: s2_skymask
Author: J. D. McEwen (mcewen@mrao.cam.ac.uk)
Version: 0.1 - August 2005
real (kind=s2_sp), parameter :: FITS_DISPLAY_GREY_MAGIC_NUMBER = HPX_SBADVAL
real (kind=s2_sp), parameter :: ZERO_TOL = 1e-5
character (len=*), parameter :: MAP_FILE = 'map'
character (len=*), parameter :: SKY_FILE = 'sky'
integer :: file_type = S2_SKY_FILE_TYPE_MAP
integer :: ext = 1
character (len=S2_STRING_LEN) :: filename_sky
character (len=S2_STRING_LEN) :: filename_mask
character (len=S2_STRING_LEN) :: filename_out
character (len=S2_STRING_LEN) :: file_type_str = MAP_FILE
type (s2_sky) :: sky
type (s2_sky) :: mask
type (s2_sky) :: prod
real (kind=s2_sp), allocatable, dimension (:) :: mask_map
real (kind=s2_sp), allocatable, dimension (:) :: prod_map
logical :: display = .true.
integer :: npix
integer :: nside
integer :: pix_scheme
integer :: lmax
integer :: mmax
integer :: fail
subroutine parse_options () ! Calls: getArgument end subroutine parse_optionsParse the options passed when program called.
Author: J. D. McEwen (mcewen@mrao.cam.ac.uk)
Version: 0.1 - November 2004