Simple usage
The usage of the library is as simple as shown here (taken from example/simple_test/simple_test.c).
nfft_plan my_plan;
nfft_init_1d(&my_plan,12,19);
for(j=0;j<my_plan.M;j++)
my_plan.x[j]=((double)rand())/RAND_MAX-0.5;
if(my_plan.nfft_flags & PRE_PSI)
nfft_precompute_psi(&my_plan);
for(k=0;k<my_plan.N_L;k++)
{
my_plan.f_hat[k][0]=((double)rand())/RAND_MAX;
my_plan.f_hat[k][1]=((double)rand())/RAND_MAX;
}
nfft_trafo(&my_plan);
nfft_finalize(&my_plan);
Reconstruction of a glacier
An example for the inverse NFFT can be found in example/glacier/glacier.c (the dataset can be found
here, the visualisation needs MatLab).