NNFFT - Nonequispaced in time and frequency FFT

Direct and fast computation of the discrete nonequispaced in time and frequency Fourier transform. More...

## Data Structures

struct | nnfft_plan
| data structure for an NNFFT (nonequispaced in time and frequency fast Fourier transform) plan with double precision More...

## Macros

#define | MALLOC_V (1U<< 11)

## Functions

void | nnfft_init (nnfft_plan *ths_plan, int d, int N_total, int M_total, int *N)
void | nnfft_init_guru (nnfft_plan *ths_plan, int d, int N_total, int M_total, int *N, int *N1, int m, unsigned nnfft_flags)
void | nnfft_trafo (nnfft_plan *ths_plan)
| user routines More...
void | nnfft_adjoint (nnfft_plan *ths_plan)
void | nnfft_precompute_lin_psi (nnfft_plan *ths_plan)
| create a lookup table More...
void | nnfft_precompute_psi (nnfft_plan *ths_plan)
void | nnfft_precompute_full_psi (nnfft_plan *ths_plan)
| computes all entries of B explicitly More...
void | nnfft_precompute_phi_hut (nnfft_plan *ths_plan)
| initialisation of direct transform More...
void | nnfft_finalize (nnfft_plan *ths_plan)

## Detailed Description

Direct and fast computation of the discrete nonequispaced in time and frequency Fourier transform.

## Macro Definition Documentation

#define MALLOC_V (1U<< 11)

If this flag is set, (de)allocation of the frequency node vector is done.

See also
  nnfft_init
  nnfft_init_guru
  nnfft_finalize

Author
  Tobias Knopp

Definition at line 425 of file nfft3.h.

Referenced by nnfft_finalize(), nnfft_init(), nnfft_precompute_full_psi(), and reconstruct().

## Function Documentation

nnfft_init | ( | nnfft_plan * | ths_plan,
|  | int | d,
|  | int | N_total,
|  | int | M_total,
|  | int * | N
| ) |  |

Creates a transform plan.

- ths_plan The plan for the transform
- d The dimension
- N_total The number of nodes
- M_total The number of nodes
- N The bandwidth

Author
  Tobias Knopp

Definition at line 612 of file nnfft.c.

References nnfft_plan::d, FFT_OUT_OF_PLACE, FFTW_INIT, nnfft_plan::m, nnfft_plan::M_total, MALLOC_F, MALLOC_F_HAT, MALLOC_V, MALLOC_X, nnfft_plan::N, nnfft_plan::N1, nnfft_plan::N_total, nfft_malloc(), nnfft_plan::nnfft_flags, PRE_PHI_HUT, and PRE_PSI.

void nnfft_init_guru | ( | nnfft_plan * | ths_plan,
|  | int | d,
|  | int | N_total,
|  | int | M_total,
|  | int * | N,
|  | int * | N1,
|  | int | m,
|  | unsigned | nnfft_flags
| ) |  |

Creates a transform plan.

- ths_plan The plan for the transform
- d The dimension
- N_total The number of nodes
- M_total The number of nodes
- N The bandwidth
- N1 The oversampled bandwidth
- m The cut-off parameter
- nnfft_flags The flags

Author
  Tobias Knopp

Definition at line 577 of file nnfft.c.

References nnfft_plan::d, FFT_OUT_OF_PLACE, FFTW_INIT, nnfft_plan::m, nnfft_plan::M_total, MALLOC_F_HAT, nnfft_plan::N, nnfft_plan::N1, nnfft_plan::N_total, nfft_malloc(), nnfft_plan::nnfft_flags, PRE_FULL_PSI, PRE_LIN_PSI, PRE_PHI_HUT, and PRE_PSI.

Referenced by reconstruct().

void nnfft_trafo | ( | nnfft_plan * | ths_plan | ) |

user routines

Executes a NNFFT, i.e. computes for

- ths_plan The plan

Author
  Tobias Knopp

Definition at line 291 of file nnfft.c.

References nnfft_plan::d, nnfft_plan::direct_plan, nfft_plan::f, nnfft_plan::f, nnfft_plan::M_total, nfft_trafo(), nnfft_plan::sigma, and nnfft_plan::x.

Referenced by nnfft_precompute_full_psi().

void nnfft_adjoint | ( | nnfft_plan * | ths_plan | ) |

Executes a adjoint NNFFT, i.e. computes for

- ths_plan The plan

Author
  Tobias Knopp

Definition at line 319 of file nnfft.c.

References nnfft_plan::d, nnfft_plan::direct_plan, nfft_plan::f, nnfft_plan::f, nnfft_plan::M_total, nfft_adjoint(), nnfft_plan::sigma, and nnfft_plan::x.

Referenced by nnfft_precompute_full_psi().

void nnfft_precompute_lin_psi | ( | nnfft_plan * | ths_plan | ) |

create a lookup table

Precomputation for a transform plan.

- ths_plan The pointer to a nfft plan

Author
  Tobias Knopp

precomputes equally spaced values of the window function psi

if PRE_LIN_PSI is set the application program has to call this routine

Definition at line 367 of file nnfft.c.

References nnfft_plan::d, nnfft_plan::direct_plan, nnfft_plan::K, nnfft_plan::m, nnfft_plan::n, nnfft_plan::N1, nfft_precompute_lin_psi(), and nnfft_plan::psi.

Referenced by nnfft_precompute_full_psi(), and reconstruct().

void nnfft_precompute_psi | ( | nnfft_plan * | ths_plan | ) |

Precomputation for a transform plan.

- ths_plan The pointer to a nfft plan

Author
  Tobias Knopp

precomputes the values of the window function psi in a tensor product form

if PRE_PSI is set the application program has to call this routine after setting the nodes x

Definition at line 385 of file nnfft.c.

References nnfft_plan::d, nnfft_plan::direct_plan, nnfft_plan::m, nnfft_plan::M_total, nnfft_plan::n, nnfft_plan::N1, nnfft_plan::N_total, nfft_precompute_psi(), nnfft_plan::psi, nnfft_plan::sigma, nnfft_plan::v, and nnfft_plan::x.

Referenced by nnfft_precompute_full_psi(), and reconstruct().

void nnfft_precompute_full_psi | ( | nnfft_plan * | ths_plan | ) |

computes all entries of B explicitly

Precomputation for a transform plan.

- ths_plan The pointer to a nfft plan

Author
  Tobias Knopp

precomputes the values of the window function psi and their indices in non tensor product form

if PRE_FULL_PSI is set the application program has to call this routine after setting the nodes x

Definition at line 424 of file nnfft.c.

References nnfft_plan::a, nnfft_plan::aN1, nnfft_plan::aN1_total, nnfft_plan::d, nnfft_plan::direct_plan, nfft_plan::f, nnfft_plan::f, nfft_plan::f_hat, nnfft_plan::f_hat, nnfft_plan::K, nnfft_plan::m, nnfft_plan::M_total, MALLOC_F, MALLOC_F_HAT, MALLOC_V, MALLOC_X, nnfft_plan::mv_adjoint, nnfft_plan::mv_trafo, nnfft_plan::n, nnfft_plan::N, nnfft_plan::N1, nnfft_plan::N_total, nfft_malloc(), nfft_precompute_full_psi(), nnfft_adjoint(), nnfft_plan::nnfft_flags, nnfft_precompute_lin_psi(), nnfft_precompute_phi_hut(), nnfft_precompute_psi(), nnfft_trafo(), PRE_FULL_PSI, PRE_LIN_PSI, PRE_PHI_HUT, PRE_PSI, nnfft_plan::psi, nnfft_plan::psi_index_f, nnfft_plan::psi_index_g, nnfft_plan::sigma, nnfft_plan::v, nfft_plan::x, and nnfft_plan::x.

Referenced by reconstruct().

void nnfft_precompute_phi_hut | ( | nnfft_plan * | ths_plan | ) |

initialisation of direct transform

Precomputation for a transform plan.

- ths_plan The pointer to a nfft plan

Author
  Tobias Knopp

precomputes the values of the fourier transformed window function, i.e. phi_hut

if PRE_PHI_HUT is set the application program has to call this routine after setting the nodes v

Definition at line 347 of file nnfft.c.

References nnfft_plan::c_phi_inv, nnfft_plan::d, nnfft_plan::M_total, nnfft_plan::n, nnfft_plan::N, nfft_malloc(), and nnfft_plan::x.

Referenced by nnfft_precompute_full_psi(), and reconstruct().

void nnfft_finalize | ( | nnfft_plan * | ths_plan | ) |

Destroys a plan.

- ths_plan The plan

Author
  Tobias Knopp

Definition at line 655 of file nnfft.c.

References nnfft_plan::aN1, nnfft_plan::c_phi_inv, nnfft_plan::direct_plan, nnfft_plan::f, nnfft_plan::f_hat, MALLOC_F, MALLOC_F_HAT, MALLOC_V, MALLOC_X, nnfft_plan::N, nnfft_plan::N1, nfft_finalize(), nfft_free(), nnfft_plan::nnfft_flags, PRE_FULL_PSI, PRE_LIN_PSI, PRE_PHI_HUT, PRE_PSI, nnfft_plan::psi, nnfft_plan::psi_index_f, nnfft_plan::psi_index_g, nnfft_plan::v, and nnfft_plan::x.

Referenced by reconstruct().