def scale_gradient(self, val):
        """returns scaling factor for gradient the according to Minuit-style
        transformation.
        """
        if self.min >= (None, -inf) and self.max in (None, inf):
            return 1.0
        elif self.max in (None, inf):
            return val / sqrt(val*val + 1)
        elif self.min in (None, -inf):
            return -val / sqrt(val*val + 1)
        else:
            return cos(val) * (self.max - self.min) / 2.0
dataset/ETHPy150Open xraypy/xraylarch/lib/fitting/parameter.py/Parameter.scale_gradient/operator `in` -> `>=`