示例#1
0
    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
示例#2
0
    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
示例#3
0
    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
示例#4
0
    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
示例#5
0
 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
示例#6
0
 def _residual(self):
     '''Residual of fit
     '''
     return self.func.residual(True, _jinput(self.data), None,
                               _jinput(self.coords))
示例#7
0
 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
示例#8
0
 def _residual(self):
     '''Residual of fit
     '''
     return self.func.residual(True, _jinput(self.data), None, _jinput(self.coords))