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

Home » Public Forums » archive » Re: Convolving a vector with the 2nd derivative of a Gaussian
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: Convolving a vector with the 2nd derivative of a Gaussian [message #74070] Wed, 29 December 2010 22:09
MC is currently offline  MC
Messages: 50
Registered: September 1996
Member
On Dec 30, 8:37 am, johan <j...@skvera.co.uk> wrote:
> I am trying to do something that must be straigtforward but I don't
> seem to get my head around it.
>
> I have a vector, say
> A = [20, 20, 20, 21, 26, 48, 88, 105, 182, 182, 241, 245, 241, 182,
> 182, 105, 88, 48, 26, 21, 20, 20, 20, 20]
>
> I want to convolve it with the 2nd derivative of a Gaussian with a
> sigma of 10.
>
> Is the CONVOL of IDL suitable anf how do I construct the kernel?
>
> Help will be greatly apprecuated.

The second derivative of exp((-x^2)/a) is

-(2/a)exp((-x^2)/a)+(4x^2/a^2)exp((-x^2)/a)

(if my basic calculus has not failed me).

You can make "x" by (say) x=findgen(24)-12. the constant "a" in the
above is given in Wikipedia (etc.) in terms of sigma -look it up.

Yes, convol works. I suggest that such basic IDL programming questions
suggest you need to try the IDL tutorial. You really need to do this
for yourself to start to understand functions an proceedures.

Good luck.
MC
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Convolving a vector with the 2nd derivative of a Gaussian
Next Topic: Re: division to move a decimal point

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

Current Time: Wed Oct 08 20:00:01 PDT 2025

Total time taken to generate the page: 0.00520 seconds