コード例 #1
0
ファイル: test_pulse.py プロジェクト: godslayer201/stingray
    def test_zn_poisson(self):
        phases = self.phases
        prof512, bins = self.prof512, self.bins
        ks, ze = z_n_events_all(phases, nmax=10)
        ksp, zp = z_n_binned_events_all(prof512, nmax=10)

        assert np.allclose(ze, zp, rtol=0.01)
        m, h = htest(prof512, datatype="binned", nmax=10)

        assert np.isclose(h + 4 * m - 4, z_n(prof512, n=m, datatype="binned"))
        assert np.isclose(h + 4 * m - 4, zp[m - 1])
コード例 #2
0
ファイル: test_pulse.py プロジェクト: godslayer201/stingray
 def test_zn_events(self):
     phases = self.phases
     ks, ze = z_n_events_all(phases, nmax=10)
     m, h = htest(phases, nmax=10, datatype="events")
     assert np.isclose(h + 4 * m - 4, z_n(phases, n=m, datatype="events"))
     assert np.isclose(h + 4 * m - 4, ze[m - 1])