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

Home » Public Forums » archive » IDL FFT (spec -> interferogram)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
IDL FFT (spec -> interferogram) [message #30034] Thu, 04 April 2002 07:27 Go to previous message
Randall Skelton is currently offline  Randall Skelton
Messages: 169
Registered: October 2000
Senior Member
Hi all,

Having read through all of the FFT posts that google groups keeps, I am no
closer to understanding why I am unable to transform a spectrum into an
interferogram using IDL. All of the data files, procedures, and pictures
of this are at http://tulip.atm.ox.ac.uk/~rhskelto/fft-help/

Given two files:

1) 'spec.dat' contains 512 points of complex spectral data

2) 'igm.dat' contains 512 points of complex interferogram data that was
derived from 'spec.dat' using a prime factor FFT written in C. This is
the correct interferogram as far as I am concerned. The plot

Read in the data:

IDL> spec = dcomplexarr(512)
IDL> read_cmplx, 'spec.dat', spec
IDL> igm = dcomplexarr(512)
IDL> read_cmplx, 'igm.dat', igm

Plot the expected result:

IDL> plot, igm
IDL> write_jpeg,'igm.jpg',tvrd()

Do the Fourier Transform in IDL (based on Paul van Delst's examples):

IDL> spec2 = temporary( [ spec, reverse( spec[ 1: n_elements(spec) - 2 ] ) ] )
IDL> idl_igm = fft(temporary(spec2), /double, /inverse)
IDL> idl_igm = shift(idl_igm, -1 * (n_elements(spec)-1))

Plot the IDL result:

IDL> plot, idl_igm
IDL> write_jpeg, 'idl_igm.jpg', tvrd()


The result 'idl_igm' contains twice the number of points (minus 2)
because of the required reflection about the Nyquist frequency.
Moreover, the result appears to be modulated (almost like a frequency
chirp)? I recall having a similar problem with a 2pi phase-wrapping in
MathCad a number of years ago that gave similar results but I cannot
remember how to fix it. I also cannot seem to reproduce the AIRS
interferograms shown on Paul's site...

My question is, how do I get the desired result (i.e. 'igm.jpg') in IDL?

Cheers,
Randall

IDL Version 5.3, Linux RH 7.1
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Code code code
Next Topic: Alpha Blending

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

Current Time: Wed Oct 08 15:23:15 PDT 2025

Total time taken to generate the page: 0.00445 seconds