def makefuncdata(self): '''Make a list of datasets for composite fitting function and its components ''' nf = self.func.noOfFunctions coords = _jinput(self.coords) if nf > 1: fdata = [_sciwrap(self.func.calculateValues(coords))] fdata[0].name = "Composite function" for n in range(nf): fdata.append(_sciwrap(self.func.getFunction(n).calculateValues(*coords))) elif nf == 1: fdata = [_sciwrap(self.func.getFunction(0).calculateValues(coords))] else: fdata = [] return fdata
def makefuncdata(self, all=True): '''Make a list of datasets for composite fitting function and its components all -- if True, then make datasets for all contributing functions ''' nf = self.func.noOfFunctions coords = _jinput(self.coords) if nf >= 1: fdata = [_sciwrap(self.func.calculateValues(coords))] if all: if nf > 1: fdata[0].name = "Composite function" for n in range(nf): fdata.append(_sciwrap(self.func.getFunction(n).calculateValues(*coords))) else: fdata = [] return fdata
def makefuncdata(self, all=True): '''Make a list of datasets for composite fitting function and its components all -- if True, then make datasets for all contributing functions ''' nf = self.func.noOfFunctions coords = _jinput(self.coords) if nf >= 1: fdata = [_sciwrap(self.func.calculateValues(coords))] if all: if nf > 1: fdata[0].name = "Composite function" for n in range(nf): fdata.append( _sciwrap( self.func.getFunction(n).calculateValues(*coords))) else: fdata = [] return fdata
def makefuncdata(self): '''Make a list of datasets for composite fitting function and its components ''' nf = self.func.noOfFunctions coords = _jinput(self.coords) if nf > 1: fdata = [_sciwrap(self.func.calculateValues(coords))] fdata[0].name = "Composite function" for n in range(nf): fdata.append( _sciwrap( self.func.getFunction(n).calculateValues(*coords))) elif nf == 1: fdata = [ _sciwrap(self.func.getFunction(0).calculateValues(coords)) ] else: fdata = [] return fdata
def _area(self): '''Area or hypervolume under fit assuming coordinates are uniformly spaced ''' deltax = self._calcdelta(self.coords) return _sciwrap(self.func.calculateValues(_jinput( self.coords)).sum()) * deltax
def _residual(self): '''Residual of fit ''' return self.func.residual(True, _jinput(self.data), None, _jinput(self.coords))
def _area(self): '''Area or hypervolume under fit assuming coordinates are uniformly spaced ''' deltax = self._calcdelta(self.coords) return _sciwrap(self.func.calculateValues(_jinput(self.coords))).sum() * deltax