Re: Recombining Real and Imaginary parts of FT in IDL? [message #65941] |
Tue, 31 March 2009 12:45 |
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
|
|
|
|