def lml_pw(self, phi, w=None, wdot=None, wddot=None): """ Log marginal likelihood for phase and angular frequency parameters, marginalized over signal shape. This is just the log of the inverse multiplicity of the counts in bins. Add self.logbfac to make it additionally a likelihood over nbins. Since this is fast (and seldom needed), we don't do any bookkeeping of previous binning that may have used the same parameters. """ self._update_params(w, wdot, wddot) # This uses phi and phibins to bin the events. gl.fbindata(self.phases, phi, self.phibins, self.bins) lml = gl.limult(self.ndata, self.bins) if self.offset is None: self.offset = - lml return lml
def _set_offset(self): # Bin data with current w params, and find the # multiplicity for 0 phase. gl.fbindata(self.phases, 0., self.phibins, self.bins) self.offset = - gl.limult(self.ndata, self.bins)