Frequently Answered Question

Question

SAC file format

What is the SAC file format?

Answer

A SAC formatted data file generally contains a single, contiguous segment of time-series data structured as a header section followed by floating point data values. The SAC file format can be either binary or alphanumeric (ASCII). The binary variant can be in either big or little endian byte order; many, but not all, SAC readers will automatically detect the byte order of binary data files and swap input data as needed.

A SAC header contains details required for the identification (network, station, location, channel) and interpretation (start time, sample rate, sample count, etc.) of the time series in addition to fields for storing the coordinates of the station and optionally the event. Two fields exist to describe a scaling factor and units of the resulting time series, beyond that there is usually no further instrument response information included.

All data samples in SAC are stored as floating point values, in the binary format they are 32-bit IEEE floats. There is no standard way to denote a gap in the time series represented in a SAC file, multiple segments of a time series are generally represented using multiple SAC files.

The SAC format is also capable of representing spectral data and general X-Y data, these are not as commonly exchanged as those containing time series data.

Mapping between SEED and SAC channel identification nomenclature used by the DMC:

SEED SAC Header variable
Network KNETWK
Station KSTNM
Location ID KHOLE
Channel KCMPNM

You can find out more about the SAC format and the SAC program in general from here:

SAC (Seismic Analysis Code) is a general purpose interactive program designed for the study of sequential signals, especially timeseries data. Emphasis has been placed on analysis tools used by research seismologists in the detailed study of seismic events.

As a programming reference the sacformat.h attachment is a commonly used C header used to represent the SAC files, the binary SAC header is directly represented by the SACHeader struct.



Updated: 05/19/2017
13:03:42 v.b4412d20