def from_config(cls, cp, data=None, delta_f=None, delta_t=None,
                    gates=None, recalibration=None, **kwargs):
        """Initializes an instance of this class from the given config file.

        Parameters
        ----------
        cp : WorkflowConfigParser
            Config file parser to read.
        data : dict
            A dictionary of data, in which the keys are the detector names and
            the values are the data. This is not retrieved from the config
            file, and so must be provided.
        delta_f : float
            The frequency spacing of the data; needed for waveform generation.
        delta_t : float
            The time spacing of the data; needed for time-domain waveform
            generators.
        recalibration : dict of pycbc.calibration.Recalibrate, optional
            Dictionary of detectors -> recalibration class instances for
            recalibrating data.
        gates : dict of tuples, optional
            Dictionary of detectors -> tuples of specifying gate times. The
            sort of thing returned by `pycbc.gate.gates_from_cli`.
        \**kwargs :
            All additional keyword arguments are passed to the class. Any
            provided keyword will over ride what is in the config file.
        """
        prior_section = "marginalized_prior"
        args = cls._init_args_from_config(cp)
        marg_prior = read_distributions_from_config(cp, prior_section)
        if len(marg_prior) == 0:
            raise AttributeError("No priors are specified for the "
                                 "marginalization. Please specify this in a "
                                 "section in the config file with heading "
                                 "{}-variable".format(prior_section))
        params = [i.params[0] for i in marg_prior]
        marg_args = [k for k, v in args.items() if "_marginalization" in k]
        if len(marg_args) != len(params):
            raise ValueError("There is not a prior for each keyword argument")
        kwargs['marg_prior'] = marg_prior
        for i in params:
            kwargs[i+"_marginalization"] = True
        args.update(kwargs)
        variable_params = args['variable_params']
        args["data"] = data
        try:
            static_params = args['static_params']
        except KeyError:
            static_params = {}
        # set up waveform generator
        try:
            approximant = static_params['approximant']
        except KeyError:
            raise ValueError("no approximant provided in the static args")
        generator_function = generator.select_waveform_generator(approximant)
        waveform_generator = generator.FDomainDetFrameGenerator(
            generator_function, epoch=data.values()[0].start_time,
            variable_args=variable_params, detectors=data.keys(),
            delta_f=delta_f, delta_t=delta_t,
            recalib=recalibration, gates=gates,
            **static_params)
        args['waveform_generator'] = waveform_generator
        args["f_lower"] = static_params["f_lower"]
        return cls(**args)
Initializes an instance of this class from the given config file.

        Parameters
        ----------
        cp : WorkflowConfigParser
            Config file parser to read.
        data : dict
            A dictionary of data, in which the keys are the detector names and
            the values are the data. This is not retrieved from the config
            file, and so must be provided.
        delta_f : float
            The frequency spacing of the data; needed for waveform generation.
        delta_t : float
            The time spacing of the data; needed for time-domain waveform
            generators.
        recalibration : dict of pycbc.calibration.Recalibrate, optional
            Dictionary of detectors -> recalibration class instances for
            recalibrating data.
        gates : dict of tuples, optional
            Dictionary of detectors -> tuples of specifying gate times. The
            sort of thing returned by `pycbc.gate.gates_from_cli`.
        \**kwargs :
            All additional keyword arguments are passed to the class. Any
            provided keyword will over ride what is in the config file.