[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*Subject*: Re: Reverse FFT ?*From*: Craig Markwardt <craigmnet(at)cow.physics.wisc.edu>*Date*: 08 Aug 2000 18:21:55 -0500*Newsgroups*: comp.lang.idl-pvwave*Organization*: U. Wisc. Madison Physics -- Compact Objects*References*: <8mpv4l$rtl$1@canopus.cc.umanitoba.ca>*Reply-To*: craigmnet(at)cow.physics.wisc.edu*Xref*: news.doit.wisc.edu comp.lang.idl-pvwave:20726

"Richard Tyc" <richt@sbrc.umanitoba.ca> writes: > Can you do a reverse FFT in IDL and how is it implemented ? > ie. FFT provides a complex array - How do you get the original Time domain > back from the complex series. > > I am trying to retrieve "k" space data back from real/imaginary MRI data. I > would like to see how time consuming this really is. The direction of the FFT is controlled by the sign of the second argument to the FFT() function call. You can verify that you have recovered the original signal by the following example: yt1 = randomn(seed,256) ;; Original signal yf = fft(yt1, +1) ;; Transformed signal yt2 = fft(yf, -1) ;; Transformed-transformed signal Formally, the values of YT1 (the original signal) and YT2 (the transformed-untransformed signal) should be identical. Let's check that: plot, abs(yt1-yt2) The residuals are very close to zero. Two things are noteworthy. First, YT2 is always going to be COMPLEX rather than float. This is because the FFT is by definition a complex algorithm. Still, the recovered signal should be *primarily* real. Which gets to the second point. You won't ever fully recover the original signal since there is some round-off error. That's why the residuals are non-zero (and even complex). I believe that Liam Gumley has a web page on the numerical accuracy of FFT's. Craig -- -------------------------------------------------------------------------- Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response --------------------------------------------------------------------------

**References**:**Reverse FFT ?***From:*Richard Tyc

- Prev by Date:
**Re: Reading in text data** - Next by Date:
**Splitting JPEG files into RGB components** - Prev by thread:
**Reverse FFT ?** - Next by thread:
**Re: Reverse FFT ?** - Index(es):