VAChdf5

class pysac.io.legacy.VAChdf5(filename, mode='r')[source] [edit on github]

Based on FortranFile has been modified to read VAC / SAC HDF5 files.

Reads a iteration into the following structure:

file.header: -Dictionary containging -filehead: string at begging of file -params: Iteration Parameters, it, t, ndim, neqpar, nw -nx: Size of cordinate array [list] -eqpar: eqpar_ parameters [list] -varnames: list containg varible names for dimensions, nw and eqpar? file.w : w array from file which is [params,[nx]] in size file.w_: dict containing the {varname:index} pairs for the w array file.x : x array from file which is [ndim,[nx]] in size

Also creates HDF5 specific attributes:

file.sac_group - Holds the x and time_group attributes. file.time_group - Holds the series of w arrays.

Largely the HDF5 file is designed so the functionality mimics the VAC binary file, i.e. all the vars are still in the W array etc.

Methods Summary

close()
read_timestep(i)
write_step() Save step data into hdf5 file

Methods Documentation

close()[source] [edit on github]
read_timestep(i)[source] [edit on github]
write_step()[source] [edit on github]

Save step data into hdf5 file