def get_state_by_X(self, x, xtyp):
        """
        Find the state value by providing the x value.
        Will raise an exception if the x value is absent from the state
        data base.

        :param x: The x value
        :return: The state value
        """
        _state = self.state_db.get(KEY_PATTERN[xtyp].format(x))
        if _state:
            return _state
        else:
            raise KeyError('Unknown {}: "{}"'.format(xtyp, x))