def _loglr(self):
        r"""Computes the log likelihood ratio,

        .. math::

            \log \mathcal{L}(\Theta) = \sum_i
                \left<h_i(\Theta)|d_i\right> -
                \frac{1}{2}\left<h_i(\Theta)|h_i(\Theta)\right>,

        at the current parameter values :math:`\Theta`.

        Returns
        -------
        float
            The value of the log likelihood ratio evaluated at the given point.

        """
        params = self.current_params
        try:
            wfs = self._waveform_generator.generate(**params)
        except NoWaveformError:
            return self._nowaveform_loglr()
        opt_snr = 0.
        mf_snr = 0j
        for det, h in wfs.items():
            # the kmax of the waveforms may be different than internal kmax
            kmax = min(len(h), self._kmax)
            # time step
            self._deltat = h.delta_t
            if self._kmin >= kmax:
                # if the waveform terminates before the filtering low
                # frequency cutoff, then the loglr is just 0 for this
                # detector
                hh_i = 0.
                hd_i = 0j
            else:
                h[self._kmin:kmax] *= self._weight[det][self._kmin:kmax]
                hh_i = h[self._kmin:kmax].inner(h[self._kmin:kmax]).real
                hd_i = self._eval_mfsnr(h[self._kmin:kmax],
                                        self.data[det][self._kmin:kmax])
            opt_snr += hh_i
            mf_snr += hd_i
            setattr(self._current_stats, '{}_optimal_snrsq'.format(det), hh_i)
            setattr(self._current_stats, '{}_matchedfilter_snrsq'.format(det),
                    hd_i)
        mf_snr = abs(mf_snr)
        loglr = self._eval_loglr(mf_snr, opt_snr)
        # also store the loglikelihood, to ensure it is populated in the
        # current stats even if loglikelihood is never called
        self._current_stats.loglikelihood = loglr + self.lognl
        return loglr
r"""Computes the log likelihood ratio,

        .. math::

            \log \mathcal{L}(\Theta) = \sum_i
                \left<h_i(\Theta)|d_i\right> -
                \frac{1}{2}\left<h_i(\Theta)|h_i(\Theta)\right>,

        at the current parameter values :math:`\Theta`.

        Returns
        -------
        float
            The value of the log likelihood ratio evaluated at the given point.