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)
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)