예제 #1
0
 def test_get_region_legal_01(self):
     with h5py.File(data_utils.std_beps_path, mode='r') as h5_f:
         h5_source = h5_f['/Raw_Measurement/source_main']
         returned = reg_ref.get_region(h5_source, 'even_rows')
         self.assertTrue(
             np.all(returned == h5_source[range(0, h5_source.shape[0], 2)]))
예제 #2
0
 def test_get_region_illegal_01(self):
     with h5py.File(data_utils.std_beps_path, mode='r') as h5_f:
         with self.assertRaises(KeyError):
             reg_ref.get_region(h5_f['/Raw_Measurement/source_main'],
                                'non_existent')