/*---------------------------------------------------------------------------------
  Title: UserFs.txt
  Purpose: Define F(s)
  Author: P. Kano, M. Brio
  Date: May 9, 2011
  
  Comment: 
  User defines the function Fs to invert here.
  F(s) Must be written in a way that it can be implemented in C/C++ or CUDA-C.
  This may require explicit definition of functions of complex variables.
  
  This function is included directly into the CUDA kernal wfnsampleFS.cu
  A device function for F(s) could also be used.
 ----------------------------------------------------------------------------------*/
  
   
  /*Example B: 
  F(s) = 1/sqrt(s*s+1)
  f(t) = J0(t)
  f(10) = -0.2459535764
  
  F(s) = [(1+x*x-y*y)^2 + (2*x*y)^2]^(-1/4) *exp(-0.5*arctan(2*x*y/(1+x*x-y*y)));
  sqrt(C) = sqrt(abs(C))*exp(i*0.5*angle(C))
  ------------------------------------------------------------------------------------------------------*/
  precReal Magnitude = (1.0 + s.x*s.x - s.y*s.y)*(1.0 + s.x*s.x - s.y*s.y) + (2.0*s.x*s.y)*(2.0*s.x*s.y);
  precReal Angle = -0.5*atan2(2.0*s.x*s.y, 1.0 + s.x*s.x - s.y*s.y);
  Magnitude = 1.0/sqrt(sqrt(Magnitude));
  Fs.x = Magnitude*cos(Angle);
  Fs.y = Magnitude*sin(Angle);
