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

Home » Public Forums » archive » Re: Recombining Real and Imaginary parts of FT in IDL?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Recombining Real and Imaginary parts of FT in IDL? [message #65941] Tue, 31 March 2009 12:45
R.G. Stockwell is currently offline  R.G. Stockwell
Messages: 363
Registered: July 1999
Senior Member
<robparker23@googlemail.com> wrote in message
news:2ac3c5ce-a28d-41a3-bd83-b93a16cef84a@j8g2000yql.googleg roups.com...
> Hi all,
>
> I think this may be quite simple but I just can't figure it out.
>
> I have some fourier transform spectral data which contains both the
> real and imaginary parts of the spectra and want to recombine them to
> get the final spectra.
>
> Is there a simple way to do this in IDL? All of the spectral data I've
> examined in IDL before has been the final recombined spectra and not
> separated in this way.
>
> Cheers

I'm not sure what you mean. Do you want the power spectrum from
the real and imag parts? just do
for amplitude spectrum:
pow = abs(compspe)
for power spectrum
pow = abs(compspe)^2

or if you have two arrays, one for real part and one for imaginary part,
then just do
pow = abs(complex(real,imag))^2

or
pow = real^2 + imag^2

cheers,
bob
Re: Recombining Real and Imaginary parts of FT in IDL? [message #65944 is a reply to message #65941] Tue, 31 March 2009 10:55 Go to previous message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article
<2ac3c5ce-a28d-41a3-bd83-b93a16cef84a@j8g2000yql.googlegroups.com>,
robparker23@googlemail.com wrote:

> Hi all,
>
> I think this may be quite simple but I just can't figure it out.
>
> I have some fourier transform spectral data which contains both the
> real and imaginary parts of the spectra and want to recombine them to
> get the final spectra.
>
> Is there a simple way to do this in IDL? All of the spectral data I've
> examined in IDL before has been the final recombined spectra and not
> separated in this way.
>
> Cheers

You might want to look at the chapter on FFTs in my book,
An Introduction to Programming with IDL. There are examples
to illustrate how the complex FFT works.

Ken Bowman
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: circles on the sky
Next Topic: skip_lun question

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

Current Time: Wed Oct 08 13:33:45 PDT 2025

Total time taken to generate the page: 0.00547 seconds