Program s2_gcmb

program s2_gcmb

        ! Uses
    use s2_types_mod
    use s2_cmb_mod
    use s2_sky_mod
    use s2_pl_mod
    use s2_error_mod
    use s2_vect_mod

        ! Calls
    call parse_options
    call s2_cmb_free
    call s2_error
    call s2_pl_conv
    call s2_pl_free
    call s2_sky_free
    call s2_sky_write_file
    call system_clock

        ! Variables
    type (s2_cmb) :: cmb
    integer :: nside
    integer :: lmin
    integer :: lmax
    integer :: ncomment
    integer :: seed
    integer :: fail = 0
    character (len=S2_STRING_LEN) :: filename_cl
    character (len=S2_STRING_LEN) :: filename_out = 'out.fits'
    logical :: scale_cl = .true.
    logical :: seed_set = .false.
    real (kind=s2_sp) :: noise_var = 0.0e0
    real (kind=s2_sp) :: beam_fwhm = 0.0e0
    real (kind=s2_sp), allocatable, dimension (:) :: npl
    logical :: beam_present = .false.
    logical :: noise_present = .false.
    type (s2_pl) :: beam_pl
    type (s2_pl) :: noise_pl
    type (s2_pl) :: background_pl
    type (s2_pl) :: background_pl_tmp
    type (s2_sky) :: cmb_sky
    character (len=*), parameter :: MAP_FILE = 'map'
    character (len=*), parameter :: ALM_FILE = 'alm'
    character (len=*), parameter :: SKY_FILE = 'sky'
    integer :: file_type_out = S2_SKY_FILE_TYPE_MAP
    character (len=S2_STRING_LEN) :: file_type_out_str = MAP_FILE
    logical :: compute_map = .false.

        ! Subroutines and functions
    subroutine parse_options ()

end program s2_gcmb
Generate a Gaussian CMB realisation from an input power spectrum.

Usage:

Author: J. D. McEwen (mcewen@mrao.cam.ac.uk)

Version: 0.1 - July 2005


Description of Variables

cmb

type (s2_cmb) :: cmb

nside

integer :: nside

lmin

integer :: lmin

lmax

integer :: lmax

ncomment

integer :: ncomment

seed

integer :: seed

fail

integer :: fail = 0

filename_cl

character (len=S2_STRING_LEN) :: filename_cl

filename_out

character (len=S2_STRING_LEN) :: filename_out = 'out.fits'

scale_cl

logical :: scale_cl = .true.

seed_set

logical :: seed_set = .false.

noise_var

real (kind=s2_sp) :: noise_var = 0.0e0

beam_fwhm

real (kind=s2_sp) :: beam_fwhm = 0.0e0

npl

real (kind=s2_sp), allocatable, dimension (:) :: npl

beam_present

logical :: beam_present = .false.

noise_present

logical :: noise_present = .false.

beam_pl

type (s2_pl) :: beam_pl

noise_pl

type (s2_pl) :: noise_pl

background_pl

type (s2_pl) :: background_pl

background_pl_tmp

type (s2_pl) :: background_pl_tmp

cmb_sky

type (s2_sky) :: cmb_sky

MAP_FILE

character (len=*), parameter :: MAP_FILE = 'map'

ALM_FILE

character (len=*), parameter :: ALM_FILE = 'alm'

SKY_FILE

character (len=*), parameter :: SKY_FILE = 'sky'

file_type_out

integer :: file_type_out = S2_SKY_FILE_TYPE_MAP

file_type_out_str

character (len=S2_STRING_LEN) :: file_type_out_str = MAP_FILE

compute_map

logical :: compute_map = .false.

Description of Subroutines and Functions

parse_options

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