Program s2dw_test

program s2dw_test

        ! Uses
    use s2dw_types_mod
    use s2dw_error_mod
    use s2dw_core_mod
    use s2dw_fileio_mod
    use omp_lib

        ! Calls
    call getarg
    call s2dw_core_analysis_flm2wav_dynamic
    call s2dw_core_init_directionality
    call s2dw_core_init_kernels
    call s2dw_core_synthesis_wav2flm_dynamic
    call s2dw_error
    call s2dw_test_gen_flm

        ! Variables
    character (len=64) :: arg
    integer, parameter :: N_repeat = 1
    integer :: B
    integer :: N
    real (kind=dp) :: alpha
    integer :: J
    integer :: J_max
    integer :: bl_scoeff
    integer :: fail = 0
    integer :: seed
    integer :: i_repeat
    real (kind=dp), dimension (0:N_repeat-1) :: error_flm
    logical :: admiss_pass
    real (kind=dp) :: time_start
    real (kind=dp) :: time_end
    real, dimension (0:N_repeat-1) :: durations_analysis
    real, dimension (0:N_repeat-1) :: durations_synthesis
    complex (kind=dpc), allocatable, dimension (:,:) :: flm_orig
    complex (kind=dpc), allocatable, dimension (:,:) :: flm_syn
    real (kind=dp), allocatable, dimension (:,:) :: K_gamma
    real (kind=dp), allocatable, dimension (:) :: Phi2
    complex (kind=dpc), allocatable, dimension (:,:) :: Slm
    real (kind=dp), allocatable, dimension (:) :: admiss
    type (s2dw_wav_abg), allocatable, dimension (:) :: wavdyn
    complex (kind=dpc), allocatable, dimension (:,:) :: scoeff

        ! Interfaces
    interface s2dw_test_gen_flm

end program s2dw_test
Performs S2DW transform analysis and synthesis and check that the original signal is reconstructed exactly (to numerical precision). Test is performed on a random signal with harmonic coefficients uniformly sampled from (-1,1).

Usage: s2dw_test B, e.g. s2dw_test 64

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

Version: 0.1 - November 2007


Description of Variables

arg

character (len=64) :: arg

N_repeat

integer, parameter :: N_repeat = 1

B

integer :: B

N

integer :: N

alpha

real (kind=dp) :: alpha

J

integer :: J

J_max

integer :: J_max

bl_scoeff

integer :: bl_scoeff

fail

integer :: fail = 0

seed

integer :: seed

i_repeat

integer :: i_repeat

error_flm

real (kind=dp), dimension (0:N_repeat-1) :: error_flm

admiss_pass

logical :: admiss_pass

time_start

real (kind=dp) :: time_start

time_end

real (kind=dp) :: time_end

durations_analysis

real, dimension (0:N_repeat-1) :: durations_analysis

durations_synthesis

real, dimension (0:N_repeat-1) :: durations_synthesis

flm_orig

complex (kind=dpc), allocatable, dimension (:,:) :: flm_orig

flm_syn

complex (kind=dpc), allocatable, dimension (:,:) :: flm_syn

K_gamma

real (kind=dp), allocatable, dimension (:,:) :: K_gamma

Phi2

real (kind=dp), allocatable, dimension (:) :: Phi2

Slm

complex (kind=dpc), allocatable, dimension (:,:) :: Slm

admiss

real (kind=dp), allocatable, dimension (:) :: admiss

wavdyn

type (s2dw_wav_abg), allocatable, dimension (:) :: wavdyn

scoeff

complex (kind=dpc), allocatable, dimension (:,:) :: scoeff

Description of Interfaces

s2dw_test_gen_flm

interface s2dw_test_gen_flm
    subroutine s2dw_test_gen_flm (L, flm, seed)
        integer, intent(in) :: L
        complex (kind=dpc), intent(out), dimension (0:L,0:L) :: flm
        integer, intent(in) :: seed
    end subroutine s2dw_test_gen_flm
end interface s2dw_test_gen_flm