

def AdjustValue(self, vardict):
    '\n        Adjust the value of a constant parameter. This is useful for something like\n        setting the pressure or the telescope zenith distance, which will be known very\n        well and is important to getting a good fit, but does not need to be varied.\n\n        Warning: The variable will be removed from the list of variables to fit, so\n        DO NOT use this to adjust the value of a parameter you want TelFit to adjust!\n\n        :param vardict: a dictionary where the key is the parameter\n                        name and the value is the value of 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] = False
        except ValueError:
            print('Error! Bad parameter name given. Currently available are: ')
            self.DisplayVariables()
            raise ValueError

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