I am trying to use the subroutine twofft
which in turn uses subroutine four1
in the book(Numerical Recipes in Fortran) to compute the FFT of two double precision data arrays. If you carefully look at the twofft
routine, the arrays fft1
and fft2
are declared as complex which are sent as arguments to four1
which declares the same two arrays as double precision( or real if you are using the real version).
Is this allowed? I am unable to obtain the correct FFT for my data. Any suggestion how to get around this problem? I just want to perform a quick FFT and a deconvolution and not have to go through the entire process of understanding the code.