def fit(self,array,errarray,param,xmin=0,xmax=0, fitAxes=[]): """return the data that is needed for plotting the fitting result""" self.params = [Parameter(v) for v in param] def f(x): return np.sqrt(self.params[0]()**2 + self.params[1]()*CTOF170*(x**2)) self.simpleFitAllAxes(f,array,errarray,xmin,xmax, fitAxes) return self.generateDataFromParameters(f,[np.amin(array[0,:]),np.amax(array[0,:])], np.size(fitAxes)+1, xmin, xmax, fitAxes)
def fit(self,data,errarray,param,xmin=0,xmax=0, fitAxes=[]): """return the data that is needed for plotting the fitting result""" self.params = [Parameter(v) for v in param] def f(x): return ((2*mass/(np.sqrt(3)*hbarp)*self.params[0]()*3*hbarp*(x**4)*(a0**4)/mass * (4590*np.sinh(2*self.params[2]())/(np.sin(1.0064*np.log(x/self.params[1]()))**2 + np.sinh(self.params[2]())**2)))**0.25) / a0 minusRegion = data[:,(data[0,:]<0)] self.simpleFitAllAxes(f,minusRegion,errarray,xmin,xmax, fitAxes) return self.generateDataFromParameters(f,[np.amin(minusRegion[0,:]),np.amax(minusRegion[0,:])], np.size(minusRegion[0,:]),xmin,xmax, fitAxes)
def fit(self, array, errarray, param, xmin=0, xmax=0, fitAxes=[]): """return the data that is needed for plotting the fitting result""" """0...a, 1...xc, 2...k, 3...y0""" self.params = [Parameter(v) for v in param] def f(x): return self.params[0]() / (1 + np.exp( -(x - self.params[1]()) / self.params[2]())) + self.params[3]() self.simpleFitAllAxes(f, array, errarray, xmin, xmax, fitAxes) return self.generateDataFromParameters( f, [np.amin(array[0, :]), np.amax(array[0, :])], np.size(fitAxes) + 1, xmin, xmax, fitAxes)
def fit(self, array, errarray, param, xmin=0, xmax=0, fitAxes=[]): """return the data that is needed for plotting the fitting result""" self.params = [Parameter(v) for v in param] def f(x): #Offset + 2*A/pi * w/(4 (x-pos)^2 + w^2) return 2 * self.params[0]() / ( np.pi) * (self.params[2]() / (4 * (x - self.params[1]())**2 + self.params[2] ()**2)) + self.params[3]() self.simpleFitAllAxes(f, array, errarray, xmin, xmax, fitAxes) return self.generateDataFromParameters( f, [np.amin(array[0, :]), np.amax(array[0, :])], np.size(fitAxes) + 1, xmin, xmax, fitAxes)
def fit(self, array, errarray, param, xmin=0, xmax=0, fitAxes=[]): """return the data that is needed for plotting the fitting result""" self.params = [Parameter(v) for v in param] def f(x): #y=Amp* exp(-x/1000/t)) * sin(2*pi*x/1000/Freq - Phase) + Offset return self.params[0]() * np.exp( -x / 1000 / self.params[4] ()) * np.sin(2 * np.pi * x / 1000 * self.params[1] () - self.params[2]()) + self.params[3]() self.simpleFitAllAxes(f, array, errarray, xmin, xmax, fitAxes) return self.generateDataFromParameters( f, [np.amin(array[0, :]), np.amax(array[0, :])], np.size(fitAxes) + 1, xmin, xmax, fitAxes)
def fit(self, array, errarray, param, xmin=0, xmax=0, fitAxes=[]): """return the data that is needed for plotting the fitting result""" """0...N0, 1...alpha, 2...beta""" self.params = [Parameter(v) for v in param] def f(x): return self.params[0]() * np.exp( -(self.params[1]()) * x / 1000) / (1 + self.params[0]() * self.params[2]() / (self.params[1]()) * (1 - np.exp(-self.params[1]() * x / 1000))) self.simpleFitAllAxes(f, array, errarray, xmin, xmax, fitAxes) return self.generateDataFromParameters( f, [np.amin(array[0, :]), np.amax(array[0, :])], np.size(fitAxes) + 1, xmin, xmax, fitAxes)