Program s2fil_filter_construct

program s2fil_filter_construct

        ! Uses
    use s2_types_mod
    use s2_sky_mod
    use s2_pl_mod
    use s2_vect_mod, only: s2_vect_arcmin_to_rad
    use s2fil_filter_mod
    use s2fil_error_mod
    use comb_tmpl_mod
    use cswt_tr_mod, only: cswt_tr_io_txt_dilation_read

        ! Calls
    call cswt_tr_io_txt_dilation_read
    call parse_options
    call s2_pl_conv
    call s2_pl_free
    call s2_sky_free
    call s2fil_error
    call s2fil_filter_free
    call s2fil_filter_io_fits_write

        ! Variables
    integer, parameter :: NUM_COMMENT_LINES_BKGND_FILE = 29
    character (len=S2_STRING_LEN) :: filter_type_string = S2FIL_FILTER_TYPE_STR_MF
    character (len=S2_STRING_LEN) :: scale_type_string = S2FIL_FILTER_SCALE_TYPE_STR_TMPL
    integer :: filter_type = S2FIL_FILTER_TYPE_MF
    integer :: scale_type = S2FIL_FILTER_SCALE_TYPE_TMPL
    character (len=S2_STRING_LEN) :: filename_background_cmb
    logical :: cmb_present = .false.
    logical :: noise_present = .false.
    logical :: beam_present = .false.
    real (kind=s2_sp) :: noise_var = 0.0e0
    real (kind=s2_sp) :: beam_fwhm = 0.0e0
    character (len=S2_STRING_LEN) :: filename_dil
    character (len=S2_STRING_LEN) :: filename_filter
    character (len=S2_STRING_LEN), parameter :: TMPL_TYPE_GAUSSIAN = 'gaussian'
    character (len=S2_STRING_LEN), parameter :: TMPL_TYPE_MEXHAT = 'mexhat'
    character (len=S2_STRING_LEN), parameter :: TMPL_TYPE_MORLET = 'morlet'
    character (len=S2_STRING_LEN), parameter :: TMPL_TYPE_BUTTERFLY = 'butterfly'
    character (len=S2_STRING_LEN) :: tmpl_type
    integer :: nside
    integer :: lmax
    integer :: mmax
    integer :: pix_scheme
    integer :: background_read_lmin
    logical :: norm_pres_dil
    logical :: background_read_scale
    logical :: filter_heu = .true.
    real (kind=s2_sp), allocatable, dimension (:,:) :: scale
    type (s2_sky) :: tmpl
    type (s2_pl) :: background
    type (s2_pl) :: background_cmb
    type (s2_pl) :: background_noise
    type (s2_pl) :: beam
    type (s2fil_filter) :: filter

        ! Subroutines and functions
    subroutine parse_options ()

end program s2fil_filter_construct
Compute optimal filter from template and background process.

Notes:

Usage: s2fil_filter_construct

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

Version: 0.2 - April 2005


Description of Variables

NUM_COMMENT_LINES_BKGND_FILE

integer, parameter :: NUM_COMMENT_LINES_BKGND_FILE = 29

filter_type_string

character (len=S2_STRING_LEN) :: filter_type_string = S2FIL_FILTER_TYPE_STR_MF

scale_type_string

character (len=S2_STRING_LEN) :: scale_type_string = S2FIL_FILTER_SCALE_TYPE_STR_TMPL

filter_type

integer :: filter_type = S2FIL_FILTER_TYPE_MF

scale_type

integer :: scale_type = S2FIL_FILTER_SCALE_TYPE_TMPL

filename_background_cmb

character (len=S2_STRING_LEN) :: filename_background_cmb

cmb_present

logical :: cmb_present = .false.

noise_present

logical :: noise_present = .false.

beam_present

logical :: beam_present = .false.

noise_var

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

beam_fwhm

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

filename_dil

character (len=S2_STRING_LEN) :: filename_dil

filename_filter

character (len=S2_STRING_LEN) :: filename_filter

TMPL_TYPE_GAUSSIAN

character (len=S2_STRING_LEN), parameter :: TMPL_TYPE_GAUSSIAN = 'gaussian'

TMPL_TYPE_MEXHAT

character (len=S2_STRING_LEN), parameter :: TMPL_TYPE_MEXHAT = 'mexhat'

TMPL_TYPE_MORLET

character (len=S2_STRING_LEN), parameter :: TMPL_TYPE_MORLET = 'morlet'

TMPL_TYPE_BUTTERFLY

character (len=S2_STRING_LEN), parameter :: TMPL_TYPE_BUTTERFLY = 'butterfly'

tmpl_type

character (len=S2_STRING_LEN) :: tmpl_type

nside

integer :: nside

lmax

integer :: lmax

mmax

integer :: mmax

pix_scheme

integer :: pix_scheme

background_read_lmin

integer :: background_read_lmin

norm_pres_dil

logical :: norm_pres_dil

background_read_scale

logical :: background_read_scale

filter_heu

logical :: filter_heu = .true.

scale

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

tmpl

type (s2_sky) :: tmpl

background

type (s2_pl) :: background

background_cmb

type (s2_pl) :: background_cmb

background_noise

type (s2_pl) :: background_noise

beam

type (s2_pl) :: beam

filter

type (s2fil_filter) :: filter

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 - February 2005