def fix(self, *args, **kwargs):
        """
        Turns parameters to constants. As arguments, parameters must be strings.
        As keyword arguments, they can be set at the same time.
        
        Note this will NOT work when specifying a non-string fit function, 
        because there is no flexibility in the number of arguments. To get
        around this, suppose you've defined a function stuff(x,a,b). Instead
        of sending the stuff object to self.set_functions() directly, make it
        a string function, e.g.:
        
          self.set_functions('stuff(x,a,b)', 'a,b', stuff=stuff)
        """

        # first set all the keyword argument values
        self.set(**kwargs)

        # get everything into one big list
        pnames = list(args) + list(kwargs.keys())

        # move each pname to the constants
        for pname in pnames:
            if not pname in self._pnames:
                self._error("Naughty. '"+pname+"' is not a valid fit parameter name.")

            else:
                n = self._pnames.index(pname)

                # use the fit result if it exists
                if self.results: value = self.results[0][n]

                # otherwise use the guess value
                else: value = self._pguess[n]

                # make the switcheroo
                if type(self._pnames)    is not list: self._pnames    = list(self._pnames)
                if type(self._pguess)    is not list: self._pguess    = list(self._pguess)
                if type(self._cnames)    is not list: self._cnames    = list(self._cnames)
                if type(self._constants) is not list: self._constants = list(self._constants)
                self._pnames.pop(n)
                self._pguess.pop(n)
                self._cnames.append(pname)
                self._constants.append(value)

                # update
                self._update_functions()

        return self
Turns parameters to constants. As arguments, parameters must be strings.
        As keyword arguments, they can be set at the same time.
        
        Note this will NOT work when specifying a non-string fit function, 
        because there is no flexibility in the number of arguments. To get
        around this, suppose you've defined a function stuff(x,a,b). Instead
        of sending the stuff object to self.set_functions() directly, make it
        a string function, e.g.:
        
          self.set_functions('stuff(x,a,b)', 'a,b', stuff=stuff)