def avgchi_w(self, w=None, wdot=None, wddot=None): """ Phase-averaged chi**2 vs. frequency parameters. """ self._update_params(w, wdot, wddot) if self.offset is None: self._set_offset() if self.qpts==0: self.lml, self.avgchi = gl.qlw_exact(self.lndfac, self.phases, self.phibins, self.bins, self.offset) else: self.lml, self.avgchi = gl.qlw_trap(self.lndfac, self.phases, self.phibins, self.bins, self.absc, self.offset) return self.avgchi
def sml_w(self, w=None, wdot=None, wddot=None): """ Scaled marginal likelihood for angular frequency parameters & bin number, marginalized over phase and signal shape. The actual marginal likelihood is sml_w*exp(-self.offset). Since one might integrate this over millions of w values, the result is left scaled so the user can sum the returned sml_w values. The log of the integral minus self.offset is the log of the full marginal likelihood. """ self._update_params(w, wdot, wddot) if self.offset is None: self._set_offset() if self.qpts==0: self.lml, self.avgchi = gl.qlw_exact(self.lndfac, self.phases, self.phibins, self.bins, self.offset) else: self.lml, self.avgchi = gl.qlw_trap(self.lndfac, self.phases, self.phibins, self.bins, self.absc, self.offset) return self.lml