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

Home » Public Forums » archive » Re: IDL EPA Exam Test Question
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: IDL EPA Exam Test Question [message #21537] Thu, 31 August 2000 00:00
Struan Gray is currently offline  Struan Gray
Messages: 178
Registered: December 1995
Senior Member
David Fanning, davidf@dfanning.com writes:

> The Exam Committee chairman has run off with the
> secretary over in the Bookstore and no one seems to
> know when he is coming back. So I've been asked to
> get a couple of exam questions together.

Hmmm. Now we all know the answer you're going to have to think of
a better one. Actually, you already have. A standard goat-from-sheep
sort algorithm is to ask the interviewee what they would ask if they
were the interviewer. You've already done that. Game over.

Thing is. Did you know I knew you knew I know?


Struan
Re: IDL EPA Exam Test Question [message #21552 is a reply to message #21537] Wed, 30 August 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Craig Markwardt (craigmnet@cow.physics.wisc.edu) writes:

> When you take the FFT of an image the meaning of coordinate axes
> change.

Thank you, Craig. A *special* hug and a kiss for you!

Cheers,

Craig

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: IDL EPA Exam Test Question [message #21553 is a reply to message #21552] Wed, 30 August 2000 00:00 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
davidf@dfanning.com (David Fanning) writes:
> This is actually a serious question that I was
> asked today from one of my e-mail friends. I know
> it is used to build "frequency images", but what
> are those and how does a DIST image work in that
> context?

When you take the FFT of an image the meaning of coordinate axes
change. In a transformed image, the coordinates label the *frequency*
of each pixel. The FFT attempts to decompose the image or signal into
oscillating sine waves with various frequencies; the result is the
amplitude of each wave.

In a 1D transformed image, pixel 0 is the DC amplitude, pixel 1 is the
amplitude of the slowest varying wave, and so on for higher frequency
waves. For a 2D transformed image you have both an "X" frequency and
a "Y" frequency -- a frequency "image." The fourier transform also
keeps track of "negative" frequencies, which for some reason are kept
in the second half of the vector.

DIST computes the frequency of each element in such a 2D transformed
image --- or at least is proportional to it. This would be useful if
you are applying filtering in the frequency domain. For example if
you wanted to apply an exponential filter to attenuate the high
frequency amplitudes in a 128x128 array, you might do this:

freq = dist(128,128)
fim = fft(im)*exp(-freq)

Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
Re: IDL EPA Exam Test Question [message #21554 is a reply to message #21552] Wed, 30 August 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Andy Loughe (loughe@fsl.noaa.gov) writes:

> As it says in the on-line help (no kidding)...
>
> "Making pretty pictures."
>
> Do I win?

Yes, Andy. And you get the same prize I give
my children when they win these kinds of contests:
a hug and a kiss! :-)

This is actually a serious question that I was
asked today from one of my e-mail friends. I know
it is used to build "frequency images", but what
are those and how does a DIST image work in that
context?

Cheers,

David

P.S. Let's just say I hope I run into you on
the Mall when it comes time for payment. :-)

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: IDL EPA Exam Test Question [message #21555 is a reply to message #21552] Wed, 30 August 2000 00:00 Go to previous message
Andy Loughe is currently offline  Andy Loughe
Messages: 174
Registered: November 1995
Senior Member
David Fanning wrote:
>
> Hi Folks,
>
> The Exam Committee chairman has run off with the
> secretary over in the Bookstore and no one seems to
> know when he is coming back. So I've been asked to
> get a couple of exam questions together. I don't want
> to be unfair or anything, so I thought I would throw
> out a test question to see if I'm on the right track.
>
> Ready?
>
> What is the *real* purpose of the DIST function?


As it says in the on-line help (no kidding)...

"Making pretty pictures."

Do I win?

--
Andrew Loughe =====================================================
NOAA/OAR/FSL/AD R/FS5 | email: loughe@fsl.noaa.gov
325 Broadway | wwweb: www-ad.fsl.noaa.gov/users/loughe
Boulder, CO 80305-3328 | phone: 303-497-6211 fax: 303-497-6301
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Landsat 7 and IDL Insight
Next Topic: contour fill

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

Current Time: Thu Oct 09 06:59:39 PDT 2025

Total time taken to generate the page: 1.03189 seconds