obspy.io.sac.core._write_sac_xy
- _write_sac_xy(stream, filename, **kwargs)[source]
Writes a alphanumeric SAC file.
Warning
This function should NOT be called directly, it registers via the the
write()
method of an ObsPyStream
object, call this instead.- Parameters:
stream (
Stream
) – The ObsPy Stream object to write.filename (str, open file, or file-like object) – Name of file to write. In case an open file or file-like object is passed, this function only supports writing Stream objects containing a single Trace. This is a limitation of the SAC file format. An exception will be raised in case it’s necessary.
Example
>>> from obspy import read >>> st = read() >>> st.write("testxy.sac", format="SACXY")