obspy.io.sac.core._is_sac

_is_sac(filename)[source]

Checks whether a file is a SAC file or not.

Parameters:filename (str, open file, or file-like object) SAC file to be checked.
Return type:bool
Returns:True if a SAC file.

Example

>>> from obspy.core.util import get_example_file
>>> _is_sac(get_example_file('test.sac'))
True
>>> _is_sac(get_example_file('test.mseed'))
False