| Re: CONVOL with 2D array and 1D kernel [message #52972 is a reply to message #52971] |
Fri, 09 March 2007 09:38   |
Eric Hudson
Messages: 19 Registered: June 2006
|
Junior Member |
|
|
On Mar 9, 9:42 am, David Fanning <n...@dfanning.com> wrote:
> Eric Hudson writes:
>> Also, there seems to be a lot of confusion about what CONVOL really
>> does. Is there a definitive, readable, source so I can make sure that
>> I'm really doing what I want here (a true mathematical convolution
>> where I've made the array a bit bigger on the edges by duplicating the
>> top & bottom rows, done the convolution, and then chopped off the
>> edges to minimize edge effects).
>
> I'm no convolution expert, but the documentation is
> pretty clear that if you want to do a convolution in
> a "mathematical" sense (as you appear to do), then you
> are going to have to explicitly set the CENTER keyword
> to zero. Otherwise, you are going to do a convolution
> in an "image processing" sense, which may not be what
> you had in mind.
>
This level of detail was why I was hoping for reference to some
readable source. In any case, whether centered or not, the behavior
of instantly setting all values in one row to zero once a 'magic'
number of columns is reached is the problem I'd really like to
understand. It seems like a bug but if this is expected behavior then
I'd like to know because it means I really don't understand what the
function is doing.
> Also, have you expanded the 2D array yourself, or are
> you hoping IDL is going to do that for you? If you did
> it yourself, is it possible some of the values are not
> what you think they are?
>
It was my understanding that this is what /edge_truncate does -- just
duplicates the edge values once you get to the edge. I do not expand
the array myself.
Thanks,
Eric
|
|
|
|