51 nfft_init_2d(&my_plan,N,N,M);
53 fp=fopen(
"knots.dat",
"r");
57 fscanf(fp,
"%le %le ",&my_plan.
x[2*j+0],&my_plan.
x[2*j+1]);
61 fi=fopen(
"input_f.dat",
"r");
67 fscanf(fi,
"%le ",&real);
68 my_plan.
f_hat[(N*j+k)] = real;
73 nfft_precompute_psi(&my_plan);
79 fprintf(fk,
"%le %le %le %le\n",my_plan.
x[2*j+0],my_plan.
x[2*j+1],creal(my_plan.
f[j]),cimag(my_plan.
f[j]));
84 nfft_finalize(&my_plan);
87 int main(
int argc,
char **argv)
90 printf(
"usage: ./construct_data FILENAME N M\n");
94 construct(argv[1],atoi(argv[2]),atoi(argv[3]));
fftw_complex * f_hat
Vector of Fourier coefficients, size is N_total * sizeof( fftw_complex )
static void construct(char *file, int N, int M)
construct makes an 2d-nfft
fftw_complex * f
Vector of samples, size is M_total * sizeof( fftw_complex )
void nfft_trafo(nfft_plan *ths)
user routines
int M_total
Total number of samples.
Header file for utility functions used by the nfft3 library.
unsigned nfft_flags
Flags for precomputation, (de)allocation, and FFTW usage, default setting is PRE_PHI_HUT | PRE_PSI | ...
double * x
Nodes in time/spatial domain, size is doubles.