• Antelope Release 5.2-64 Linux Red Hat Enterprise Workstation release 6.2 (Santiago) 2.6.32 2012-04-24

 

NAME

trdefaults.pf - default initialization values for the trace library

DESCRIPTION

The trace library specializes in the manipulation of trace data, especially reading and writing data between databases on disk and an internal database specially designed for trace manipulation. A few of the default values may occasionally need to be overridden for some special purpose. The trdefaults parameter file provides a central location to perform such modifications. It also figures in the procedure for adding a new waveform type.

Foreign Keys

When importing and exporting data, some data may use keys other than station and channel codes to uniquely identify a datastream. SEED uses net and loc codes to disambiguate these situations; autodrm uses net and aux codes. The css 3.0 and 3.1 schemas use only sta and chan to uniquely identify a data stream, and does not include net and loc codes. This leads to multiple different data streams with the same sta and chan codes, as for example with station PFO.

Antelope addresses this problem by providing a mechanism for folding the network code into the station key, and the loc/aux code into the channel key, when required. This is handled by the routines map_autodrm_netsta(3), map_seed_chanloc(3), map_autodrm_chanaux(3), map_seed_netsta(3), autodrm_net(3), seed_net(3), autodrm_aux(3), and seed_loc(3).

These routines first consult the foreign keys tables: snetsta and schanloc or anetsta and achanaux, which provide explicit mappings between foreign and local keys. When no mapping exists in the tables, the routines construct a mapping using defaults from trdefaults.pf.

These default mappings are specified in the Tbl lists seed_net_sta, seed_sta_chan_loc, autodrm_net_sta, and autodrm_sta_chan_aux. Each entry in the list consists of a regular expression followed by the appropriate remapping. (See morphtbl(3) for more examples). For each list, a name is formed by joining the appropriate keys (i.e., net and foreign station code fsta) with underscores (i.e., net_fsta). Then the list is inspected for a matching regular expression. If a match is found, the corresponding remapping is used to obtain the local key (either sta or chan).

For the mapping from seed snet and fsta to local css3.0 sta, the resulting code may be too long for the css3.0 sta field: the sta field is only 6 characters, while seed snet is 2 characters. If an underscore separates fsta and snet, that leaves only 3 characters for the sta code, whereas SEED allows 5 and many sta codes are longer than 3. In this situation, map_seed_netsta resorts to a hard coded strategy, trying one of

When a potential code of the right length is found, it is tested for uniqueness in the snetsta table. When no code can be constructed or the constructed code is not unique, then the strategy is to construct a code of the right length and try sequential characters from the string "0123456789!@#$%^&*();:'<>,.?/{}[]=\|`~-_=+" as the last character of the prospective code, until a unique candidate is found.

When a suitable match is found, an appropriate entry is added to the snetsta table, provided the table is writable. A similar strategy is followed for autodrm anet and the anetsta table, and also for schanloc and achanloc, though it should never be necessary for chan codes or in css3.1, since the fields are sufficiently long to accommodate simple concatenation strategies.

You can interactively query the foreign keys tables (or add to them) with the program trmapnames(1).

autodrm

Miniseed generation

LIBRARY

$(TRLIBS)

SEE ALSO

trsave_wf(3)
trsplice(3)
orb2db(1)
autodrm_net(3)

BUGS AND CAVEATS

PFPATH can be used to override the default location of this file.

AUTHOR

Daniel Quinlan
Printer icon