def to_flat_dict(self, **kwargs):
        """
        Convert the :class:`ParameterSet` to a flat dictionary, with keys being
        uniquetwigs to access the parameter and values being the :class:`Parameter`
        objects themselves.

        :return: dict of :class:`Parameter`s
        """
        if kwargs:
            return self.filter(**kwargs).to_flat_dict()
        return {param.uniquetwig: param for param in self._params}