Ejemplo n.º 1
0
 def test_setup_transit_adjust_params(self):
     sherlock = Sherlock(False, None)
     sherlock.setup_transit_adjust_params(max_runs=5,
                                          period_protec=5,
                                          period_min=1,
                                          period_max=2,
                                          bin_minutes=5,
                                          run_cores=3,
                                          snr_min=6,
                                          sde_min=5,
                                          fap_max=0.05,
                                          mask_mode="subtract",
                                          best_signal_algorithm="quorum",
                                          quorum_strength=2)
     self.assertEqual(5, sherlock.max_runs)
     self.assertEqual(5, sherlock.period_protec)
     self.assertEqual(1, sherlock.period_min)
     self.assertEqual(2, sherlock.period_max)
     self.assertEqual(5, sherlock.bin_minutes)
     self.assertEqual(3, sherlock.run_cores)
     self.assertEqual(6, sherlock.snr_min)
     self.assertEqual(5, sherlock.sde_min)
     self.assertEqual(0.05, sherlock.fap_max)
     self.assertEqual("subtract", sherlock.mask_mode)
     self.assertEqual("quorum", sherlock.best_signal_algorithm)
Ejemplo n.º 2
0
 def test_scoring_algorithm(self):
     sherlock = Sherlock(False, None)
     sherlock.setup_transit_adjust_params(best_signal_algorithm="basic")
     self.assertTrue(
         isinstance(
             sherlock.signal_score_selectors[
                 sherlock.best_signal_algorithm], BasicSignalSelector))
     sherlock.setup_transit_adjust_params(
         best_signal_algorithm="border-correct")
     self.assertTrue(
         isinstance(
             sherlock.signal_score_selectors[
                 sherlock.best_signal_algorithm],
             SnrBorderCorrectedSignalSelector))
     sherlock.setup_transit_adjust_params(best_signal_algorithm="quorum")
     self.assertTrue(
         isinstance(
             sherlock.signal_score_selectors[
                 sherlock.best_signal_algorithm],
             QuorumSnrBorderCorrectedSignalSelector))