Пример #1
0
 def chi_pw(self, phi, w=None, wdot=None, wddot=None):
     """
     Chi**2 vs. phase and angular frequency parameters.
     """
     self._update_params(w, wdot, wddot)
     gl.fbindata(self.phases, phi, self.phibins, self.bins)
     return gl.chisqr(self.ndata, self.bins)
Пример #2
0
 def chi_pw(self, phi, w=None, wdot=None, wddot=None):
     """
     Chi**2 vs. phase and angular frequency parameters.
     """
     self._update_params(w, wdot, wddot)
     gl.fbindata(self.phases, phi, self.phibins, self.bins)
     return gl.chisqr(self.ndata, self.bins)
Пример #3
0
    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
Пример #4
0
    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
Пример #5
0
 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)
Пример #6
0
 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)