[Scipy-tickets] [SciPy] #1706: Error in Cookbook "Savitzky Golay"

SciPy Trac scipy-tickets@scipy....
Sun Jul 22 04:44:51 CDT 2012


#1706: Error in Cookbook "Savitzky Golay"
-------------------------------------+--------------------------------------
 Reporter:  thomas.haslwanter        |       Owner:  pv         
     Type:  defect                   |      Status:  new        
 Priority:  normal                   |   Milestone:  Unscheduled
Component:  Documentation            |     Version:  0.10.0     
 Keywords:  Cookbook Savitzky-Golay  |  
-------------------------------------+--------------------------------------
 The Cookbook entry
 http://www.scipy.org/Cookbook/SavitzkyGolay
 has a number of problems:

 1) As it is, it does in general not run. The line
    "import numpy as np"
 should be inserted before the first "try" in line 49

 2) I don't completely understand the workings of the code. However, when
 you put in a sine-wave and calculate the first derivative,     you get out
 a negative(!) cosine - not a cosine. The correct result appears if you
 replace "m," in line 68 with "m[::-1],"

 Since the Savitzky-Golay filter is a very commonly used filter, I regard
 this mistake as significant.

 I would make those changes myself, but have not been able to figure out
 how exactly to proceed. Any tips how I have to proceed to contribute would
 be appreciated!

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1706>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list