[SAC-HELP] lost headers?

Arthur Snoke snoke at vt.edu
Sat Jan 21 17:51:47 PST 2012


> My understanding was that wsac1 keeps all the header values from the 
> most recent rsac1 call? However, in the following example, file tmp1.z 
> lost all its event/station coordinates and related headers.

No.  wsac1 and wsac2 write "minimum headers."  wsac0 writes full headers 
and includes updates to header values for a SAC file that had been read in 
and then processed.

We found that the help command for the last couple of versions was 
incomplete so did not explain and give examples for the various read and 
write routines.  That will be corrected in v101.5b -- coming soon.

         WSAC1 writes evenly spaced files
         WSAC2 writes unevenly spaced and spectral files
         WSAC0 writes either format but has more comprehensive header files
         than the other two

WSAC1 and WSAC2 write SAC files with a minimum header contains only those 
variables needed to be able to read the file: B, E, DELTA, LEVEN, and 
NPTS. For calls to WSAC0, If it is a new file, it requires a call to 
subroutine NEWHDR supplemented by additional header variables to be set 
using the SETXXX routines (see examples below). If it is writing to a file 
that is based on one that had been read in previously in the program, one 
should not call NEWHDR. Before writing such a file using WSAC0, SAC 
updates the header variables such as DEPMAX and BAZ. As shown in the 
examples below, the type of SAC data file that gets written depends on 
header variables that must be set: IFTYPE and LEVEN. IFTYPE has the 
following values:



More information about the sac-help mailing list