comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Reverse FFT ?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Reverse FFT ? [message #21097 is a reply to message #21082] Tue, 08 August 2000 00:00 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
"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
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: A[X,Y,Z] -> A[Z,X,Y]
Next Topic: Re: Reading in text data

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Dec 03 16:40:40 PST 2025

Total time taken to generate the page: 2.23784 seconds