program s2_grf2 ! Uses use s2_types_mod use s2_error_mod use s2_sky_mod use s2_distn_mod use s2_pl_mod ! Calls call parse_options call s2_error call s2_pl_free call s2_pl_get_spec call s2_sky_compute_map call s2_sky_free call s2_sky_io_fits_write call s2_sky_write_map_file call system_clock ! Variables character (len=*), parameter :: MAP_FILE = 'map' character (len=*), parameter :: SKY_FILE = 'sky' character (len=S2_STRING_LEN) :: file_type_str = MAP_FILE character (len=S2_STRING_LEN) :: filename_out_a = 'a.tmp' character (len=S2_STRING_LEN) :: filename_out_b = 'b.tmp' character (len=S2_STRING_LEN) :: filename_al character (len=S2_STRING_LEN) :: filename_bl character (len=S2_STRING_LEN) :: filename_xl logical :: scale_al = .false. logical :: scale_bl = .false. logical :: scale_xl = .false. integer :: ncomment_al = 0 integer :: ncomment_bl = 0 integer :: ncomment_xl = 0 logical :: line_nos integer :: seed = 0 logical :: seed_set = .false. real (kind=s2_sp) :: MEAN_ZERO = 0e0 real (kind=s2_sp) :: STD_UNIT = 1e0 integer :: l integer :: m integer :: fail integer :: nside integer :: lmin integer :: lmax logical :: nside_set = .false. real (kind=s2_dp) :: a real (kind=s2_dp) :: b real (kind=s2_dp) :: c real (kind=s2_dp) :: xr real (kind=s2_dp) :: yr real (kind=s2_dp) :: xi real (kind=s2_dp) :: yi type (s2_pl) :: a_cl type (s2_pl) :: b_cl type (s2_pl) :: x_cl real (kind=s2_dp), allocatable, dimension (:) :: al real (kind=s2_dp), allocatable, dimension (:) :: bl real (kind=s2_dp), allocatable, dimension (:) :: xl real (kind=s2_sp), allocatable, dimension (:) :: al_sp real (kind=s2_sp), allocatable, dimension (:) :: bl_sp real (kind=s2_sp), allocatable, dimension (:) :: xl_sp complex (kind=s2_spc), allocatable, dimension (:,:) :: alm complex (kind=s2_spc), allocatable, dimension (:,:) :: blm type (s2_sky) :: a_sky type (s2_sky) :: b_sky ! Subroutines and functions subroutine parse_options () end program s2_grf2Simulate two Gaussian random fields (GRFs) on the sky that satisfy individual and cross power spectra.
Notes:
Author: J. D. McEwen (mcewen@mrao.cam.ac.uk)
Version: 0.1 - August 2005
character (len=*), parameter :: MAP_FILE = 'map'
character (len=*), parameter :: SKY_FILE = 'sky'
character (len=S2_STRING_LEN) :: file_type_str = MAP_FILE
character (len=S2_STRING_LEN) :: filename_out_a = 'a.tmp'
character (len=S2_STRING_LEN) :: filename_out_b = 'b.tmp'
character (len=S2_STRING_LEN) :: filename_al
character (len=S2_STRING_LEN) :: filename_bl
character (len=S2_STRING_LEN) :: filename_xl
logical :: scale_al = .false.
logical :: scale_bl = .false.
logical :: scale_xl = .false.
integer :: ncomment_al = 0
integer :: ncomment_bl = 0
integer :: ncomment_xl = 0
logical :: line_nos
integer :: seed = 0
logical :: seed_set = .false.
real (kind=s2_sp) :: MEAN_ZERO = 0e0
real (kind=s2_sp) :: STD_UNIT = 1e0
integer :: l
integer :: m
integer :: fail
integer :: nside
integer :: lmin
integer :: lmax
logical :: nside_set = .false.
real (kind=s2_dp) :: a
real (kind=s2_dp) :: b
real (kind=s2_dp) :: c
real (kind=s2_dp) :: xr
real (kind=s2_dp) :: yr
real (kind=s2_dp) :: xi
real (kind=s2_dp) :: yi
type (s2_pl) :: a_cl
type (s2_pl) :: b_cl
type (s2_pl) :: x_cl
real (kind=s2_dp), allocatable, dimension (:) :: al
real (kind=s2_dp), allocatable, dimension (:) :: bl
real (kind=s2_dp), allocatable, dimension (:) :: xl
real (kind=s2_sp), allocatable, dimension (:) :: al_sp
real (kind=s2_sp), allocatable, dimension (:) :: bl_sp
real (kind=s2_sp), allocatable, dimension (:) :: xl_sp
complex (kind=s2_spc), allocatable, dimension (:,:) :: alm
complex (kind=s2_spc), allocatable, dimension (:,:) :: blm
type (s2_sky) :: a_sky
type (s2_sky) :: b_sky
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