def __init__(self, xdata, ydata, smoothing=<NUM_LIT>, degree=<NUM_LIT:5>, presmoothing=<NUM_LIT:0>, plot=True, xlabel="<STR_LIT:x>", ylabel="<STR_LIT:y>", show_derivative=<NUM_LIT:0>, xmin="<STR_LIT>", xmax="<STR_LIT>", simple=<NUM_LIT:0>):
<EOL>self.xlabel = xlabel<EOL>self.ylabel = ylabel<EOL>self.xdata  = xdata<EOL>self.ydata  = ydata<EOL>self.simple = simple<EOL>self.xmin = min(xdata)<EOL>self.xmax = max(xdata)<EOL>self._path = "<STR_LIT>"<EOL>self.smoothing    = smoothing<EOL>self.degree       = degree<EOL>self.presmoothing = presmoothing<EOL>self.plot_flag    = plot<EOL>self.message = "<STR_LIT>"<EOL>if not simple:        <EOL><INDENT>self.ydata_smoothed = list(ydata)<EOL>if presmoothing: _fun.smooth_array(self.ydata_smoothed, presmoothing)<EOL>print("<STR_LIT>", str(presmoothing))<EOL>print("<STR_LIT>",    str(smoothing))<EOL>print("<STR_LIT>",    str(degree))<EOL>self.pfit = _interpolate.splrep(xdata, self.ydata_smoothed, s=smoothing, k=degree)<EOL><DEDENT>if plot:<EOL><INDENT>fig  = _pylab.gcf()<EOL>fig.clear()<EOL>axes = fig.gca()<EOL>axes.plot(xdata,ydata, "<STR_LIT>")<EOL>axes.set_xlabel(xlabel)<EOL>axes.set_ylabel(ylabel)<EOL>if not simple:<EOL><INDENT>axes.plot(xdata,self.ydata_smoothed,"<STR_LIT>")<EOL>self.plot(steps=len(xdata)*<NUM_LIT:5>, clear=False)<EOL>_pylab_help.set_all_line_attributes("<STR_LIT>", <NUM_LIT:2>)<EOL>if show_derivative: self.plot(steps=len(xdata)*<NUM_LIT:5>, clear=False, derivative=show_derivative, yaxis='<STR_LIT:right>')<EOL>_pylab_help.set_all_line_attributes("<STR_LIT>", <NUM_LIT:1>)<EOL>_pylab_help.set_all_line_attributes("<STR_LIT>", "<STR_LIT:r>")<EOL><DEDENT>_pylab_help.set_xrange(xmin, xmax)<EOL>fig.canvas.Refresh()<EOL><DEDENT>
Create a spline object and fit xdata vs ydata with spline
Set type="interpolate" to simply interpolate the raw data