diff --git a/RECFFT.cc b/RECFFT.cc index 37b18a39797a6f599539c6564346b1d3c46d2b22..b99d1c2522f02d9525157a778d493bd93b794b27 100644 --- a/RECFFT.cc +++ b/RECFFT.cc @@ -19,7 +19,7 @@ std::vector<std::complex<double>> fftrec(std::vector<std::complex<double>> f,int { for(int i=0; i <= NN-1; i++) { - fftv[i] = f[0]+std::pow(w,-NN/2+i)*f[2]; + fftv[i] = f[0]+std::pow(w,i)*f[1]; } } else @@ -41,7 +41,7 @@ std::vector<std::complex<double>> fftrec(std::vector<std::complex<double>> f,int std::vector<std::complex<double>> b2 = fftrec(b1,NN,fftv,flag); for(int k = 0; k <= NN-1; k++) { - fftv[k] = a2[k] + b2[k]*std::pow(w,k-NN/2.0); + fftv[k] = a2[k] + b2[k]*std::pow(w,k); } } return fftv; @@ -71,6 +71,11 @@ int main() std::vector<std::complex<double>> transf = fftrec(inputVector,n,fftv1,-1); std::vector<std::complex<double>> invTransf = fftrec(transf,n,fftv2,1); // ----------------------------------------------------------------------------- + for(int i=0;i<n;i++) + { + invTransf[i]=invTransf[i]*1.0/16.0; + } + call.printToFile(invTransf,outFile,n); std::cout<<"RECFFT done"<<'\n'; diff --git a/a.out b/a.out index 80da0fc4c490fb90190f21fd6e4d7a816097cc4d..00fb7428a524c7636434375783199f11e56b4c47 100755 Binary files a/a.out and b/a.out differ diff --git a/inversSinusRECFFT.txt b/inversSinusRECFFT.txt index bac523b0fbb4e856e7d1874a9287822625bafb49..2e66b7dc2863ad05e8493f3d3e940ddda14e6fdd 100644 --- a/inversSinusRECFFT.txt +++ b/inversSinusRECFFT.txt @@ -1,16 +1,16 @@ --0.6806533169,-2.1294354386 --0.1269205667,-0.7429836014 --0.6806533169,-0.2032087431 --0.1269205667,-0.5181073468 --0.6806533169,0.3420809383 --0.1269205667,-0.5126149384 --0.6806533169,1.0322190424 --0.1269205667,-0.7996013102 --0.6806533169,3.9315113747 --6.8586884451,-3.2520124213 -6.5937260977,-4.5170493085 --1.2558806312,8.7942247812 --6.7350732794,-5.8063964610 -7.5444736306,-1.0391267346 --2.9159773025,7.3502785957 --5.3828133564,-1.9297784284 +0.0000000000,-0.0000000000 +0.8414709848,-0.0000000000 +0.9092974268,0.0000000000 +0.1411200081,0.0000000000 +-0.7568024953,0.0000000000 +-0.9589242747,0.0000000000 +-0.2794154982,-0.0000000000 +0.6569865987,-0.0000000000 +0.9893582466,-0.0000000000 +0.4121184852,-0.0000000000 +-0.5440211109,-0.0000000000 +-0.9999902066,0.0000000000 +-0.5365729180,0.0000000000 +0.4201670368,0.0000000000 +0.9906073557,0.0000000000 +0.6502878402,-0.0000000000