#include <math.h>
#include <stdlib.h>
#include "util.h"
#include "nfft3.h"
Functions | |
int | polar_grid (int T, int R, double *x, double *w) |
Generates the points ![]() ![]() ![]() ![]() | |
int | polar_dft (fftw_complex *f_hat, int NN, fftw_complex *f, int T, int R, int m) |
discrete polar FFT | |
int | polar_fft (fftw_complex *f_hat, int NN, fftw_complex *f, int T, int R, int m) |
NFFT-based polar FFT. | |
int | inverse_polar_fft (fftw_complex *f, int T, int R, fftw_complex *f_hat, int NN, int max_i, int m) |
inverse NFFT-based polar FFT | |
int | main (int argc, char **argv) |
test program for various parameters |
Computes the NFFT-based polar FFT and its inverse for various parameters.
|
inverse NFFT-based polar FFT < index for nodes and freqencies < plan for the nfft-2D < plan for the inverse nfft < knots and associated weights < index for iterations < number of knots < oversampling factor sigma=2 < oversampling factor sigma=2 init two dimensional NFFT plan init two dimensional infft plan init nodes, given samples and weights precompute psi, the entries of the matrix B initialise damping factors initialise some guess f_hat_0 solve the system copy result finalise the plans and free the variables |
|
test program for various parameters < mpolar FFT size NxN < number of directions/offsets < number of knots of mpolar grid < knots and associated weights < number of iterations generate knots of mpolar grid load data direct polar FFT Test of the polar FFT with different m fast polar FFT compute error of fast polar FFT Test of the inverse polar FFT for different m in dependece of the iteration number inverse polar FFT compute maximum relative error free the variables |
|
discrete polar FFT < index for nodes and frequencies < plan for the nfft-2D < knots and associated weights < number of knots < oversampling factor sigma=2 < oversampling factor sigma=2 init two dimensional NFFT plan init nodes from polar grid init Fourier coefficients from given image NDFT-2D copy result finalise the plans and free the variables |
|
NFFT-based polar FFT. < index for nodes and freqencies < plan for the nfft-2D < knots and associated weights < number of knots < oversampling factor sigma=2 < oversampling factor sigma=2 init two dimensional NFFT plan init nodes from polar grid precompute psi, the entries of the matrix B init Fourier coefficients from given image NFFT-2D copy result finalise the plans and free the variables |
|
Generates the points
The nodes of the polar grid lie on concentric circles around the origin. They are given for
The total number of nodes is
Weights are introduced to compensate for local sampling density variations. For every point in the sampling set, we associate a small surrounding area. In case of the polar grid, we choose small ring segments. The area of such a ring segment around
The area of the small circle of radius return the number of knots |