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

Home » Public Forums » archive » Re: Savgol - Differentiation problems
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: Savgol - Differentiation problems [message #37969] Fri, 13 February 2004 01:01
richard.martin is currently offline  richard.martin
Messages: 3
Registered: February 2004
Junior Member
Worked it out now - a real IDL gotcha this one;

SAVGOL essentially fits a polynomial around a local group of data points,
which can then be differentiated to give numerical derivatives. The SAVGOL
function returns a set of filter coefficients based on the leading term of
the polynomial.

However, when a higher order derivative is specified, the parameter
instructs the routine to return the nth coefficient of the polynomial NOT
the leading coefficient of the polynomial differentiated n times. Of course
this is the same thing, but different by a factor of n!. Of course IDL
completely fail to mention this in their documentation. Along with the need
to divide by the stepsize^n.

In other words, nth derivative output from the SAVGOL/CONVOL combination
needs to multiplied by n!/((x[1]-x[0])^n), where x is the abscissa. You do
sometimes wonder whether the IDL people have read the text in NR at all.

Dave
[Message index]
 
Read Message
Previous Topic: Re: Working In 3-Space
Next Topic: Re: Looking for Mittag-Leffler function

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

Current Time: Fri Oct 10 14:28:48 PDT 2025

Total time taken to generate the page: 0.70349 seconds