obspy.sac.sacio.SacIO.ReadSacFile

SacIO.ReadSacFile(fh, fsize=True)[source]

Read read in the header and data in a SAC file

The header is split into three arrays - floats, ints, and strings and the data points are returned in the array seis

Parameters:fh file or file-like object.
>>> from obspy.sac import SacIO 
>>> tr = SacIO() 
>>> with open('test.sac') as fh:
...     tr.ReadSacFile(fh)  

This is equivalent to:

>>> with open('test.sac') as fh:
...     tr = SacIO(fh)