Inverse Fourier Transform

I am performing fft on my AT-TPC data. I have done the inverse fourier transform but the problem is that the orignal and the fft transform fits perfectly well in the middle but not on the boundaries. Anyone has an idea what to do about that?

Welcome to the ROOT forum.

Maybe a script reproducing the issue might help.
@moneta will know how to help you.

Thank you very much for your response but how do I contact @moneta?

He will contact you by the forum.

Please I want to declare a function and call the function in my main code. I keep on getting this error ·

  error: called object type 'Float_t' (aka 'float') is not a function or function pointer k1 = f1(xo,y0);

Below is my code. Can anyone help me with the error? Thank You

Float_t f1;
//declaration of the function.
void  f(Float_t x, Float_t y){


        f1 = 3*x*x*y;
        return f1;
}
//solving in the runge

void runge(){
        Float_t xo,yo,xn,yn;
        Float_t k1,k2,k3,k4,h,t;
        Int_t n ;

//solving in the runge kutta. 

//      f2 = yn+h*t(xn,yn,h);
        std::cout << "ENTER INITIAL VALUES"<<std::endl;
        std::cout << "xo" << " "<< std::endl; 
        std::cin >> xo;
        std::cout << "yo" << " "<<std::endl;
        std::cin>>yo;
        std::cout << "Enter the number of  steps" <<" "<<std::endl;
        std::cin >> n;
        std::cout<<"Enter step height h" << " "<<std::endl;
        std::cin >> h;

        for(Int_t i=0;i <n;  i++){
                k1 = f1(xo,y0);




The code you posted is not complete. Is it really your code? it looks like there is something missing: the function runge has no closing curly bracket nor the for loop on i. Can you paste the complete code and I will look at it?

Here is my code.

using namespace std;

Float_t f1;
//declaration of the function.
void  f (Float_t x, Float_t y){


        f1 = 3*x*x*y;
        return f1;
        }
//solving in the runge

void runge(){
        Float_t xo,yo,xn,yn;
        Float_t k1,k2,k3,k4,h,t;
        Int_t n ;

//solving in the runge kutta. 

//      f2 = yn+h*t(xn,yn,h);
        std::cout << "ENTER INITIAL VALUES"<<std::endl;
        std::cout << "xo" << " "<< std::endl; 
        std::cin >> xo;
        std::cout << "yo" << " "<<std::endl;
        std::cin>>yo;
        std::cout << "Enter the number of  steps" <<" "<<std::endl;
        std::cin >> n;
        std::cout<<"Enter step height h" << " "<<std::endl;
        std::cin >> h;

        for(Int_t i=0;i <n;  i++){
                k1 = f1(xo,y0);
                std::cout << k1;

        }


        return 0;

}

There were several mistakes. Here is the corrected code:

using namespace std;

//declaration of the function.
Float_t  f (Float_t x, Float_t y){
   Float_t f1;
   f1 = 3*x*x*y;
   return f1;
}

void runge(){
   Float_t xo,yo,xn,yn;
   Float_t k1,k2,k3,k4,h,t;
   Int_t n ;

   //solving in the runge kutta.
   std::cout << "ENTER INITIAL VALUES"<<std::endl;
   std::cout << "xo" << " "<< std::endl;
   std::cin >> xo;
   std::cout << "yo" << " "<<std::endl;
   std::cin>>yo;
   std::cout << "Enter the number of  steps" <<" "<<std::endl;
   std::cin >> n;
   std::cout<<"Enter step height h" << " "<<std::endl;
   std::cin >> h;

   for(Int_t i=0;i <n;  i++){
      k1 = f(xo,yo);
      std::cout << k1 << endl;
   }
}

Thank you very much it worked.

Note, as your code is written, the for loop is useless because k1 has always the same value.

Yes I know. I was checking if my function was right. Thank You.

1 Like