program s2_nonzero
! Uses
use s2_types_mod
use s2_sky_mod
! Calls
call parse_options
call s2_sky_free
call s2_sky_get_map
! Variables
character (len=S2_STRING_LEN) :: filename
type (s2_sky) :: sky
real (kind=s2_sp), allocatable, dimension (:) :: map
integer :: npix
integer :: i
integer :: num_nonzero_count = 0
real (kind=s2_sp) :: num_nonzero_sum
real (kind=s2_sp), parameter :: ZERO_TOL = 0.01
! Subroutines and functions
subroutine parse_options ()
end program s2_nonzero
Count the number of non-zero values in a map. Two techniques are used.
One assumes the map is binary and sums the values. The other counts the
number of values above a threshold. The results are printed to the screen.
Usage: cswt_mask_nonzero
Author: J. D. McEwen (mcewen@mrao.cam.ac.uk)
Version: 0.1 - December 2004
character (len=S2_STRING_LEN) :: filename
type (s2_sky) :: sky
real (kind=s2_sp), allocatable, dimension (:) :: map
integer :: npix
integer :: i
integer :: num_nonzero_count = 0
real (kind=s2_sp) :: num_nonzero_sum
real (kind=s2_sp), parameter :: ZERO_TOL = 0.01
subroutine parse_options ()
! Calls: getArgument
end subroutine parse_options
Parse the options passed when program called.
Author: J. D. McEwen (mcewen@mrao.cam.ac.uk)
Version: 0.1 - November 2004