PySAC
A Python interface to the Seismic Analysis Code (SAC) file format
Contact Us
- Seismoacoustics Software Team
General information about PySAC
PySAC is a Python interface to the Seismic Analysis Code (SAC) file format, supporting little and big-endian binary and alphanumeric format, containing evenly-sampled time-series data.
PySAC emphasizes intuitive header access, header consistency, and ObsPy support.
Features
- Read and write SAC binary or ASCII
- autodetect or specify expected byteorder
- optional file size checking and/or header consistency checks
- header-only reading and writing
- “overwrite OK” checking (‘lovrok’ header)
- Convenient access and manipulation of relative and absolute time headers
- User-friendly header printing/viewing
- Fast access to header values from attributes
- With type checking, null handling, and enumerated value checking
- With type checking, null handling, and enumerated value checking
- Conversion from ObsPy Trace to SAC trace retains detected previous SAC header values.
- Conversion to ObsPy Trace retains the complete SAC header.