Re: Does CONVOL convolute [message #34158 is a reply to message #34157] |
Mon, 24 February 2003 16:50   |
condor
Messages: 35 Registered: January 2002
|
Member |
|
|
David Fanning <david@dfanning.com> wrote in message news:<MPG.18c41ee199cd0d0b989afb@news.frii.com>...
> Setting CENTER=1 or /CENTER is the same as leaving the CENTER
> keyword off. (Don't ask!)
Oy, I'll ask anyways: Who's grand idea was that?
> 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
Huh? No, that isn't what I was after either.
Maybe I'm thinking something completely wrong here somewhere but if my
array is
1 0 0
0 0 0 ...
0 0 0
.
.
and my convolution kernel is
a b c
d e f
g h i
then I would expect the convolution to be
e f 0
h i 0 ...
0 0 0
.
.
At least for a symmetric kernel (I'd have to think about an
unsymmetric one). I expect that because the fourier transform of a
delta function is a constant (one) which is thus the multiplicative
neutral element. And the fourier transform of a convolution of
functions is the multiplication of the transforms of the functions
themselves.
The longer I stare at the help, the more confused I get trying to
figure out whether the [0,0] element of the result should be zero, as
it seems to have a condition attached that reads (at least on my
screen with the font the help uses) "if t >= 1-1 and u >= 1-1" . And I
really don't think either of these "ones" could be 'lower-case ell'
even though they use an 'ell' in the sum but without apparent
motivation (or at least they don't seem to say what 'ell' *is*).
/edge_truncate goes in the vague direction
/edge_truncate,center=0 gives me something I don't understand at all
/edge_wrap does what it sounds like (which is not what I would
consider useful
for most mathematical applications)
/edge_wrap,center=0 comes closest to what I would have expected
This is all rather mysterious to me - is the term "convolution" used
differently in engineering than in math? Clearly I have to think about
this some more ...
|
|
|