PHILOSOPHY AND STRUCTURE
SAC file format
A seismic data trace is a set of data points that is continuous in time but that may not have been sampled at an even rate. SAC's simple approach to seismic data deems that there is one seismic trace per file. Each file contains a header that describes the trace (also known as metadata) and a section that contains the actual data. The header occupies a fixed-length position at the beginning of each file, followed by the variable-length data section.
Header data is of mixed type: integer and real values, logical (true/false) values, categorical values (distinct properties like explosive source, nuclear source, earthquake source), or text (station code, event identification, wave arrival type). The seismic data in a trace is a sequence of real-valued numbers representing the sampled physical property.
Alphanumeric and binary forms
There are both binary and alphanumeric (character) formats for a SAC file. The binary version is a more compact format that is efficiently read and written, while the alphanumeric format is easier for user programs to read and write.
The alphanumeric data format is intended for ease of reading and writing and for transfer between different machine types. In this format, the header data is organized into sections based on the type of data, with each section subdivided into lines. While not an intuitive organization, this makes it easier to read and write the header data because all of the data on each line of the file is of the same type: integer, real, etc.