This chapter referes to Seisan Explorer (SE) Version 2.7.0, compiled with Qt Version 5.12.10
The core part of the SE code is written by Øyind Natvik, Department of Earth Science, University of Bergen, Norway. The statistical functions are mainly written by Peter Voss.
Seisan Explorer (hereafter called SE) is a new graphical user interface for SEISAN written in C++/QT. It is supported on Windows, Linux and UNIX platforms. In its current version, it replaces the old SEISAN graphical interface for Windows, but the intention is that SE will be the main graphical user interface for SEISAN through which most of the current processing by EEV and MULPLT will take place. However, remaking MULPLT requires a large effort so the current MULPLT is used for now. In the following description, it is assumed that the user is familiar with SEISAN.
Please report bugs and questions to email@example.com
SE is installed together with Seisan.
SE need to be compiled on Linux/UNIX platforms. Please see section 3.10.
SE has not been tested or compiled on Mac.
When opening a database, SE will load the contents of all S-files into memory. Opening a database of 100.000 events will require 350+ megabytes of memory
SE works with the new Nordic format, Nordic2.
Parameter files for SE
SE uses the same parameter files as the rest of SEISAN whenever a corresponding program is called. The parameter file SEISAN.DEF is the only one used by SE directly while MULPLT.DEF and STATIONx.HYP are raed when respective options are used. SE will first look for the file in the SE work directoy, which might not be the the directory from which you started SE, but the directory specified as the SE work directory, see later. If the file is not found in the the SE work directory, it will be read from DAT. The STATIONx.HYP is treated the same way as it is ingrated with SE. MULPLT is a program running outside SE so MULPLT.DEF will first be read from directory where SE is started and then from DAT if not there..
How SE works:
SE can be started in two ways: Clicking on the icon in Windows or givng the command se on the prompt line (Windows and Linux). When using the command line option, arguments can be used like for EEV:
se „ Working with a local data base
se start date Using default data base from start date and +30 days
se start date intereval ——————– + interval days
se start date data base interval ————– using given data base
e.g. se 20110122 TRO 10 will load data from data base TRO for the time interval January 22, 2011 and the next 10 days.
To get the options, write se help.
SE loads S-files from a SEISAN database. Only the S-files that falls within a user specified time interval are read. You may also load an index file or a local database. In this case, the currently set time interval is ignored, and time interval is adjusted automatically to fit the loaded data All information in the S-files is stored in memory for fast access. SE is dimensioned for up to one million events. In contrast to EEV, SE can read in data for several months or years, thereby giving the user the opportunity to work with large datasets without any artificial time boundaries. A subset of the data in each S-file is displayed in rows in the Event List view as demonstrated on the front page and in Figure 4.1.
When a database has been loaded, the user can select one or several events for further action, a bit like EEV. The Event List view columns can to a certain degree be customized (EventList/Select Columns). A Log view is available where most system messages are shown.
An overview of the SE application:
The application can present two views, the Event List view and the Log view. The Event List view is shown in the figure below. The program also has a title bar at the top and a status bar at the bottom. The title bar shows the currently opened database and the number of events loaded.
The left part of the status bar shows messages. Status bar messages will only be displayed for a few seconds and then disappear since they might soon be replaces by another message. The right part of the status bar shows permanent information which is the current time interval and the current operator code.
The Event List view
When a database is loaded into SE, the Event List view will be populated (see Figure 4.1), and the first event will automatically be selected. To navigate, use mouse, arrow keys or the scroll bars. Click on an event to select it. Several events can be selected as needed using standard selection procedures. Some items in the event list view may be displayed with a grey background colour. This indicates that additional information will pop up if hovering over these items with the mouse pointer.
In the Event List view you can:
Executing actions. Right-click inside the Event List view to bring up the Event List menu. The menu shows all available actions and their corresponding shortcuts. The current actions are:
Note that most actions are disabled while SE is busy loading a database.
Sorting data in the Event List view.
The default sorting is by date/time. However, the eventlist can also be sorted by the contents of any other column to sort by this column. Simply click on the header of any column and all events displayed are in the order of the clicked column. The order can also be reversed by clicking the header again. E.g. clicking twice on the depth column will order events by increasing depth. Columns with text will be sorted alphabetically.
Event List menu
Under this menu we find options for dealing with the Event List view . They are:
The event selection filter
SE has an event selection filter similar to SELECT, but with many more options. Since the selection is done with data in memory, it is very fast compared to any other method of event selection. After a selection is made, the selected events are shown in the Event List View, and further processing can be done with these events. Selections are made using logical expressions built from tokens.
The selection filter has two parts, one filter to include events, and one filter to exclude events. When applying the selection filter, the include expression is executed first and will return a list of all events that matches that expression. Next, the exclude filter will be applied if it has been defined. The exclude filter will be applied only to the result of the include filter, thereby reducing the resulting event list further. This can e.g. be used to select all events between 4 and 8 in magnitude but exclude events with magnitude 5 to 6. Both filters are defined in the same way with logical expressions. See examples below.
To createa filter, press Ctrl-F, or use the Event List menu to bring up the filter dialog (see figure 4.2). Click the Edit buttons to bring up the expression builder.
The expression builder is used to define the include/exclude expressions. In expression builder, you may get explanation and examples for each token by right-clicking the token button. An include expression is mandatory. The use of an exclude expression is usually optional. When you are done creating and testing the filter, you may save the filter to a .flt file. The filter can then be loaded again later as needed. The filter's description is also saved.
The following token types are used in expressions:
These are properties in the S-file, like latitude, agency and magnitudes. Property names always start with a dollar sign, like
Values are numbers or strings.
The following logical operators are supported: , , , , , AND, OR. In addition parentheses are also supported.
Functions take a set of parameters. The return value is the logical value 'true' or 'false'. All functions take their parameters inside square brackets.
An example of a simple expression is
$Lat > 55 AND $Lat < 70 AND $Mag > 2
which selects events between 55 and 70 degrees N and with magnitude larger than 2.
An example of an expression with a function is
$Agency = "ber" AND InRange[$Lat,30,60]
which selects all events with agency 'ber' and latitude from 30 to 60.
Rules for writing a valid expression:
$property = value. The statements must be bound together by AND/OR operators to form an expression that evaluates to true or false when executed.
$agency = "ber"is eqal to
$AGENCY = "BER".
The expression builder will check the expression for errors when pressing the OK button. If any errors are detected, an error message will appear, and the error will have to be corrected.
There is a special keyword 'IncludeAll', that can be used in the include filter to include all events. If this keyword is used then an exclude expression is mandatory. Also note that this keyword must be used alone. It cannot be combined with other tokens.
Magnitudes in selection filter.
Since most events has several types of magnitudes, it can sometimes be difficult to select on magnitude criteria. SEISAN therefore optionally has a unique magnitude (or main magnitude) for each event called M. M is assigned to one of the magnitudes given for the event according to criteria for event type and event agency as set up in SEISAN.DEF. The selection criteria can use either the unique magnitude or a combination of magnitudes types and magnitude agencies.
The Log view.
The Log view (Figure 4.4) shows all important messages from SE. Information messages are black, warnings are blue, and errors are in red colour. Every time an error occurs, it will be logged here, and SE will automatically switch to the Log view to make the user aware of the error. The log view has a menu that can be activated by right-clicking anywhere in the view.
The menu has commands for common tasks such as clearing the view, or saving it to a file. If the Log view holds lines with errors/warnings for S-files, then it is possible to edit these S-files directly from the log view by right-clicking the line.
The work directory.
SE will always use a specific work directory where the log file and all output is written, e.g. from hypocenter locations. This work directory is independent from where SE is started, whether from the desktop or a particular directory. The work directory is by default WOR, but an alternative directory can be set (File/Set Work Directory). The work directory is also the local directory where MULPLT will look for waveform files irrespective of from which directory SE has been started. The current work directory is shown in the Log view when SE is started. Multiple running copies of SE should not share the same work directory. Therefore - when SE starts up - it will look for the existence of a lock file called se-workdir.lock in its work directory. If it does not exist, then it will be created to signal that directory is now in use. If it exists, then this may indicate that another user is currently using the work directory. In this case a dialog box with a warning appears (see Figure 4.5). The user will be allowed to remove the lock file (if he is sure that none else is actually using the work directory), or select a new work directory, or exit the program. Any lock file created by SE will automatically be deleted when the program is closed. If SE should crash, then the lock file will be left in the work directory. In this case it can safely be deleted manually.
Multiple running copies of SE should not share the same work directory. Therefore - when SE starts up - it will look for the existence of a lock file called se-workdir.lock in its work directory. If it does not exist, then it will be created to signal that directory is now in use. If it exists, then this may indicate that another user is currently using the work directory. In this case a dialog box with a warning appears (see Figure 4.5).
The user will be allowed to remove the lock file (if he is sure that none else is actually using the work directory), or continue to select a new work directory. Any lock file created by SE will automatically be deleted when the program is closed. If SE should crash, then the lock file will be left in the work directory. In this case it can safely be removed manually.
Open a database.
Databases are opened under File/Open. The choices are: Default Database (as set by DEF_BASE), Local Database, Database, Catalog File and Index File. The 'Database' option will open a dialog box showing the REA directory with all databases (standard 5 letter directories), and one can be selected. A new option - compared to EEV - is that a database (the year month structure) can be located under any directory, not just REA. It can be selected by navigating the file system from the dialog box. This arbitrary structure must have corresponding waveform files in WAV, SE working directory or a named directory (see SEISAN.DEF) and cannot use the WAV structure since it is not placed in a standard REA structure.
The 'Catalog File' option makes it possible to open a catalog file. SE will extract the S-Files inside the cat-file to a user-selectable folder, and then open the folder as a local database. When closing the database, user will be prompted to save any changes back to the catalog file. The folder will not be automatically removed when the database is closed. It will have to be deleted manually.
SE can be configured to automatically open the last used database on start-up (see File/Configure).
Local data base in SE, access to EEV and reading waveform files.
Case 1: Default working directory
The default working directory in SE (example Windows) is \seismo \WOR \. A local data base can then be opened in any other directory. The waveform files must then be in WAV or WOR. If they are in the local data base directory, they can be found if parameter WAVEFORM_DIRS is set in SEISAN.DEF like
WAVEFORM_DIRS Waveform directory \seismo \wor \test
where the location of the waveform files are given as \seismo \wor \test , which also can be the local data base directory.
EEV will not work since EEV will look in SE working directory.
Case 2: Directory with local data base is set as SE working directory
In SE the working directory can be set under file File/Set Work Directory... When set to the directory of the local data base, EEV will work and waveform files will be found if in WAV or local data base directory. WAVEFORM_DIRS does not need to be set. However, no other local data base can be opened (a bug to be fixed).
Setting a time interval.
When a database is being opened, SE will suggest a default time interval. The default time interval has an End date equal to the current date, and the Start date is set to the current date minus 30 days (this value is user configurable). Both start-date and end-date can be modified by the user (see Figure 4.6). The default time span between start-date and end-date can be set under File/Configure. The time interval can be changed at any time by pressing ctrl-t or using the main menu (File/Set Time Interval). If the time interval is changed when a database is open, then the user will be prompted to reload the database.
Special functions have been written for SE, see below. To add new functions the two functions Sample function A and Sample function B can be used. Add changed in the source code of sample_function_A.cpp or sample_function_B.cpp and recompile. If you wish to change the widget we recommend to use Qt Creator, see http://qt-project.org/wiki/Category:Tools::QtCreator. Sample function A show how to get values in the event list. Sample function B show how to use the plotting widget QCustomPlot (see also http://www.workslikeclockwork.com/index.php/components/qt-plotting-widget/).
The functions are operations dealing will all data in the Event View, and not the data manually selected. The functions are:
se-completeness.out. An example is seen in figure 4.9.
se-completeness.out as input (see 4.9). An example is seen in figure 4.10.
mulplt.wav in Ascii Helmberger format. An example is seen in figure 4.19