|
Prev: The linf project (2)
Next: Sun F90 Question
From: Fatemeh on 23 Jun 2008 03:07 I'm looking for a subroutine of Fortran90 about "Fast Fourier Transform of a Step-function in 3-dimonsional." I read the related subroutines in Numerical Recipes Book, but I couldn't match it for a 3D step function. Whould you please let me to have access to a subroutine for mentioned goal? I don't know how I should match this subroutine between 3D step function and FFT. I'm anxiously looking forward your reply. Kind Regards, Fatemeh
From: glen herrmannsfeldt on 23 Jun 2008 05:26 Fatemeh wrote: > I'm looking for a subroutine of Fortran90 about "Fast Fourier > Transform of a Step-function in 3-dimonsional." > I read the related subroutines in Numerical Recipes Book, but I > couldn't match it for a 3D step function. > Whould you please let me to have access to a subroutine for mentioned > goal? I don't know how I should match this subroutine between 3D step > function and FFT. The Fourier transform is separable in rectangular coordinates. Does that help? -- glen
From: Damian on 24 Jun 2008 03:50 On Jun 23, 2:26 am, glen herrmannsfeldt <g...(a)ugcs.caltech.edu> wrote: > Fatemeh wrote: > > I'm looking for a subroutine of Fortran90 about "Fast Fourier > > Transform of a Step-function in 3-dimonsional." > > I read the related subroutines in Numerical Recipes Book, but I > > couldn't match it for a 3D step function. > > Whould you please let me to have access to a subroutine for mentioned > > goal? I don't know how I should match this subroutine between 3D step > > function and FFT. > > The Fourier transform is separable in rectangular coordinates. > > Does that help? > > -- glen This is more a question for a numerical analysis newsgroup such as sci.math.num-analysis since it's not Fortran-specific. (In fact, the latest edition of Numerical Recipes abandons Fortran altogether in favor of C++). Nonetheless, the short answer is that the appropriate Numerical Recipes Fortran 90 procedure is called "realft3" assuming your initial data is real. What is your intended application? If it is only to compute the FFT of step functions, that seems strange for at least two reasons: (1) the FFT of a step function in 1D can be written down by inspection and the transform of a 3D step function is separable into products of 1D step functions at least in rectangular coordinates as noted by the previous response to your post so it's not clear why you would want to compute it, and (2) step functions are discontinuous and aperiodic, so they are not well represented by Fourier transforms (particularly if one is interested in differentiating or interpolating the resulting series) unless you're planning to use windowing. Also, if you're working in 3D, there is a good chance you're working with large enough data sets for runtime performance to be important. While Numerical Recipes emphasizes clarity for instructive purposes, even the authors point out that other implementations tuned for specific hardware will invariably outperform their routines. Some of faster alternatives are freely available, e.g. FFTW (http:// www.fftw.org). Damian
|
Pages: 1 Prev: The linf project (2) Next: Sun F90 Question |