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

 

NAME

Xphase2db - Save Xphase pickfile to an arrival table

SYNOPSIS

Xphase2db db [-phase name]

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

Special purpose program to take pickfiles created by the Xphase picking program and store the resulting information in a css3.0 arrival table. The pickfile can only contain picks for a single phase type. By default this is P. If other phases are picked, the -phase argument is used to set the phase name in the arrival table.

The program reads the pickfile from standard input, so this program needs to be used either in a pipeline or with input redirection.

One field in the Xphase pickfile is the filename of the parent waveform file. A parameter file is used to define how this file name is parsed to extract the station and channel codes.

OPTIONS

PARAMETER FILE

These parameters define how a file name in the pickfile should be parsed to extract a proper station and channel code to use for the sta and chan fields of the arrival table. The parameters involved are as follows:

separators sets the separators used to divide the tokens used to parse the file name in the pick file. This string of characters is directly passed to the C function strtok(3).

station_token_number sets the number (the first token is numbered 1 here, not 0 ala C) position of the token that defines the station code in the file name.

chan_token_number is the same as station_token_number, but for the channel code.

An example should clarify this. Suppose we had the following file name pattern:

1997273063118.00.ANA.BHZ
The separator here is the period character and the station name, ANA, is the third token while the channel code, BHZ, is the fourth token. This file name would be correctly parsed with the following paramters:
separators .
station_token_number 3
chan_token_number 4

SEE ALSO

strtok(3)

BUGS AND CAVEATS

The strtok approach will not work on every obtuse naming convention I've ever seen, but it should work most of the time. Remember you can use multiple separators to parse something strange like 1999244:13_22_33.2_ANA:BHZ. (In this case it would be :_. as the set of separators.

AUTHOR

Gary L. Pavlis
Antelope User Group Contributed Software
Printer icon