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

Home » Public Forums » archive » Re: Does CONVOL convolute
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: Does CONVOL convolute [message #34160 is a reply to message #34158] Mon, 24 February 2003 11:22 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Big Bird (condor@biosys.net) writes:

> But leaving the kernel alone, and just making the original array
> unsymmetric, I get something entirely unexpected:
>
> IDL> tt = fltarr(5,5)
> IDL> tt[0,0] = 1
> IDL> print,tt
> 1.00000 0.00000 0.00000 0.00000 0.00000
> 0.00000 0.00000 0.00000 0.00000 0.00000
> 0.00000 0.00000 0.00000 0.00000 0.00000
> 0.00000 0.00000 0.00000 0.00000 0.00000
> 0.00000 0.00000 0.00000 0.00000 0.00000
> IDL> print,convol(tt,k)
> 0.00000 0.00000 0.00000 0.00000 0.00000
> 0.00000 1.00000 0.00000 0.00000 0.00000
> 0.00000 0.00000 0.00000 0.00000 0.00000
> 0.00000 0.00000 0.00000 0.00000 0.00000
> 0.00000 0.00000 0.00000 0.00000 0.00000
>
> Huh?
>
> I get the same results with or without the /center keyword to convol.

Setting CENTER=1 or /CENTER is the same as leaving the CENTER
keyword off. (Don't ask!) If you want to perform convolution in
the "strictly mathematical" sense, you must explicitly set CENTER=0.
Is this what you were after:

IDL> print,convol(tt,k, center=0)
0.000000 0.000000 0.000000 0.000000 0.000000
0.000000 0.000000 0.000000 0.000000 0.000000
0.000000 0.000000 1.00000 0.000000 0.000000
0.000000 0.000000 0.000000 0.000000 0.000000
0.000000 0.000000 0.000000 0.000000 0.000000

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: X11 0.2.1,OpenGL and IDL object Graphics
Next Topic: Update [ was Re: Is there a way to use C++ code in IDL ]

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

Current Time: Sat Oct 11 03:03:47 PDT 2025

Total time taken to generate the page: 1.60007 seconds