Esempio n. 1
0
 def test_ml_analyzed(self):
     for met in list_test_bins():
         target = TARGET_METRICS[met.lid]
         assert np.isclose(met.ml_analyzed, target['ml_analyzed'])
         assert np.isclose(met.run_time, target['run_time'])
         assert np.isclose(met.look_time, target['look_time'])
         assert np.isclose(met.inhibit_time, target['inhibit_time'])
Esempio n. 2
0
 def test_pack(self):
     for b in list_test_bins():
         if b.lid not in PACKED:
             continue
         m = Mosaic(b)
         packed = m.pack()
         for col in ['y', 'x', 'roi_number']:
             values = packed[col].values
             expected_values = np.array(PACKED[b.lid][col])
             assert np.allclose(values, expected_values)
Esempio n. 3
0
 def test_ml_analyzed(self):
     for b in list_test_bins():
         result = compute_ml_analyzed(b)
         target_result = TARGET_ML_ANALYZED[b.lid]
         for rv, trv in zip(result, target_result):
             assert np.isclose(rv, trv)
Esempio n. 4
0
 def test_header_metrics(self):
     for met in list_test_bins():
         target = TARGET_METRICS[met.lid]
         assert np.isclose(met.temperature, target[TEMPERATURE])
         assert np.isclose(met.humidity, target[HUMIDITY])
Esempio n. 5
0
 def test_trigger_rate(self):
     for met in list_test_bins():
         target = TARGET_METRICS[met.lid]
         assert np.isclose(met.trigger_rate, target['trigger_rate'])