Esempio n. 1
0
 def _add_xye_dataset(self, file_path):
     try:
         dataset = XYEDataset.from_file(file_path)
     except IOError:
         return
     self.datasets.append(dataset)
     create_datasetui(dataset)
Esempio n. 2
0
 def _add_xye_dataset(self, file_path):
     try:
         dataset = XYEDataset.from_file(file_path)
     except IOError:
         return
     self.datasets.append(dataset)
     create_datasetui(dataset)
Esempio n. 3
0
    def xye_save_test(self):
        filename = join(self.basedir,
                        'si640c_low_temp_cal_p1_scan0.000000_adv0_0000.xye')
        dataset = XYEDataset.from_file(filename)
        f = StringIO()
        dataset.save(f)

        f.seek(0)
        data = XYEDataset._load_xye_data(f)
        eq_(data.shape, (20458, 3))
Esempio n. 4
0
    def xye_save_test(self):
        filename = join(self.basedir,
                        'si640c_low_temp_cal_p1_scan0.000000_adv0_0000.xye')
        dataset = XYEDataset.from_file(filename)
        f = StringIO()
        dataset.save(f)

        f.seek(0)
        data = XYEDataset._load_xye_data(f)
        eq_(data.shape, (20458, 3))
Esempio n. 5
0
 def xye_copy_test(self):
     filename = join(self.basedir,
                     'si640c_low_temp_cal_p1_scan0.000000_adv0_0000.xye')
     dataset = XYEDataset.from_file(filename)
     copied_dataset = dataset.copy()
     self.assertTrue(np.allclose(dataset.data, copied_dataset.data))
Esempio n. 6
0
 def xye_copy_test(self):
     filename = join(self.basedir,
                     'si640c_low_temp_cal_p1_scan0.000000_adv0_0000.xye')
     dataset = XYEDataset.from_file(filename)
     copied_dataset = dataset.copy()
     self.assertTrue(np.allclose(dataset.data, copied_dataset.data))