VACfile

class pysac.io.legacy.VACfile(fname, mode='r', buf=0)[source] [edit on github]

Base input class for VAC Unformatted binary files. Based on FortranFile has been modified to read VAC / SAC output files.

Parameters:

fname: string

Input Filename

mode: {‘r’ | ‘w’}

I/O mode (only ‘r’ is fully supported)

buf: int

underlying I/O buffer size

Returns

——-

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

Methods Summary

close()
process_step() Does the raw file processing for each timestep
read_timestep(i)
write_step()

Methods Documentation

close()[source] [edit on github]
process_step()[source] [edit on github]

Does the raw file processing for each timestep

Sets up the header and reads and reshapes the arrays

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