Re: convol.pro - doubt in giving kernel array [message #72902] |
Tue, 12 October 2010 11:26 |
David Grier
Messages: 35 Registered: July 2010
|
Member |
|
|
On 10/12/10 10:13 AM, sid wrote:
> Hi,
> I need to convolve a gaussian of sigma=0.00203 with the spectral
> data. So I need to use the convol.pro of idl. But seriously I couldn't
> understand what the kernel is, and what should I give in place of the
> kernel. If anybody knows please let me know.
> regards
> sid
You don't describe your spectral data, so I'll just guess:
Let's say your data are in an array called d. We want to convolve
d with a Gaussian kernel.
omega = findgen(n_elements(d)) ; bin size or scale factor?
kernel = exp(- omega^2 / (2. * sigma^2)) ; Gaussian (not normalized)
result = convol(d, kernel) ; do the work
Depending on the details of what you want to do, you might
set a few of the flags to convol. But this is a start.
TTFN,
David
|
|
|