def derivs (   self  ) 

Compute derivatives by default numerical differentiation for all non-frozen parameters, This must be overridden for fits which have analytic derivatives. See example in class documentation. Note in particular that the array returned is organized with all the values for a point in each row. The columns correspond to the parameters.

Reimplemented from fit.

Definition at line 877 of file fitting_toolkit.py.

00877                     : 
00878         #analytic derivatives for a 1-d gaussian
00879         #z0+a*exp( -(x-xmu)**2/(2*xsig**2) )
00880         z0, a, xmu, xsigma = self.funcparams
00881         n=self.pointcount
00882         x=self.xarray[0,:n]
00883         xsigi=-1.0/(2.0*xsigma**2)
00884         dx=x-xmu
00885         dx2=dx*dx
00886         expfact=Numeric.exp(xsigi*dx2)
00887         z=a*expfact
00888         
00889         dd = zeros((n, 4), self.atype)
00890         dd[:,0]=1.0
00891         dd[:,1]=expfact
00892         dd[:,2]=(-2.0*xsigi)*(dx*z)
00893         dd[:,3]=(-2.0*xsigi/xsigma)*(dx2*z)
00894         
00895         return dd   
00896 


Generated on Wed Nov 21 10:18:32 2007 for analysis by  doxygen 1.5.4