obspy.sac.sacio.SacIO.WriteSacBinary

SacIO.WriteSacBinary(fh)[source]

Write a SAC binary file using the head arrays and array seis.

Parameters:fh open file or file-like object.
>>> from obspy.sac import SacIO 
>>> with open('test.sac', 'rb') as fh:
...     tr = SacIO(fh) 
>>> with open('test2.sac', 'wb') as fh:
...     tr.WriteSacBinary(fh) 
>>> import os
>>> os.stat('test2.sac')[6] == os.stat('test.sac')[6] 
True