@classmethod
def from_dict(cls, data, models):
    """Create flux point dataset from dict.

        Parameters
        ----------
        data : dict
            Dict containing data to create dataset from.
        models : list of `SkyModel`
            List of model components.

        Returns
        -------
        dataset : `SpectrumDatasetOnOff`
            Spectrum dataset on off.

        """
    filename = data['filename']
    dataset = cls.from_ogip_files(filename=filename)
    dataset.mask_fit = None
    dataset.models = models
    return dataset
