SHM provides an interface for the integration of external programs. These external programs may operate on the parameter data gathered so far or on waveform data exported in ASCII data files. Parameter data can also be reimported into SHM. Parameter data exchange format is the text based evt-File format. Typical examples of such programs are mapping tools for epicentres or own location programs. But, of course, many more types of applications can be implemented by the user.
The interface is controlled by a text file located in the user's private directory: $SH_USERDIR/external_processes.txt. Configurable are the ten plugin entries of the Plugin submenu under Specials, one of the two location buttons of the LocSAT dialog box and routines executed after activation of Read New and Final Parameters. The syntax of the file entries is:
<command> <iface-number> <parameter>
Lines beginning with ! are comments and are ignored. The items specified on the lines must be separated by one or more blanks. The items itself therefore must not contain any blanks.
<iface-number>
Integer number specifying the interface number. The numbers 1 to 10 refer to the ten menu entries of the plugin submenu (from top to bottom). Number 11 stands for the second location button in the LocSAT dialog box. This is preferably connected with a location program (which is not checked, however). Number 12 is a routine called after Read New of the read dialog box has been selected, number 13 is a routine called after Final Parameters has been activated. By default, all plugin entries are empty, i.e. no action is associated. Usually several commands are associated with a plugin interface, which means that several lines exist for each interface number in the external_processes.txt file. Even if not required by the software, it is recommended to group the commands sorted by interface number.
<command> and <parameter>
Available commands are:
An example entry in external_processes.txt would look like:
label 1 Preview_Map writeevt 1 epimap.evt shell 1 preview_map.csh
The first line sets the name in the first menu entry to Preview Map, the second creates an output file $SH_SCRATCH/epimap.evt and the third line calls a plotting program to create a map around the epicentre found in epimap.evt. The program needs to read and interpret the evt-file format.
In case of a location program the lines would look similar to
label 11 Hypocenter writeevt 11 hypo.evt shell 11 call_hypo.csh resetpar 11 readevt 11 hypout.evt
There additional entries resetpar and readevt replace the original parameter set and phase picks. The hypout.evt is an output of the call_hypo.csh program. This program must be able to read and write evt-files. The hypout.evt file should include all information passed by hypo.evt plus an added/modified epicenter location.
This page last modified 10-Sep-2005