def setGamma(self, x):
        """ set electron energy, gamma value

        :param x: new energy, gamma value
        :return: None
        """
        if x != self.gamma:
            self.gamma = x
            self.refresh = True