Modules | |
| NFSFT: Functions related to associated Legendre | |
| functions/polynomials | |
| NFSFT: Direct algorithms | |
| Public API | |
Data Structures | |
| struct | nfsft_plan_ |
| Structure for a NFSFT transform plan. More... | |
Defines | |
| #define | NFSFT_NORMALIZED (1U << 0) |
| By default, all computations are performed with respect to the unnormalized basis functions
If this flag is set, all computations are carried out using the
| |
| #define | NFSFT_USE_NDFT (1U << 1) |
| If this flag is set, the fast NFSFT algorithms (see nfsft_trafo, nfsft_adjoint) will use internally the exact but usually slower direct NDFT algorithm in favor of fast but approximative NFFT algorithm. | |
| #define | NFSFT_USE_DPT (1U << 2) |
| If this flag is set, the fast NFSFT algorithms (see nfsft_trafo, nfsft_adjoint) will use internally the usually slower direct DPT algorithm in favor of the fast FPT algorithm. | |
| #define | NFSFT_MALLOC_X (1U << 3) |
If this flag is set, the init methods (see nfsft_init , nfsft_init_advanced , and nfsft_init_guru) will allocate memory and the method nfsft_finalize will free the array x for you. | |
| #define | NFSFT_MALLOC_F_HAT (1U << 5) |
If this flag is set, the init methods (see nfsft_init , nfsft_init_advanced , and nfsft_init_guru) will allocate memory and the method nfsft_finalize will free the array f_hat for you. | |
| #define | NFSFT_MALLOC_F (1U << 6) |
If this flag is set, the init methods (see nfsft_init , nfsft_init_advanced , and nfsft_init_guru) will allocate memory and the method nfsft_finalize will free the array f for you. | |
| #define | NFSFT_PRESERVE_F_HAT (1U << 7) |
If this flag is set, it is guaranteed that during an execution of ndsft_trafo or nfsft_trafo the content of f_hat remains unchanged. | |
| #define | NFSFT_PRESERVE_X (1U << 8) |
If this flag is set, it is guaranteed that during an execution of ndsft_trafo, nfsft_trafo or ndsft_adjoint, nfsft_adjoint the content of x remains unchanged. | |
| #define | NFSFT_PRESERVE_F (1U << 9) |
If this flag is set, it is guaranteed that during an execution of ndsft_adjoint or nfsft_adjoint the content of f remains unchanged. | |
| #define | NFSFT_DESTROY_F_HAT (1U << 10) |
If this flag is set, it is explicitely allowed that during an execution of ndsft_trafo or nfsft_trafo the content of f_hat may be changed. | |
| #define | NFSFT_DESTROY_X (1U << 11) |
If this flag is set, it is explicitely allowed that during an execution of ndsft_trafo, nfsft_trafo or ndsft_adjoint, nfsft_adjoint the content of x may be changed. | |
| #define | NFSFT_DESTROY_F (1U << 12) |
If this flag is set, it is explicitely allowed that during an execution of ndsft_adjoint or nfsft_adjoint the content of f may be changed. | |
| #define | NFSFT_NO_DIRECT_ALGORITHM (1U << 13) |
| If this flag is set, the transforms ndsft_trafo and ndsft_adjoint do not work. | |
| #define | NFSFT_NO_FAST_ALGORITHM (1U << 14) |
| If this flag is set, the transforms nfsft_trafo and nfsft_adjoint do not work. | |
| #define | NFSFT_ZERO_F_HAT (1U << 16) |
If this flag is set, the transforms nfsft_adjoint and ndsft_adjoint set all unused entries in f_hat not corresponding to spherical Fourier coefficients to zero. | |
| #define | NFSFT_INDEX(k, n, plan) ((2*(plan)->N+2)*((plan)->N-n+1)+(plan)->N+k+1) |
This helper macro expands to the index corresponding to the spherical Fourier coefficient for , with
. | |
| #define | NFSFT_F_HAT_SIZE(N) ((2*N+2)*(2*N+2)) |
| This helper macro expands to the logical size of a spherical Fourier coefficients array for a bandwidth N. | |
Typedefs | |
| typedef nfsft_plan_ | nfsft_plan |
| Structure for a NFSFT transform plan. | |
Functions | |
| void | nfsft_init (nfsft_plan *plan, int N, int M) |
| Creates a transform plan. | |
| void | nfsft_init_advanced (nfsft_plan *plan, int N, int M, unsigned int nfsft_flags) |
| Creates a transform plan. | |
| void | nfsft_init_guru (nfsft_plan *plan, int N, int M, unsigned int nfsft_flags, int nfft_flags, int nfft_cutoff) |
| Creates a transform plan. | |
| void | nfsft_precompute (int N, double kappa, unsigned int nfsft_flags, unsigned int fpt_flags) |
Performes precomputation up to the next power of two with respect to a given bandwidth . | |
| void | nfsft_forget () |
| Forgets all precomputed data. | |
| void | ndsft_trafo (nfsft_plan *plan) |
| Executes a direct NDSFT, i.e. | |
| void | ndsft_adjoint (nfsft_plan *plan) |
| Executes a direct adjoint NDSFT, i.e. | |
| void | nfsft_trafo (nfsft_plan *plan) |
| Executes a NFSFT, i.e. | |
| void | nfsft_adjoint (nfsft_plan *plan) |
| Executes an adjoint NFSFT, i.e. | |
| void | nfsft_finalize (nfsft_plan *plan) |
| Destroys a plan. | |
| void | nfsft_precompute_x (nfsft_plan *plan) |
In the following, we abbreviate the term "nonuniform fast spherical Fourier transform" by NFSFT.
can be described in spherical coordinates by a vector
with the radius
and two angles
,
. We denote by
the two-dimensional unit sphere embedded into
, i.e.
and identify a point from
with the corresponding vector
. The spherical coordinate system is illustrated in the following figure:
,
and identify a point from
with the vector
.
as classical orthogonal polynomials are given by their corresponding Rodrigues formula
The corresponding three-term recurrence relation is
With
being the usual
inner product, the Legendre polynomials obey the orthogonality condition
renders the scaled Legendre polynomials
orthonormal with respect to the induced
norm
,
,
are defined by
For
, they coincide with the Legendre polynomials, i.e.
. The associated Legendre functions obey the three-term recurrence relation
with
,
, and
For fixed
, the set
forms a complete set of orthogonal functions in
with
renders the scaled associated Legendre functions
orthonormal with respect to the induced
norm
with yet unnormalised basis functions
is given by
with the usual
inner product
The normalisation constant
renders the scaled basis functions
orthonormal with respect to the induced
norm
A function
has the orthogonal expansion
where the coefficients
are the spherical Fourier coefficients and the equivalence is understood in the
-sense.
read and write. The public members are structured as follows: N_total (read) The total number of components in f_hat. If the bandwidth is
, the total number of components in f_hat is N_total
. M_total (read) the total number of samples
f_hat (read-write) The flattened array of spherical Fourier coefficents. The array has length
such that valid indices
for array access f_hat [
] are
. However, only read and write access to indices corresponding to spherical Fourier coefficients
is defined. The index
corresponding to the spherical Fourier coefficient
with
,
is
. For convenience, the helper macro NFSFT_INDEX(k,n) provides the necessary index calculations such that one can write f_hat[ NFSFT_INDEX(
)] = ... to access the component corresponding to
. The data layout is due to implementation details. f (read-write) the array of coefficients
for
such that f[
] =
N (read) the bandwidth
x the array of nodes
for
such that f[
] =
and f[
] = 
up to which precomputation is performed is always chosen as the next power of two with respect to the specified maximum bandwidth. f_hat while the input x is preserved. On the contrary, the adjoint NDSFT transforms (see ndsft_adjoint, nfsft_adjoint) do not destroy the input f and x by default. The desired behaviour can be assured by using the NFSFT_PRESERVE_F_HAT, NFSFT_PRESERVE_X, NFSFT_PRESERVE_F and NFSFT_DESTROY_F_HAT, NFSFT_DESTROY_X, NFSFT_DESTROY_F flags.
|
|
If this flag is set, it is explicitely allowed that during an execution of ndsft_adjoint or nfsft_adjoint the content of
|
|
|
If this flag is set, it is explicitely allowed that during an execution of ndsft_trafo or nfsft_trafo the content of
|
|
|
If this flag is set, it is explicitely allowed that during an execution of ndsft_trafo, nfsft_trafo or ndsft_adjoint, nfsft_adjoint the content of
|
|
|
If this flag is set, the init methods (see nfsft_init , nfsft_init_advanced , and nfsft_init_guru) will allocate memory and the method nfsft_finalize will free the array
Otherwise, you have to assure by yourself that
|
|
|
If this flag is set, the init methods (see nfsft_init , nfsft_init_advanced , and nfsft_init_guru) will allocate memory and the method nfsft_finalize will free the array
Otherwise, you have to assure by yourself that
|
|
|
If this flag is set, the init methods (see nfsft_init , nfsft_init_advanced , and nfsft_init_guru) will allocate memory and the method nfsft_finalize will free the array
Otherwise, you have to assure by yourself that
|
|
|
If this flag is set, the transforms ndsft_trafo and ndsft_adjoint do not work. Setting this flag saves some memory for precomputed data.
|
|
|
If this flag is set, the transforms nfsft_trafo and nfsft_adjoint do not work. Setting this flag saves memory for precomputed data.
|
|
|
By default, all computations are performed with respect to the unnormalized basis functions
If this flag is set, all computations are carried out using the
.
|
|
|
If this flag is set, it is guaranteed that during an execution of ndsft_adjoint or nfsft_adjoint the content of
|
|
|
If this flag is set, it is guaranteed that during an execution of ndsft_trafo or nfsft_trafo the content of
|
|
|
If this flag is set, it is guaranteed that during an execution of ndsft_trafo, nfsft_trafo or ndsft_adjoint, nfsft_adjoint the content of
|
|
|
If this flag is set, the fast NFSFT algorithms (see nfsft_trafo, nfsft_adjoint) will use internally the usually slower direct DPT algorithm in favor of the fast FPT algorithm.
|
|
|
If this flag is set, the fast NFSFT algorithms (see nfsft_trafo, nfsft_adjoint) will use internally the exact but usually slower direct NDFT algorithm in favor of fast but approximative NFFT algorithm.
|
|
|
If this flag is set, the transforms nfsft_adjoint and ndsft_adjoint set all unused entries in
|
|
|
Executes a direct adjoint NDSFT, i.e.
computes for
|
|
|
Executes a direct NDSFT, i.e.
computes for
|
|
|
Executes an adjoint NFSFT, i.e.
computes for
|
|
|
Destroys a plan.
|
|
|
Forgets all precomputed data.
|
|
||||||||||||||||
|
Creates a transform plan.
|
|
||||||||||||||||||||
|
Creates a transform plan.
|
|
||||||||||||||||||||||||||||
|
Creates a transform plan.
|
|
||||||||||||||||||||
|
Performes precomputation up to the next power of two with respect to a given bandwidth
|
|
|
Executes a NFSFT, i.e.
computes for
|
1.4.4