obspy.io.sac.util

SAC module helper functions and data.

Public Functions

byteswap Swapping of bytes for provided arrays.
enum_int_to_string Convert enumerated int values in header dictionary to string values.
enum_string_to_int Convert enumerated string values in header dictionary to int values.
get_sac_reftime Get SAC header reference time as a UTCDateTime instance from a SAC header
is_same_byteorder Deal with all the ways to compare byte order string representations.
is_valid_enum_int
is_valid_enum_str
obspy_to_sac_header Make a SAC header dictionary from an ObsPy Stats or dict instance.
sac_to_obspy_header Make an ObsPy Stats header dictionary from a SAC header dictionary.
split_microseconds
utcdatetime_to_sac_nztimes

Private Functions

Warning

Private functions are mainly for internal/developer use and their API might change without notice.

_clean_str Remove null values and whitespace, return a str
_convert_enum

Exceptions

SacError Raised if the SAC file is corrupt or if necessary information
SacHeaderError Raised if header has issues.
SacHeaderTimeError
SacIOError Raised if the given SAC file can’t be read.
SacInvalidContentError Raised if headers and/or data are not valid.