示例#1
0
文件: test_io.py 项目: Ly0n/postptv
 def test_trajectories_hdf(self):
     """HDF reading works"""
     outfile = 'tests/testing_fodder/table.h5'
     io.save_particles_table(outfile, self.correct)
     loaded = io.trajectories_table(outfile)
     self.compare_trajectories(loaded, self.correct)
     os.remove(outfile)
示例#2
0
 def test_trajectories_hdf(self):
     """HDF reading works"""
     outfile = 'tests/testing_fodder/table.h5'
     io.save_particles_table(outfile, self.correct)
     loaded = io.trajectories_table(outfile)
     self.compare_trajectories(loaded, self.correct)
     os.remove(outfile)
示例#3
0
 def test_trim_hdf(self):
     """HDF trajectory trimming"""
     correct = io.trajectories_ptvis(self.tmpl, self.first+1, self.last-1)
     
     outfile = 'tests/testing_fodder/table.h5'
     io.save_particles_table(outfile, self.correct, trim=1)
     
     loaded = io.trajectories_table(outfile)
     self.compare_trajectories(loaded, correct)
     
     os.remove(outfile)