#include <complex.h>
#include <fftw3.h>
#include <math.h>
#include <ssht/ssht.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "so3/so3_error.h"
#include "so3/so3_sampling.h"
#include "so3/so3_types.h"
|
#define | MIN(a, b) ((a < b) ? (a) : (b)) |
|
#define | MAX(a, b) ((a > b) ? (a) : (b)) |
|
|
typedef void(* | inverse_complex_ssht) (complex double *, const complex double *, int, int, int, ssht_dl_method_t, int) |
|
typedef void(* | inverse_real_ssht) (double *, const complex double *, int, int, ssht_dl_method_t, int) |
|
typedef void(* | forward_complex_ssht) (complex double *, const complex double *, int, int, int, ssht_dl_method_t, int) |
|
typedef void(* | forward_real_ssht) (complex double *, const double *, int, int, ssht_dl_method_t, int) |
|
|
void | so3_core_inverse_via_ssht (complex double *f, const complex double *flmn, const so3_parameters_t *parameters) |
|
void | so3_core_forward_via_ssht (complex double *flmn, const complex double *f, const so3_parameters_t *parameters) |
|
void | so3_core_inverse_via_ssht_real (double *f, const complex double *flmn, const so3_parameters_t *parameters) |
|
void | so3_core_forward_via_ssht_real (complex double *flmn, const double *f, const so3_parameters_t *parameters) |
|
void | so3_core_inverse_direct (complex double *f, const complex double *flmn, const so3_parameters_t *parameters) |
|
void | so3_core_forward_direct (complex double *flmn, const complex double *f, const so3_parameters_t *parameters) |
|
void | so3_core_inverse_direct_real (double *f, const complex double *flmn, const so3_parameters_t *parameters) |
|
void | so3_core_forward_direct_real (complex double *flmn, const double *f, const so3_parameters_t *parameters) |
|
Core algorithms to perform Wigner transform on the rotation group SO(§).
- Author
- Martin Büttner
-
Jason McEwen
◆ MAX
#define MAX |
( |
|
a, |
|
|
|
b |
|
) |
| ((a > b) ? (a) : (b)) |
◆ MIN
#define MIN |
( |
|
a, |
|
|
|
b |
|
) |
| ((a < b) ? (a) : (b)) |
◆ forward_complex_ssht
typedef void(* forward_complex_ssht) (complex double *, const complex double *, int, int, int, ssht_dl_method_t, int) |
◆ forward_real_ssht
typedef void(* forward_real_ssht) (complex double *, const double *, int, int, ssht_dl_method_t, int) |
◆ inverse_complex_ssht
typedef void(* inverse_complex_ssht) (complex double *, const complex double *, int, int, int, ssht_dl_method_t, int) |
◆ inverse_real_ssht
typedef void(* inverse_real_ssht) (double *, const complex double *, int, int, ssht_dl_method_t, int) |
◆ so3_core_forward_direct()
void so3_core_forward_direct |
( |
complex double * |
flmn, |
|
|
const complex double * |
f, |
|
|
const so3_parameters_t * |
parameters |
|
) |
| |
Compute forward Wigner transform for a complex signal directly (without using SSHT).
- Parameters
-
[out] | flmn | Harmonic coefficients. If n_mode is different from SO3_N_MODE_ALL, this array has to be nulled before being passed to the function. |
[in] | f | Function on sphere. Provide a buffer of size (2*L-1)*L*(2*N-1). |
[in] | parameters | A fully populated parameters object. The reality flag is ignored. Use so3_core_forward_via_ssht_real instead for real signals. |
- Return values
-
- Author
- Martin Büttner
-
Jason McEwen
◆ so3_core_forward_direct_real()
void so3_core_forward_direct_real |
( |
complex double * |
flmn, |
|
|
const double * |
f, |
|
|
const so3_parameters_t * |
parameters |
|
) |
| |
Compute forward Wigner transform for a real signal directly (without using SSHT).
- Parameters
-
[out] | flmn | Harmonic coefficients. If n_mode is different from SO3_N_MODE_ALL, this array has to be nulled before being past to the function. |
[in] | f | Function on sphere. Provide a buffer of size (2*L-1)*L*(2*N-1). |
[in] | parameters | A fully populated parameters object. The reality flag is ignored. Use so3_core_forward_direct instead for complex signals. |
- Return values
-
- Author
- Martin Büttner
-
Jason McEwen
◆ so3_core_forward_via_ssht()
void so3_core_forward_via_ssht |
( |
complex double * |
flmn, |
|
|
const complex double * |
f, |
|
|
const so3_parameters_t * |
parameters |
|
) |
| |
Compute forward Wigner transform for a complex signal via SSHT.
- Parameters
-
[out] | flmn | Harmonic coefficients. If n_mode is different from SO3_N_MODE_ALL, this array has to be nulled before being past to the function. |
[in] | f | Function on sphere. Provide a buffer of size (2*L-1)*L*(2*N-1). |
[in] | parameters | A fully populated parameters object. The reality flag is ignored. Use so3_core_forward_via_ssht_real instead for real signals. |
- Return values
-
- Author
- Martin Büttner
-
Jason McEwen
◆ so3_core_forward_via_ssht_real()
void so3_core_forward_via_ssht_real |
( |
complex double * |
flmn, |
|
|
const double * |
f, |
|
|
const so3_parameters_t * |
parameters |
|
) |
| |
Compute forward Wigner transform for a real signal via SSHT.
- Parameters
-
[out] | flmn | Harmonic coefficients. If n_mode is different from SO3_N_MODE_ALL, this array has to be nulled before being past to the function. |
[in] | f | Function on sphere. Provide a buffer of size (2*L-1)*L*(2*N-1). |
[in] | parameters | A fully populated parameters object. The reality flag is ignored. Use so3_core_forward_via_ssht instead for complex signals. |
- Return values
-
- Author
- Martin Büttner
-
Jason McEwen
◆ so3_core_inverse_direct()
void so3_core_inverse_direct |
( |
complex double * |
f, |
|
|
const complex double * |
flmn, |
|
|
const so3_parameters_t * |
parameters |
|
) |
| |
Compute inverse Wigner transform for a complex signal directly (without using SSHT).
- Parameters
-
[out] | f | Function on sphere. Provide a buffer of size (2*L-1)*L*(2*N-1). |
[in] | flmn | Harmonic coefficients. |
[in] | parameters | A fully populated parameters object. The reality flag is ignored. Use so3_core_inverse_via_ssht_real instead for real signals. |
- Return values
-
- Author
- Martin Büttner
-
Jason McEwen
◆ so3_core_inverse_direct_real()
void so3_core_inverse_direct_real |
( |
double * |
f, |
|
|
const complex double * |
flmn, |
|
|
const so3_parameters_t * |
parameters |
|
) |
| |
Compute inverse Wigner transform for a real signal directly (without using SSHT).
- Parameters
-
[out] | f | Function on sphere. Provide a buffer of size (2*L-1)*L*(2*N-1). |
[in] | flmn | Harmonic coefficients for n >= 0. Note that for n = 0, these have to respect the symmetry flm0* = (-1)^(m+n)*fl-m0, and hence fl00 has to be real. |
[in] | parameters | A fully populated parameters object. The reality flag is ignored. Use so3_core_inverse_direct instead for complex signals. |
- Return values
-
- Author
- Martin Büttner
-
Jason McEwen
◆ so3_core_inverse_via_ssht()
void so3_core_inverse_via_ssht |
( |
complex double * |
f, |
|
|
const complex double * |
flmn, |
|
|
const so3_parameters_t * |
parameters |
|
) |
| |
Compute inverse Wigner transform for a complex signal via SSHT.
- Parameters
-
[out] | f | Function on sphere. Provide a buffer of size (2*L-1)*L*(2*N-1). |
[in] | flmn | Harmonic coefficients. |
[in] | parameters | A fully populated parameters object. The reality flag is ignored. Use so3_core_inverse_via_ssht_real instead for real signals. |
- Return values
-
- Author
- Martin Büttner
-
Jason McEwen
◆ so3_core_inverse_via_ssht_real()
void so3_core_inverse_via_ssht_real |
( |
double * |
f, |
|
|
const complex double * |
flmn, |
|
|
const so3_parameters_t * |
parameters |
|
) |
| |
Compute inverse Wigner transform for a real signal via SSHT.
- Parameters
-
[out] | f | Function on sphere. Provide a buffer of size (2*L-1)*L*(2*N-1). |
[in] | flmn | Harmonic coefficients for n >= 0. Note that for n = 0, these have to respect the symmetry flm0* = (-1)^(m+n)*fl-m0, and hence fl00 has to be real. |
[in] | parameters | A fully populated parameters object. The reality flag is ignored. Use so3_core_inverse_via_ssht instead for complex signals. |
- Return values
-
- Author
- Martin Büttner
-
Jason McEwen