|
My Project
|
#include <complex.h>#include <fftw3.h>#include <omp.h>#include <stdio.h>#include <stdlib.h>#include <time.h>#include "ssht.h"Go to the source code of this file.
Macros | |
| #define | NREPEAT 5 |
| #define | MAX(a, b) ((a) > (b) ? (a) : (b)) |
Functions | |
| double | ran2_dp (int idum) |
| void | ssht_test_gen_flm_complex (complex double *flm, int L, int spin, int seed) |
| void | ssht_test_gen_flm_real (complex double *flm, int L, int seed) |
| void | ssht_test_gen_lb_flm_complex (complex double *flm, int L_zero, int L, int spin, int seed) |
| void | ssht_test_gen_lb_flm_real (complex double *flm, int L0, int L, int seed) |
| int | null_test (const complex double *X, int n) |
| int | nan_test (const complex double *X, int n) |
| int | main (int argc, char *argv[]) |
Applies SSHT algorithms to perform inverse and forward spherical harmonic transforms (respectively) to 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: ssht_test B spin [B0], e.g. ssht_test 64 2 32
Definition in file ssht_test.c.
| #define MAX | ( | a, | |
| b | |||
| ) | ((a) > (b) ? (a) : (b)) |
Definition at line 28 of file ssht_test.c.
| #define NREPEAT 5 |
Definition at line 27 of file ssht_test.c.
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Null and Nan Tests!
Harmonic Coefficients
Harmonic Coefficients
Null and Nan Tests!
Harmonic Coefficients
Harmonic Coefficients
Null and Nan Tests!
Harmonic Coefficients
Harmonic Coefficients
Null and Nan Tests!
Harmonic Coefficients
Harmonic Coefficients
Null and Nan Tests!
Harmonic Coefficients
Harmonic Coefficients
Null and Nan Tests!
Harmonic Coefficients
Harmonic Coefficients
Null and Nan Tests!
Harmonic Coefficients
Harmonic Coefficients
Null and Nan Tests!
Harmonic Coefficients
Harmonic Coefficients
Null and Nan Tests!
Harmonic Coefficients
Harmonic Coefficients
Null and Nan Tests!
Harmonic Coefficients
Harmonic Coefficients
Null and Nan Tests!
Harmonic Coefficients
Harmonic Coefficients
Null and Nan Tests!
Harmonic Coefficients
Harmonic Coefficients
Null and Nan Tests!
Harmonic Coefficients
Harmonic Coefficients
Null and Nan Tests!
Harmonic Coefficients
Harmonic Coefficients
Null and Nan Tests!
Harmonic Coefficients
Harmonic Coefficients
Null and Nan Tests!
Harmonic Coefficients
Harmonic Coefficients
Definition at line 68 of file ssht_test.c.
References MAX, nan_test(), NREPEAT, null_test(), ssht_core_dh_forward_sov(), ssht_core_dh_forward_sov_real(), ssht_core_dh_inverse_sov(), ssht_core_dh_inverse_sov_real(), ssht_core_gl_forward_sov(), ssht_core_gl_forward_sov_real(), ssht_core_gl_inverse_sov(), ssht_core_gl_inverse_sov_real(), ssht_core_mw_forward_sov_conv_sym(), ssht_core_mw_forward_sov_conv_sym_pole(), ssht_core_mw_forward_sov_conv_sym_real(), ssht_core_mw_forward_sov_conv_sym_real_pole(), ssht_core_mw_forward_sov_conv_sym_ss(), ssht_core_mw_forward_sov_conv_sym_ss_pole(), ssht_core_mw_forward_sov_conv_sym_ss_real(), ssht_core_mw_forward_sov_conv_sym_ss_real_pole(), ssht_core_mw_inverse_sov_sym(), ssht_core_mw_inverse_sov_sym_pole(), ssht_core_mw_inverse_sov_sym_real(), ssht_core_mw_inverse_sov_sym_real_pole(), ssht_core_mw_inverse_sov_sym_ss(), ssht_core_mw_inverse_sov_sym_ss_pole(), ssht_core_mw_inverse_sov_sym_ss_real(), ssht_core_mw_inverse_sov_sym_ss_real_pole(), ssht_core_mw_lb_forward_sov_conv_sym(), ssht_core_mw_lb_forward_sov_conv_sym_real(), ssht_core_mw_lb_forward_sov_conv_sym_ss(), ssht_core_mw_lb_forward_sov_conv_sym_ss_real(), ssht_core_mw_lb_inverse_sov_sym(), ssht_core_mw_lb_inverse_sov_sym_real(), ssht_core_mw_lb_inverse_sov_sym_ss(), ssht_core_mw_lb_inverse_sov_sym_ss_real(), SSHT_DL_RISBO, SSHT_ERROR_MEM_ALLOC_CHECK, ssht_test_gen_flm_complex(), ssht_test_gen_flm_real(), ssht_test_gen_lb_flm_complex(), and ssht_test_gen_lb_flm_real().
| int nan_test | ( | const complex double * | X, |
| int | n | ||
| ) |
Test for nan vector
| [in] | X | vector of complex double |
| [in] | n | length of X. |
| Y | returns int 1 if no nans, 0 if nan entires exist. i.e. 0 = fail, 1 = pass. |
Definition at line 61 of file ssht_test.c.
Referenced by main().
| int null_test | ( | const complex double * | X, |
| int | n | ||
| ) |
Test for null vector
| [in] | X | vector of complex double |
| [in] | n | length of X. |
| Y | returns int 0 if all zeros, 1 if non-zero i.e. 0 = fail, 1 = pass. |
Definition at line 45 of file ssht_test.c.
Referenced by main().
| double ran2_dp | ( | int | idum | ) |
Generate uniform deviate in range [0,1) given seed. (Using double precision.)
| [in] | idum | Seed. |
| ran_dp | Generated uniform deviate. |
Definition at line 1128 of file ssht_test.c.
| void ssht_test_gen_flm_complex | ( | complex double * | flm, |
| int | L, | ||
| int | spin, | ||
| int | seed | ||
| ) |
Generate random spherical harmonic coefficients of a complex signal.
| [out] | flm | Random spherical harmonic coefficients generated. |
| [in] | L | Harmonic band-limit. |
| [in] | spin | Spin number. |
| [in] | seed | Integer seed required for random number generator. |
| none |
Definition at line 1082 of file ssht_test.c.
Referenced by main().
| void ssht_test_gen_flm_real | ( | complex double * | flm, |
| int | L, | ||
| int | seed | ||
| ) |
Generate random spherical harmonic coefficients of a real spin=0 signal.
| [out] | flm | Random spherical harmonic coefficients generated. |
| [in] | L | Harmonic band-limit. |
| [in] | seed | Integer seed required for random number generator. |
| none |
Definition at line 1006 of file ssht_test.c.
Referenced by main().
| void ssht_test_gen_lb_flm_complex | ( | complex double * | flm, |
| int | L0, | ||
| int | L, | ||
| int | spin, | ||
| int | seed | ||
| ) |
Generate random spherical harmonic coefficients of a complex signal with lower band-limit.
| [out] | flm | Random spherical harmonic coefficients generated. |
| [in] | L0 | Lower harmonic band-limit. |
| [in] | L | Upper harmonic band-limit. |
| [in] | spin | Spin number. |
| [in] | seed | Integer seed required for random number generator. |
| none |
Definition at line 1105 of file ssht_test.c.
Referenced by main().
| void ssht_test_gen_lb_flm_real | ( | complex double * | flm, |
| int | L0, | ||
| int | L, | ||
| int | seed | ||
| ) |
Generate random spherical harmonic coefficients of a real spin=0 signal with lower band-limit.
| [out] | flm | Random spherical harmonic coefficients generated. |
| [in] | L0 | Lower harmonic band-limit. |
| [in] | L | Upper harmonic band-limit. |
| [in] | seed | Integer seed required for random number generator. |
| none |
Definition at line 1038 of file ssht_test.c.
Referenced by main().