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_testPerforms 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
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
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