

def FitVariable(self, vardict):
    '\n        Add one or more variables to the list being fit.\n\n        :param vardict: a dictionary where the key is the parameter\n                     name and the value is the initial guess for that parameter.\n                     Valid parameter names can be found by invoking\n                     DisplayVariables(fitonly=False)\n\n        :return: None\n        '
    for par in vardict.keys():
        try:
            idx = self.parnames.index(par)
            if ((par in ['wavestart', 'waveend']) and isinstance(vardict[par], u.quantity.Quantity)):
                vardict[par] = vardict[par].to(u.nm).value
            self.const_pars[idx] = vardict[par]
            self.fitting[idx] = True
        except ValueError:
            print('Error! Bad parameter name given. Currently available are: ')
            self.DisplayVariables()
            raise ValueError

dataset/ETHPy150Open kgullikson88/Telluric-Fitter/src/TelluricFitter.py TelluricFitter.FitVariable/original