Example #1
0
    def test_write_simple(self):
        df = dynamotable.open(self.simple)
        outfile = Path().joinpath('test', 'data', 'simple_out.tbl')

        dynamotable.write(df, outfile)
        df2 = dynamotable.open(outfile)

        for column in df.columns:
            assert_series_equal(df[column],
                                df2[column],
                                check_less_precise=True)
Example #2
0
 def test_open_complex_w_table_map(self):
     df = dynamotable.open(self.complex, self.tmap_complex)
     self.assertTrue('tomo_file' in df.columns)
     self.assertTrue(df['tomo_file'][0] == 'tomo_ts01.mrc_15.00Apx.mrc')
Example #3
0
 def test_eulers(self):
     df = dynamotable.open(self.simple)
     eulers = dynamotable.eulers(df)
     self.assertTrue(eulers.shape[0] == 300)
     self.assertTrue(eulers.shape[1] == 3)
Example #4
0
 def test_open_complex(self):
     df = dynamotable.open(self.complex)
     self.assertIsInstance(df, pd.DataFrame)
     self.assertTrue(df.columns[0] == 'tag')
Example #5
0
 def test_xyz(self):
     df = dynamotable.open(self.simple)
     xyz = dynamotable.xyz(df)
     self.assertTrue(xyz.shape[0] == 300)
     self.assertTrue(xyz.shape[1] == 3)