obspy.io.sac.core._read_sac_xy
- _read_sac_xy(filename, headonly=False, debug_headers=False, **kwargs)[source]
Reads an alphanumeric SAC file and returns an ObsPy Stream object.
Warning
This function should NOT be called directly, it registers via the ObsPy
read()
function, call this instead.- Parameters:
filename (str, open file, or file-like object) – Alphanumeric SAC file to be read.
headonly (bool) – If set to True, read only the head. This is most useful for scanning available data in huge (temporary) data sets.
debug_headers (bool) – Extracts also the SAC headers
'nzyear', 'nzjday', 'nzhour', 'nzmin', 'nzsec', 'nzmsec', 'delta', 'scale', 'npts', 'knetwk', 'kstnm', 'kcmpnm'
which are usually directly mapped to theStream
object if set toTrue
. Those values are not synchronized with the Stream object itself and won’t be used during writing of a SAC file! Defaults toFalse
.
- Return type:
- Returns:
A ObsPy Stream object.
Example
>>> from obspy import read >>> st = read("/path/to/testxy.sac")