PEATDB/Ekin/Base.py
def updateFit(self, X, ax=None, xdata=None, clr=None,
                        normalise=None, plotoption=1, showfitvars=False):
        """Get the fit data line for given fitter object and redraw"""
        if xdata == None:
            xdata = self.currxdata
        if ax == None:
            ax = self.ax
        if clr == None:
            clr='r'
        e=[]
        for i in xdata: e.append(i)
        fity=[]
        inc = (max(e)-min(e))/50
        xx = numpy.arange(min(e)-inc, max(e)+inc, inc).tolist()
        for i in xx:
            fity.append(X.evaluate(i))
        if normalise == True:
            fity = normList(fity, inputmin=self.mindata, inputmax=self.maxdata)
        if clr==None:
            clr=line.get_color()
        if self.fitline == None or plotoption != 1:
            self.fitline, = ax.plot(xx, fity, clr, linewidth=2.5, alpha=0.8)
        else:
            self.fitline.set_data(xx, fity)

        if showfitvars == True:
            self.showfitResults(X, ax)
        return xx, fity
Get the fit data line for given fitter object and redraw
Get the fit data line for given fitter object and redraw
Get the fit data line for given fitter object and redraw
def updateFit(self, X, ax=None, xdata=None, clr=None,
                        normalise=None, plotoption=1, showfitvars=False):
        if xdata == None:
            xdata = self.currxdata
        if ax == None:
            ax = self.ax
        if clr == None:
            clr='r'
        e=[]
        for i in xdata: e.append(i)
        fity=[]
        inc = (max(e)-min(e))/50
        xx = numpy.arange(min(e)-inc, max(e)+inc, inc).tolist()
        for i in xx:
            fity.append(X.evaluate(i))
        if normalise == True:
            fity = normList(fity, inputmin=self.mindata, inputmax=self.maxdata)
        if clr==None:
            clr=line.get_color()
        if self.fitline == None or plotoption != 1:
            self.fitline, = ax.plot(xx, fity, clr, linewidth=2.5, alpha=0.8)
        else:
            self.fitline.set_data(xx, fity)
        if showfitvars == True:
            self.showfitResults(X, ax)
        return xx, fity
def updateFit ( self , X , ax = None , xdata = None , clr = None , normalise = None , plotoption = 1 , showfitvars = False ) : if xdata == None : xdata = self . currxdata if ax == None : ax = self . ax if clr == None : clr = 'r' e = [ ] for i in xdata : e . append ( i ) fity = [ ] inc = ( max ( e ) - min ( e ) ) / 50 xx = numpy . arange ( min ( e ) - inc , max ( e ) + inc , inc ) . tolist ( ) for i in xx : fity . append ( X . evaluate ( i ) ) if normalise == True : fity = normList ( fity , inputmin = self . mindata , inputmax = self . maxdata ) if clr == None : clr = line . get_color ( ) if self . fitline == None or plotoption != 1 : self . fitline , = ax . plot ( xx , fity , clr , linewidth = 2.5 , alpha = 0.8 ) else : self . fitline . set_data ( xx , fity ) if showfitvars == True : self . showfitResults ( X , ax ) return xx , fity
Get the fit data line for given fitter object and redraw
Get the fit data line for given fitter object and redraw
"""Get the fit data line for given fitter object and redraw"""
self
X
ax
xdata
clr
normalise
plotoption
showfitvars