30 #define NSFTT_DISABLE_TEST
43 plan_1d->
x[j] = ths->
x[ths->
d * j + 1];
46 for(k0=0;k0<ths->
N[0];k0++)
54 omega = ((double)(k0 - ths->
N[0]/2)) * ths->
x[ths->
d * j + 0];
55 ths->
f[j] += plan_1d->
f[j] * cexp( - I*2*KPI*omega);
66 plan_1d->
x[j] = ths->
x[ths->
d * j + 1];
68 for(k0=0;k0<ths->N[0];k0++)
72 omega = ((double)(k0 - ths->
N[0]/2)) * ths->
x[ths->
d * j + 0];
73 plan_1d->
f[j] = ths->
f[j] * cexp( + _Complex_I*2*KPI*omega);
93 plan_1d->
x[j] = ths->
x[ths->
d * j + 2];
96 for(k0=0;k0<ths->
N[0];k0++)
97 for(k1=0;k1<ths->
N[1];k1++)
99 plan_1d->
f_hat = ths->
f_hat + (k0*ths->
N[1]+k1)*ths->
N[2];
105 omega = ((double)(k0 - ths->
N[0]/2)) * ths->
x[ths->
d * j + 0]
106 + ((
double)(k1 - ths->
N[1]/2)) * ths->
x[ths->
d * j + 1];
107 ths->
f[j] += plan_1d->
f[j] * cexp( - I*2*KPI*omega);
118 plan_1d->
x[j] = ths->
x[ths->
d * j + 2];
120 for(k0=0;k0<ths->N[0];k0++)
121 for(k1=0;k1<ths->
N[1];k1++)
125 omega = ((double)(k0 - ths->
N[0]/2)) * ths->
x[ths->
d * j + 0]
126 + ((
double)(k1 - ths->
N[1]/2)) * ths->
x[ths->
d * j + 1];
127 plan_1d->
f[j] = ths->
f[j] * cexp( + _Complex_I*2*KPI*omega);
130 plan_1d->
f_hat = ths->
f_hat + (k0*ths->
N[1]+k1)*ths->
N[2];
147 plan_2d->
x[2*j+0] = ths->
x[ths->
d * j + 1];
148 plan_2d->
x[2*j+1] = ths->
x[ths->
d * j + 2];
151 for(k0=0;k0<ths->
N[0];k0++)
159 omega = ((double)(k0 - ths->
N[0]/2)) * ths->
x[ths->
d * j + 0];
160 ths->
f[j] += plan_2d->
f[j] * cexp( - I*2*KPI*omega);
172 plan_2d->
x[2*j+0] = ths->
x[ths->
d * j + 1];
173 plan_2d->
x[2*j+1] = ths->
x[ths->
d * j + 2];
176 for(k0=0;k0<ths->
N[0];k0++)
180 omega = ((double)(k0 - ths->
N[0]/2)) * ths->
x[ths->
d * j + 0];
181 plan_2d->
f[j] = ths->
f[j] * cexp( + _Complex_I*2*KPI*omega);
193 static int index_sparse_to_full_direct_2d(
int J,
int k)
201 int i, o, a, b,s,l,m1,m2;
204 if (k>=(J+4)*
X(exp2i)(J+1))
213 i=k-4*((J+1)/2+1)*N_B;
314 static inline int index_sparse_to_full_2d(
nsfft_plan *ths,
int k)
317 if( k < ths->N_total)
323 #ifndef NSFTT_DISABLE_TEST
324 static int index_full_to_sparse_2d(
int J,
int k)
336 if ( (k1>=-(a/2)) && (k1<a/2) && (k2>=(-a/2)) && (k2<a/2) )
338 return(4*((J+1)/2+1)*N_B+(k1+a/2)*a+(k2+a/2));
341 for (r=0; r<=(J+1)/2; r++)
345 if ( (k1>=-(b/2)) && (k1<(b+1)/2) && (k2>=a) && (k2<2*a) )
348 return((4*r+0)*N_B+(k1+b/2)*a+(k2-a));
350 return((4*r+0)*N_B+(k2-a)*b+(k1+b/2));
352 else if ( (k1>=a) && (k1<2*a) && (k2>=-(b/2)) && (k2<(b+1)/2) )
355 return((4*r+1)*N_B+(k2+b/2)*a+(k1-a));
357 return((4*r+1)*N_B+(k1-a)*b+(k2+b/2));
359 else if ( (k1>=-(b/2)) && (k1<(b+1)/2) && (k2>=-2*a) && (k2<-a) )
362 return((4*r+2)*N_B+(k1+b/2)*a+(k2+2*a));
364 return((4*r+2)*N_B+(k2+2*a)*b+(k1+b/2));
366 else if ( (k1>=-2*a) && (k1<-a) && (k2>=-(b/2)) && (k2<(b+1)/2) )
369 return((4*r+3)*N_B+(k2+b/2)*a+(k1+2*a));
371 return((4*r+3)*N_B+(k1+2*a)*b+(k2+b/2));
380 static void init_index_sparse_to_full_2d(
nsfft_plan *ths)
384 for (k_S=0; k_S<ths->
N_total; k_S++)
390 static inline int index_sparse_to_full_3d(
nsfft_plan *ths,
int k)
393 if( k < ths->N_total)
400 #ifndef NSFTT_DISABLE_TEST
401 static int index_full_to_sparse_3d(
int J,
int k)
410 int k2=((k/N)%N)-N/2;
415 if((k1>=-(a/2)) && (k1<a/2) && (k2>=(-a/2)) && (k2<a/2) && (k3>=(-a/2)) &&
418 return(6*
X(exp2i)(J)*(
X(exp2i)((J+1)/2+1)-1)+((k1+a/2)*a+(k2+a/2))*a+
423 for (r=0; r<=(J+1)/2; r++)
431 if ((k1>=a) && (k1<2*a) && (k2>=-(b/2)) && (k2<(b+1)/2) &&
432 (k3>=-(b/2)) && (k3<(b+1)/2))
435 return sum_N_B_less_r+N_B_r*0 + ((k2+b/2)*b+k3+b/2)*a + (k1-a);
437 return sum_N_B_less_r+N_B_r*0 + ((k1-a)*b+(k2+b/2))*b + (k3+b/2);
439 else if ((k2>=a) && (k2<2*a) && (k1>=-(b/2)) && (k1<(b+1)/2) &&
440 (k3>=-(b/2)) && (k3<(b+1)/2))
443 return sum_N_B_less_r+N_B_r*1 + ((k1+b/2)*b+k3+b/2)*a + (k2-a);
445 return sum_N_B_less_r+N_B_r*1 + ((k1+b/2)*b+(k2-a))*a + (k3+b/2);
447 return sum_N_B_less_r+N_B_r*1 + ((k2-a)*b+(k1+b/2))*b + (k3+b/2);
449 else if ((k3>=a) && (k3<2*a) && (k1>=-(b/2)) && (k1<(b+1)/2) &&
450 (k2>=-(b/2)) && (k2<(b+1)/2))
453 return sum_N_B_less_r+N_B_r*2 + ((k1+b/2)*b+k2+b/2)*a + (k3-a);
455 return sum_N_B_less_r+N_B_r*2 + ((k3-a)*b+(k1+b/2))*b + (k2+b/2);
458 else if ((k1>=-2*a) && (k1<-a) && (k2>=-(b/2)) && (k2<(b+1)/2) &&
459 (k3>=-(b/2)) && (k3<(b+1)/2))
462 return sum_N_B_less_r+N_B_r*3 + ((k2+b/2)*b+k3+b/2)*a + (k1+2*a);
464 return sum_N_B_less_r+N_B_r*3 + ((k1+2*a)*b+(k2+b/2))*b + (k3+b/2);
466 else if ((k2>=-2*a) && (k2<-a) && (k1>=-(b/2)) && (k1<(b+1)/2) &&
467 (k3>=-(b/2)) && (k3<(b+1)/2))
470 return sum_N_B_less_r+N_B_r*4 + ((k1+b/2)*b+k3+b/2)*a + (k2+2*a);
472 return sum_N_B_less_r+N_B_r*4 + ((k1+b/2)*b+(k2+2*a))*a + (k3+b/2);
474 return sum_N_B_less_r+N_B_r*4 + ((k2+2*a)*b+(k1+b/2))*b + (k3+b/2);
476 else if ((k3>=-2*a) && (k3<-a) && (k1>=-(b/2)) && (k1<(b+1)/2) &&
477 (k2>=-(b/2)) && (k2<(b+1)/2))
480 return sum_N_B_less_r+N_B_r*5 + ((k1+b/2)*b+k2+b/2)*a + (k3+2*a);
482 return sum_N_B_less_r+N_B_r*5 + ((k3+2*a)*b+(k1+b/2))*b + (k2+b/2);
485 sum_N_B_less_r+=6*N_B_r;
493 static void init_index_sparse_to_full_3d(
nsfft_plan *ths)
497 int N=
X(exp2i)(ths->
J+2);
500 for (k_s=0, r=0; r<=(ths->
J+1)/2; r++)
502 a=
X(exp2i)(ths->
J-r);
509 for(k2=-b/2;k2<(b+1)/2;k2++)
510 for(k3=-b/2;k3<(b+1)/2;k3++)
511 for(k1=a; k1<2*a; k1++,k_s++)
514 for(k1=a; k1<2*a; k1++)
515 for(k2=-b/2;k2<(b+1)/2;k2++)
516 for(k3=-b/2;k3<(b+1)/2;k3++,k_s++)
521 for(k1=-b/2;k1<(b+1)/2;k1++)
522 for(k3=-b/2;k3<(b+1)/2;k3++)
523 for(k2=a; k2<2*a; k2++,k_s++)
526 for(k1=-b/2;k1<(b+1)/2;k1++)
527 for(k2=a; k2<2*a; k2++)
528 for(k3=-b/2;k3<(b+1)/2;k3++,k_s++)
531 for(k2=a; k2<2*a; k2++)
532 for(k1=-b/2;k1<(b+1)/2;k1++)
533 for(k3=-b/2;k3<(b+1)/2;k3++,k_s++)
538 for(k1=-b/2;k1<(b+1)/2;k1++)
539 for(k2=-b/2;k2<(b+1)/2;k2++)
540 for(k3=a; k3<2*a; k3++,k_s++)
543 for(k3=a; k3<2*a; k3++)
544 for(k1=-b/2;k1<(b+1)/2;k1++)
545 for(k2=-b/2;k2<(b+1)/2;k2++,k_s++)
550 for(k2=-b/2;k2<(b+1)/2;k2++)
551 for(k3=-b/2;k3<(b+1)/2;k3++)
552 for(k1=-2*a; k1<-a; k1++,k_s++)
555 for(k1=-2*a; k1<-a; k1++)
556 for(k2=-b/2;k2<(b+1)/2;k2++)
557 for(k3=-b/2;k3<(b+1)/2;k3++,k_s++)
562 for(k1=-b/2;k1<(b+1)/2;k1++)
563 for(k3=-b/2;k3<(b+1)/2;k3++)
564 for(k2=-2*a; k2<-a; k2++,k_s++)
567 for(k1=-b/2;k1<(b+1)/2;k1++)
568 for(k2=-2*a; k2<-a; k2++)
569 for(k3=-b/2;k3<(b+1)/2;k3++,k_s++)
572 for(k2=-2*a; k2<-a; k2++)
573 for(k1=-b/2;k1<(b+1)/2;k1++)
574 for(k3=-b/2;k3<(b+1)/2;k3++,k_s++)
579 for(k1=-b/2;k1<(b+1)/2;k1++)
580 for(k2=-b/2;k2<(b+1)/2;k2++)
581 for(k3=-2*a; k3<-a; k3++,k_s++)
584 for(k3=-2*a; k3<-a; k3++)
585 for(k1=-b/2;k1<(b+1)/2;k1++)
586 for(k2=-b/2;k2<(b+1)/2;k2++,k_s++)
591 for(k1=-Nc/2;k1<Nc/2;k1++)
592 for(k2=-Nc/2;k2<Nc/2;k2++)
593 for(k3=-Nc/2; k3<Nc/2; k3++,k_s++)
604 memset(ths_full_plan->
f_hat, 0, ths_full_plan->
N_total*
sizeof(
double _Complex));
614 #ifndef NSFTT_DISABLE_TEST
622 const int N=ths_full_plan->
N[0];
623 const int N_B=
X(exp2i)(J);
629 printf(
"f_hat blockwise\n");
630 for (r=0; r<=(J+1)/2; r++){
631 a=
X(exp2i)(J-r); b=
X(exp2i)(r);
634 for (k1=0; k1<a; k1++){
635 for (k2=0; k2<b; k2++){
636 printf(
"(%1.1f,%1.1f) ", creal(ths->
f_hat[(4*r+1)*N_B+ k1*b+k2]),
637 cimag(ths->
f_hat[(4*r+1)*N_B+ k1*b+k2]));
643 for (k1=0; k1<a; k1++){
644 for (k2=0; k2<b; k2++){
645 printf(
"(%1.1f,%1.1f) ", creal(ths->
f_hat[(4*r+3)*N_B+ k1*b+k2]),
646 cimag(ths->
f_hat[(4*r+3)*N_B+ k1*b+k2]));
652 for (k2=0; k2<b; k2++){
653 for (k1=0; k1<a; k1++){
654 printf(
"(%1.1f,%1.1f) ", creal(ths->
f_hat[(4*r+0)*N_B+ k2*a+k1]),
655 cimag(ths->
f_hat[(4*r+0)*N_B+ k2*a+k1]));
661 for (k2=0; k2<b; k2++){
662 for (k1=0; k1<a; k1++){
663 printf(
"(%1.1f,%1.1f) ", creal(ths->
f_hat[(4*r+2)*N_B+ k2*a+k1]),
664 cimag(ths->
f_hat[(4*r+2)*N_B+ k2*a+k1]));
672 printf(
"full f_hat\n");
673 for (k1=0;k1<N;k1++){
674 for (k2=0;k2<N;k2++){
675 printf(
"(%1.1f,%1.1f) ", creal(ths_full_plan->
f_hat[k1*N+k2]),
676 cimag(ths_full_plan->
f_hat[k1*N+k2]));
683 #ifndef NSFTT_DISABLE_TEST
684 static void test_sparse_to_full_2d(
nsfft_plan* ths)
687 int N=
X(exp2i)(ths->
J+2);
689 printf(
"N=%d\n\n",N);
694 k_S=index_full_to_sparse_2d(ths->
J, k1*N+k2);
696 printf(
"(%+d, %+d)\t= %+d \t= %+d = %+d \n",k1-N/2,k2-N/2,
702 #ifndef NSFTT_DISABLE_TEST
703 static void test_sparse_to_full_3d(
nsfft_plan* ths)
706 int N=
X(exp2i)(ths->
J+2);
708 printf(
"N=%d\n\n",N);
714 k_S=index_full_to_sparse_3d(ths->
J, (k1*N+k2)*N+k3);
716 printf(
"(%d, %d, %d)\t= %d \t= %d = %d \n",k1-N/2,k2-N/2,k3-N/2,
764 int N=
X(exp2i)(ths->
J+2);
766 memset(ths->
f,0,ths->
M_total*
sizeof(
double _Complex));
768 for(k_S=0;k_S<ths->
N_total;k_S++)
779 ths->
f[j] += ths->
f_hat[k_S] * cexp( - I*2*KPI*omega);
788 int N=
X(exp2i)(ths->
J+2);
791 memset(ths->
f,0,ths->
M_total*
sizeof(
double _Complex));
793 for(k_S=0;k_S<ths->
N_total;k_S++)
807 ths->
f[j] += ths->
f_hat[k_S] * cexp( - I*2*KPI*omega);
824 int N=
X(exp2i)(ths->
J+2);
826 memset(ths->
f_hat,0,ths->
N_total*
sizeof(
double _Complex));
828 for(k_S=0;k_S<ths->
N_total;k_S++)
839 ths->
f_hat[k_S] += ths->
f[j] * cexp( + _Complex_I*2*KPI*omega);
848 int N=
X(exp2i)(ths->
J+2);
851 memset(ths->
f_hat,0,ths->
N_total*
sizeof(
double _Complex));
853 for(k_S=0;k_S<ths->
N_total;k_S++)
867 ths->
f_hat[k_S] += ths->
f[j] * cexp( + _Complex_I*2*KPI*omega);
875 nsdft_adjoint_2d(ths);
877 nsdft_adjoint_3d(ths);
899 for(rr=0;rr<=(J+1)/2;rr++)
908 temp=-3.0*KPI*
X(exp2i)(J-rr);
934 if((r==rr)&&(J-rr!=rr))
945 if((r==rr)&&(J-rr!=rr))
976 if((r==rr)&&(J-rr!=rr))
987 if((r==rr)&&(J-rr!=rr))
1015 for(rr=0;rr<=(J+1)/2;rr++)
1024 temp=-3.0*KPI*
X(exp2i)(J-rr);
1054 if((r==rr)&&(J-rr!=rr))
1065 if((r==rr)&&(J-rr!=rr))
1096 if((r==rr)&&(J-rr!=rr))
1107 if((r==rr)&&(J-rr!=rr))
1116 int sum_N_B_less_r,N_B_r,a,b;
1133 for(rr=0;rr<=(J+1)/2;rr++)
1141 ths->
act_nfft_plan->my_fftw_plan1 = ths->set_fftw_plan1[rr];
1159 if((J==0)||((J==1)&&(rr==1)))
1162 temp=-3.0*KPI*
X(exp2i)(J-rr);
1241 if((J==0)||((J==1)&&(rr==1)))
1244 temp=-3.0*KPI*
X(exp2i)(J-rr);
1322 sum_N_B_less_r+=6*N_B_r;
1326 static void nsfft_adjoint_3d(
nsfft_plan *ths)
1330 int sum_N_B_less_r,N_B_r,a,b;
1347 for(rr=0;rr<=(J+1)/2;rr++)
1355 ths->
act_nfft_plan->my_fftw_plan1 = ths->set_fftw_plan1[rr];
1356 ths->
act_nfft_plan->my_fftw_plan2 = ths->set_fftw_plan2[rr];
1374 if((J==0)||((J==1)&&(rr==1)))
1377 temp=-3.0*KPI*
X(exp2i)(J-rr);
1456 if((J==0)||((J==1)&&(rr==1)))
1459 temp=-3.0*KPI*
X(exp2i)(J-rr);
1537 sum_N_B_less_r+=6*N_B_r;
1544 nsfft_trafo_2d(ths);
1546 nsfft_trafo_3d(ths);
1552 nsfft_adjoint_2d(ths);
1554 nsfft_adjoint_3d(ths);
1561 static void nsfft_init_2d(
nsfft_plan *ths,
int J,
int M,
int m,
unsigned snfft_flags)
1567 ths->
flags=snfft_flags;
1574 ths->
f = (
double _Complex *)
nfft_malloc(M*
sizeof(
double _Complex));
1581 ths->set_fftw_plan1=(fftw_plan*)
nfft_malloc((J/2+1)*
sizeof(fftw_plan));
1582 ths->set_fftw_plan2=(fftw_plan*)
nfft_malloc((J/2+1)*
sizeof(fftw_plan));
1588 N[0]=1; n[0]=ths->
sigma*N[0];
1589 N[1]=
X(exp2i)(J); n[1]=ths->
sigma*N[1];
1601 N[0]=
X(exp2i)(r); n[0]=ths->
sigma*N[0];
1602 N[1]=
X(exp2i)(J-r); n[1]=ths->
sigma*N[1];
1603 ths->set_fftw_plan1[r] =
1607 ths->set_fftw_plan2[r] =
1613 for(r=0;r<=
X(log2i)(m);r++)
1615 N[0]=
X(exp2i)(J-r); n[0]=ths->
sigma*N[0];
1625 N[0]=
X(exp2i)(J/2+1); n[0]=ths->
sigma*N[0];
1626 N[1]=
X(exp2i)(J/2+1); n[1]=ths->
sigma*N[1];
1638 init_index_sparse_to_full_2d(ths);
1646 static void nsfft_init_3d(
nsfft_plan *ths,
int J,
int M,
int m,
unsigned snfft_flags)
1652 ths->
flags=snfft_flags;
1656 ths->
N_total=6*
X(exp2i)(J)*(
X(exp2i)((J+1)/2+1)-1)+
X(exp2i)(3*(J/2+1));
1659 ths->
f = (
double _Complex *)
nfft_malloc(M*
sizeof(
double _Complex));
1662 ths->x_102= (
double*)
nfft_malloc(3*M*
sizeof(
double));
1663 ths->x_201= (
double*)
nfft_malloc(3*M*
sizeof(
double));
1664 ths->x_120= (
double*)
nfft_malloc(3*M*
sizeof(
double));
1670 ths->set_fftw_plan1=(fftw_plan*)
nfft_malloc(((J+1)/2+1)*
sizeof(fftw_plan));
1671 ths->set_fftw_plan2=(fftw_plan*)
nfft_malloc(((J+1)/2+1)*
sizeof(fftw_plan));
1678 N[0]=1; n[0]=ths->
sigma*N[0];
1679 N[1]=1; n[1]=ths->
sigma*N[1];
1680 N[2]=
X(exp2i)(J); n[2]=ths->
sigma*N[2];
1701 for(rr=1;rr<=(J+1)/2;rr++)
1708 n[0]=ths->
sigma*
X(exp2i)(r);
1710 n[1]=ths->
sigma*
X(exp2i)(J-r);
1712 n[1]=ths->
sigma*
X(exp2i)(r);
1713 n[2]=ths->
sigma*
X(exp2i)(J-r);
1715 ths->set_fftw_plan1[rr] =
1718 ths->set_fftw_plan2[rr] =
1724 for(r=0;r<=
X(log2i)(m);r++)
1726 N[0]=
X(exp2i)(J-r); n[0]=ths->
sigma*N[0];
1727 N[1]=
X(exp2i)(J-r); n[1]=ths->
sigma*N[1];
1744 N[0]=
X(exp2i)(J/2+1); n[0]=ths->
sigma*N[0];
1745 N[1]=
X(exp2i)(J/2+1); n[1]=ths->
sigma*N[1];
1746 N[2]=
X(exp2i)(J/2+1); n[2]=ths->
sigma*N[2];
1758 init_index_sparse_to_full_3d(ths);
1769 nsfft_init_2d(ths, J, M, m, flags);
1771 nsfft_init_3d(ths, J, M, m, flags);
1787 "\nError in kernel/nsfft_init: require GAUSSIAN window function\n");
1791 static void nsfft_finalize_2d(
nsfft_plan *ths)
1814 for(r=1;r<=ths->
J/2;r++)
1816 fftw_destroy_plan(ths->set_fftw_plan2[r]);
1817 fftw_destroy_plan(ths->set_fftw_plan1[r]);
1834 static void nsfft_finalize_3d(
nsfft_plan *ths)
1861 for(r=1;r<=(ths->
J+1)/2;r++)
1863 fftw_destroy_plan(ths->set_fftw_plan2[r]);
1864 fftw_destroy_plan(ths->set_fftw_plan1[r]);
1888 nsfft_finalize_2d(ths);
1890 nsfft_finalize_3d(ths);
fftw_complex * f_hat
Fourier coefficients.
NFFT_INT d
Dimension (rank).
int d
dimension, rank; d = 2, 3
unsigned flags
flags for precomputation, malloc
NFFT_INT * n
Length of FFTW transforms.
int sigma
oversampling-factor
NFFT_INT N_total
Total number of Fourier coefficients.
double * x_021
coordinate exchanged nodes, d=3
void nfft_vrand_shifted_unit_double(double *x, const NFFT_INT n)
Inits a vector of random double numbers in .
nfft_plan * set_nfft_plan_2d
nfft plans for short nffts
fftw_complex * g1
Input of fftw.
void nfft_adjoint(nfft_plan *ths)
void nsfft_init(nsfft_plan *ths, int d, int J, int M, int m, unsigned flags)
nfft_plan * center_nfft_plan
central nfft block
NFFT_INT M_total
Total number of samples.
data structure for an NFFT (nonequispaced fast Fourier transform) plan with double precision ...
void nfft_vrand_unit_complex(fftw_complex *x, const NFFT_INT n)
Inits a vector of random complex numbers in .
nfft_plan * set_nfft_plan_1d
nfft plans for short nffts
NFFT_INT N_total
Total number of Fourier coefficients.
void nsfft_cp(nsfft_plan *ths, nfft_plan *ths_full_plan)
int * index_sparse_to_full
index conversation, overflow for d=3, J=9!
NFFT_INT M_total
Total number of samples.
#define X(name)
Include header for C99 complex datatype.
#define RSWAP(x, y)
Swap two vectors.
#define UNUSED(x)
Dummy use of unused parameters to silence compiler warnings.
void nfft_trafo(nfft_plan *ths)
NFFT_INT n_total
Combined total length of FFTW transforms.
NFFT_INT K
Number of equispaced samples of window function.
void * nfft_malloc(size_t n)
double * x_transposed
coordinate exchanged nodes, d = 2
void nfft_finalize(nfft_plan *ths)
void nfft_precompute_one_psi(nfft_plan *ths)
void(* mv_adjoint)(void *)
Adjoint transform.
int J
problem size, i.e., d=2: N_total=(J+4) 2^(J+1) d=3: N_total=2^J 6(2^((J+1)/2+1)-1)+2^(3(J/2+1)) ...
void nsfft_init_random_nodes_coeffs(nsfft_plan *ths)
double * psi
Precomputed data for the sparse matrix , size depends on precomputation scheme.
void(* mv_trafo)(void *)
Transform.
void nsfft_adjoint(nsfft_plan *ths)
Header file for the nfft3 library.
double * x
Nodes in time/spatial domain, size is doubles.
void nsfft_finalize(nsfft_plan *ths)
NFFT_INT * N
Multi-bandwidth.
unsigned flags
Flags for precomputation, (de)allocation, and FFTW usage, default setting is PRE_PHI_HUT | PRE_PSI | ...
fftw_complex * g2
Output of fftw.
unsigned fftw_flags
Flags for the FFTW, default is FFTW_ESTIMATE | FFTW_DESTROY_INPUT.
void nsfft_trafo(nsfft_plan *ths)
data structure for an NSFFT (nonequispaced sparse fast Fourier transform) plan with double precision ...
nfft_plan * act_nfft_plan
current nfft block
fftw_complex * f_hat
Fourier coefficients.
NFFT_INT m
Cut-off parameter for window function.