

def SetBounds(self, bounddict):
    '\n        Set bounds on one or more parameters.\n\n        :param vardict: a dictionary where the key is the parameter\n                     name and the value is a list of size 2 containing\n                     the lower and upper bounds. You can provide one-sided\n                     bounds using np.inf or -np.inf.\n                     Valid parameter names can be found by invoking\n                     DisplayVariables(fitonly=False)\n\n        :return: None\n        '
    '\n        Similar to FitVariable, but it sets bounds on the variable. This can technically\n          be done for any variable, but is only useful to set bounds for those variables\n          being fit (and detector resolution)\n        '
    for par in bounddict.keys():
        if ((bounddict[par][1] > (100 * bounddict[par][0])) and (bounddict[par][0] != 0) and (bounddict[par][1] < np.inf)):
            warnings.warn('To set only a lower limit, you should use np.inf for the upper limit!')
            bounddict[par][1] = np.inf
        try:
            idx = self.parnames.index(par)
            if ((par in ['wavestart', 'waveend']) and isinstance(bounddict[par], u.quantity.Quantity)):
                par[par][0] = bounddict[par][0].to(u.nm).value
                bounddict[par][1] = bounddict[par][1].to(u.nm).value
            self.bounds[idx] = bounddict[par]
            if (par == 'resolution'):
                self.resolution_bounds = bounddict[par]
        except ValueError:
            print('Error! Bad parameter name given. Currently available are: ')
            self.DisplayVariables()
            raise ValueError

dataset/ETHPy150Open kgullikson88/Telluric-Fitter/src/TelluricFitter.py TelluricFitter.SetBounds/VarMisuse@144/437 `bounddict`->`par`