def test_basic(self): '''Basically, does it run?''' self.default_kwargs['install_firefly'] = True visualize.export_to_firefly(**self.default_kwargs, ) data_dir = os.path.join(firefly_dir, 'src', 'Firefly', 'static', 'data', 'analyze_pathlines') assert os.path.isdir(data_dir) assert os.path.isfile(os.path.join(data_dir, 'DataAll000.json'))
def test_interpolate(self): '''Does interpolate work?''' self.default_kwargs['export_to_firefly_kwargs'][ 'interpolate_timestep'] = 0.001 visualize.export_to_firefly(**self.default_kwargs, ) data_dir = os.path.join(firefly_dir, 'src', 'Firefly', 'static', 'data', 'analyze_pathlines') assert os.path.isdir(data_dir) assert os.path.isfile(os.path.join(data_dir, 'DataAll000.json')) f = h5py.File(os.path.join(data_dir, 'readable_data.hdf5'), 'r') assert f['None']['Coordinates'][...].shape[0] > 12
def test_halo_tracks(self): self.default_kwargs['export_to_firefly_kwargs'][ 'include_halo_tracks'] = True visualize.export_to_firefly(**self.default_kwargs, ) for halo_track_fp in self.halo_tracks_fps: f = h5py.File(halo_track_fp, 'r') fields = [ 'coordinates', 'tracked_arrays', ] for field in fields: assert field in f.keys()
def test_basic(self): '''Basically, does it run?''' visualize.export_to_firefly(**self.default_kwargs, )