read.halo: Read in the halo hdf5 file

View source: R/read.halo.R

read.haloR Documentation

Read in the halo hdf5 file

Description

Read in the data from the halo's hdf5 file (halo.file) from the given location (path) and return all the data contained in the file as a list type object. This function has two methods of reading in the file, either through entering the hdf5 files location (hdf5.file) or by entering in the path for the directory of where the file is stored (path) and the name of the file (halo.file) separately.

The returned list should contain each particles location in cartesian coordinates, velocities, mass and the species ID within the halo at a given snapshot. Each of these values will be in the simulations units of measurement.

If there are multiple snapshots within the read in file, there will be entries for each snapshot containing this information

The list should contain other information such as simulation box size, particle count, ect...

Usage

read.halo(path, halo.file, hdf5.file = NULL)

Arguments

path

The path for the hdf5 file within the computer

halo.file

The hdf5 files name, ie) halo1.h5

hdf5.file

An optional value, the path to the halo's hdf5 file

Examples

calling a file by its location within the device:
read.halo(hdf5.file = '/Users/..../test_halo.h5')

If wanting to call in multiple halo all from the same directory or file:
halos = c('halo_1', 'halo_2', ..., 'halo_x')
for(i in 1:length(halos)){
read.halo(path='the/file/containing/halos/', halo.file=halos[i])
}


Will-McD/ENSTvisualise documentation built on June 24, 2022, 5:13 p.m.