• Antelope Release 5.5 Mac OS X 10.8.5 2015-04-21

 

NAME

sac2db - create css database from sac headers

SYNOPSIS

sac2db [-v] sacfile [ sacfile ... ] database

SUPPORT


Contributed code: NO BRTT support.
THIS PIECE OF SOFTWARE WAS CONTRIBUTED BY THE ANTELOPE USER COMMUNITY. BRTT DISCLAIMS ALL OWNERSHIP, LIABILITY, AND SUPPORT FOR THIS PIECE OF SOFTWARE.

FOR HELP WITH THIS PIECE OF SOFTWARE, PLEASE CONTACT THE CONTRIBUTING AUTHOR.

DESCRIPTION

sac2db creates a database using (some of) the information in a SAC header. It creates the wfdisc, site and sitechan tables, leaving the data in the original (float or intel float) format in the SAC file. If event or arrival information is present, this information is used to add to the event, origin, arrival and assoc tables.

FILES

The input files must be SAC. The output files are standard CSS format.

EXAMPLE



% sac2db *.SAC new_db
% ls
LVZ.BHE.cut.SAC         NRIL.BHN.cut.SAC        new_db.site
LVZ.BHN.cut.SAC         NRIL.BHZ.cut.SAC        new_db.sitechan
LVZ.BHZ.cut.SAC         new_db.lastid           new_db.wfdisc
NRIL.BHE.cut.SAC        new_db.remark
% 

DIAGNOSTICS

All these error messages indicate a problem in writing records to the database. The message should indicate the root cause of the problem (permissions or conflicting records in the database).

SEE ALSO

dbintro(3)

BUGS AND CAVEATS

Because the sac header is not very complete, the database records are likewise missing important information. Furthermore, because sac headers are often constructed by hand, they tend not to be very consistent, and there are sometimes local conventions which differ from place to place.

Generally, sac2db soldiers on with fairly verbose error messages. Although it may fail at adding some site or sitechan records, these problems can generally be fixed by editing the resultant database by hand with dbverify(1) (to find problems) and dbe(1) or dbset(1) to fix them.

A common complaint is that depths appear not to be copied correctly. Apparently, it is common practice among SAC users to specify depth in kilometers in the sac header; the documentation, however, clearly states that all depths are in meters. In the CSS schema, depths are in kilometers, and consequently, sac2db divides depths from the sac headers by 1000.0 to convert from meters to kilometers.

AUTHOR

Daniel Quinlan
Antelope User Group Contributed Software
Printer icon