示例#1
0
 def test_efsearch(self):
     evfile = self.dum
     main_efsearch([evfile, '-f', '9.85', '-F', '9.95', '-n', '64',
                    '--fit-candidates'])
     outfile = 'events_EF' + HEN_FILE_EXTENSION
     assert os.path.exists(outfile)
     plot_folding([outfile], ylog=True)
     efperiod = load_folding(outfile)
     assert np.isclose(efperiod.peaks[0], self.pulse_frequency,
                       atol=1/25.25)
     os.unlink(outfile)
示例#2
0
 def test_zsearch(self):
     evfile = self.dum
     main_zsearch([evfile, '-f', '9.85', '-F', '9.95', '-n', '64',
                   '--fit-candidates', '--fit-frequency',
                   str(self.pulse_frequency),
                   '--dynstep', '5'])
     outfile = 'events_Z2n' + HEN_FILE_EXTENSION
     assert os.path.exists(outfile)
     plot_folding([outfile], ylog=True)
     efperiod = load_folding(outfile)
     assert np.isclose(efperiod.peaks[0], self.pulse_frequency,
                       atol=1/25.25)
     # Defaults to 2 harmonics
     assert efperiod.N == 2
     os.unlink(outfile)
示例#3
0
 def test_zsearch_fdots(self):
     evfile = self.dum
     main_zsearch([evfile, '-f', '9.85', '-F', '9.95', '-n', '64',
                   '--fdotmin', ' -0.1', '--fdotmax', '0.1',
                   '--fit-candidates', '--fit-frequency',
                   str(self.pulse_frequency)])
     outfile = 'events_Z2n' + HEN_FILE_EXTENSION
     assert os.path.exists(outfile)
     plot_folding([outfile], ylog=True, output_data_file='bla.qdp')
     efperiod = load_folding(outfile)
     assert np.isclose(efperiod.peaks[0], self.pulse_frequency,
                       atol=1/25.25)
     # Defaults to 2 harmonics
     assert len(efperiod.fdots) > 1
     assert efperiod.N == 2