Seismicity Viewer software guide (February 2006)

The Seismicity Viewer is a Java program for interactive viewing of earthquake locations and geographic information in a 3D space.

 

Overview - New Features - Copyright notice, Source codeInstalling and running: stand-alone - Examples: stand-alone - Installing and running: applet - Parameter arguments - Seismicity Viewer File Formats - [NonLinLoc Home]

 

Overview

Seismicity Viewer displays earthquake locations in a 3D volume as probability density functions (PDFs), maximum-likelihood hypocenters, Gaussian expectation hypocenters, Gaussian confidence ellipsoids, and focal mechanisms. Station locations, associated P and S residuals, and geographic and geologic features are also displayed. The 3D volume can be interactively rotated, zoomed and viewed along the coordinate axes in perspective or orthographic projections. The events can viewed together, individually, or in an animated sequence.

View an example local earthquake location with the Seismicity Viewer.

The event data can be in NonLinLoc Hypocenter-Phase File format or in several other formats (SEISAN, ORFEUS-Spyder...). (Conversion of HYPOELLIPSE summary or FPFIT summary formats to NonLinLoc Hypocenter-Phase format is available with the NonLinLoc Utility programs.)

Seismicity Viewer displays events in a local/region mode using rectangular cartesian coordinates, and in a global mode using spherical coordinates (default if no NonLinLoc Grid Header file is used; see below).

The Seismicity Viewer is written in the Java language.

The Seismicity Viewer can be run as:

 

New Features

Version 4.1

Version 3.1


 

Copyright notice, Source code

This page gives instructions and links for downloading and installing theSeismicity Viewer v4.1.

NOTE: Parts of this software are new and have not yet been reviewed or thoroughly tested - IT IS IMPORTANT THAT YOU VERIFY THE CORRECT FUNCTIONING OF THE SOFTWARE FOR YOUR PURPOSES.

If you have problems or suggestions, please contact Anthony Lomax; please specify the type and version of your computer hardware, Java installation, and browser. I would also appreciate hearing about the details of your installation and application of Seismicity Viewer.

Copyright notice:

The Seismicity Viewer program and source code are distributed under the terms of the GNU General Public License (GNU GPL). PLEASE READ, UNDERSTAND AND AGREE WITH THE GNU GPL BEFORE DOWNLOADING OR USING THE SEISMICITY VIEWER SOFTWARE:
GNU General Public License and translations (Or a local copy of the GNU General Public License)

Source code:

The Seismicity Viewer is currently under development. If you would like a copy of the souce code in its current state, please contact Anthony Lomax.

 

Installing and running the Seismicity Viewer Stand-alone

Download and install Seismicity Viewer version 2.1 stand-alone by following the steps below:

  1. Install Java SDK, JDK or JRE 1.1 or higher:
  2. You can check for the presence and version of Java on your system with the command:

    java -version

    or

    jre

    If you do not have a recent version of Java available on your system (JRE (Java Runtime Environment - for end users), or Java SDK (Java Software Development Kit - for developers)), you can download Java from Sun for LINUX, Solaris, Macintosh and Windows.

    If not done automaticlly at installation, remember to update the path environment variable (UNIX) or the PATH variable (Windows) if you want to be able to run the Java executables (java, jar, etc.) from any directory without having to type the full path of the command. See the Java installation documentation for more details.

  3. Create the installation directories and download the Seismicity Viewer program files:
  4. Create a program directory for the Seismicity Viewer class files, i.e.

    my_java_dir/seismicity

    Download the following files to the program directory (To download from a browser directly to local disk, press the right mouse button over each link and select "Save Link As..." (Netscape) or "Save Target As..." (IE), or press Shift+Button1 (Netscape)):

    SeismicityViewer50.jar - Seismicity Viewer class files (the Java "byte-code" for Seismicity Viewer - DO NOT UNPACK THIS FILE))

    Create a work directory for the Seismicity Viewer sample data files, i.e.

    my_work_dir

    Download the sample data files to the work directory:

    vinti.hyp - NonLinLoc Hypocenter-Phase file
    vinti.hdr - NonLinLoc Grid Header file
    vinti.cont.xyz - topography 3D line file
    vinti.text - 3D text file

    Download the defaults file to the work directory:

    seismicitydefaults (or .seismicitydefaults) - Seismicity Viewer defaults file (the user default preferences for Seismicity Viewer, and specifications of line files, text file and other display parameters)

  5. Set the CLASSPATH
  6. The CLASSPATH environment variable tells the Java Virtual Machine and other Java applications where to find the class libraries, including user-defined class libraries. If you are only running Seismicity Viewer you can set the CLASSPATH as follows:

    UNIX:

    setenv CLASSPATH my_java_dir/seismicity/SeismicityViewer50.jar
    (all on one command line)

    Windows:

    set CLASSPATH = my_java_dir\seismicity\SeismicityViewer50.jar
    (all on one command line)

    In these expressions, my_java_dir is substituted by the absolute path to the Java SDK/JDK or JRE installation directory directory.

    The full name of jar files (compressed archives containing class and other files) must always be explicitly listed in the CLASSPATH. To access unarchived class files (*.class) directly you must include in the CLASSPATH the path to the directory containing the *.class files.

    Alternatively, the -classpath command-line switch to the Java executables can be used to specify the location of class files. Sun suggests the use of this switch and not the CLASSPATH variable. See the Java installation documentation for more details.

    NOTE: JRE (1.1 only?) on Windows ignores the CLASSPATH environment variable and the -classpath command-line switch. Instead use the -cp command-line switch. See the JRE README installation documentation for more details.

  7. Run Seismicity Viewer
  8. Run Seismicity Viewer and view the sample data files:

    UNIX:

    Go to the work directory created above and type:

    java net.alomax.seismicity.Seismicity -help
    (if your are using the CLASSPATH environment variable)

    or

    java -classpath my_java_dir/seismicity/SeismicityViewer31.jar \
        net.alomax.seismicity.Seismicity -help

    (all on one command line; if your are using the -classpath command-line switch)

    You should see the Seismicity Viewer usage instructions and a list of command line arguments. Next, type:

    java net.alomax.seismicity.Seismicity vinti.hyp
    (all on one command line; add the -classpath command-line switch if necessary)

    This should launch the Seismicity Viewer viewer and read and display an earthquake location. Read the documentation in the Help->Help sub-menu, and try the various Seismicity Viewer options for "viewing" the earthquake.

    The launcing of Seismicity Viewer can be simpified by the use of an alias, i.e.

    alias svw 'java net.alomax.seismicity.Seismicity'

    Windows (use jre or jrew in place of java, as appropriate):

    Open a DOS console window by selecting Start->Programs->MS DOS Prompt.

    Make sure in the new DOS console window that the PATH includes the path to the Java executables, and (if you are not using the -classpath command-line switch) that the CLASSPATH is set as described above. (You can check the environment by typing the DOS command set. PATH and CLASSPATH may be set in AUTOEXEC.BAT, in another batch file or from the command line.)

    Go to the work directory created above and type:

    java net.alomax.seismicity.Seismicity -help
    (add the -classpath command-line switch if necessary)

    or

    jre -cp my_java_dir\seismicity\SeismicityViewer31.jar net.alomax.seismicity.Seismicity -help
    (all on one command line)

    You should see the Seismicity Viewer usage instructions and a list of command line arguments. Next, type:

    java net.alomax.seismicity.Seismicity vinti.hyp
    (all on one command line; add the -classpath command-line switch if necessary)

    This should launch the Seismicity Viewer viewer and read and display an earthquake location. Read the documentation in the Help->Help sub-menu, and try the various Seismicity Viewer options for "viewing" the seismogram. (Note that wildcard characters (*,?) can be used in filenames on a local file system.)

    The launcing of Seismicity Viewer can be simpified by the use of a batch file, i.e. svw.bat containing, for example,

    java net.alomax.seismicity.Seismicity %1 %2 %3

    NOTE: With the JRE command jrew (Java 1.1 only?) you can launch Seismicity Viewer directly from the Windows Start menu without the need to lauch a DOS console window. See the JRE README installation documentation for more details.

 

Example runs for Seismicity Viewer Stand-alone

    Read data over the Internet - NEIC event search:

    With Seismicity Viewer stand-alone, you can retrieve events over the internet directly from the "USGS/NEIC (PDE) 1973 - Present" and the "NEIC Significant Worldwide Earthquakes" search engines.  Simply add the -search argument to the Seismicity Viewer command, i.e. to retrieve events from the PDE for the past 30 days, enter

    java net.alomax.seismicity.Seismicity -search NEIC#30
    (all on one command line; add the -classpath command-line switch if necessary.)

    There may be some delay in sending the seach request and receiving the search results, depending on the speed of your internet connection.  

    Use -search NEIC[#ndays] or -search NEIC_PDE[#ndays] for the "USGS/NEIC (PDE) 1973 - Present", or -search NEIC_PDEQ[#ndays] for the "USGS/NEIC (PDE-Q) Most Recent Events", or -search NEIC_SWE[#ndays] for the "NEIC Significant Worldwide Earthquakes".  The optional parameter ndays is the number of days before the current date for the start date of the search; if this parameter is not specified the search is performed for the past 60 days.  The "USGS/NEIC (PDE) 1973 - Present" search (NEIC or NEIC_PDE) includes only events with magnitude 5.0 and greater; the other search types include all magnitudes.

    You can also use the form in the File->OpenEventSearch dialog of Seismicity Viewer stand-alone to make an advanced search over start and end times, a rectangular region, depth, and magnitude.

    Read data over the Internet - data files:

    You can read data files directly over the internet by giving the full URL (Uniform Resource Locator) address of one or more seismogram trace files as arguments to the Seismicity Viewer command, i.e.

    java net.alomax.seismicity.Seismicity http://www.alomax.net/seismicity/data/vinti.hyp
    (all on one command line; add the -classpath command-line switch if necessary.)

    or by entering or pasting the URL in the File->OpenURL dialog of Seismicity Viewer stand-alone. (Note that wildcard characters (*,?) cannot be used in URL's.)

    To view global event for 1999 from OREFUS-Spyder in Seismicity Viewer global mode, try:

    java net.alomax.seismicity.Seismicity http://orfeus.knmi.nl/ODC_Data/new_spyder_interface/loc_files/loc1999
    (all on one command line; add the -classpath command-line switch if necessary.)

 

Installing and running the Seismicity Viewer applet

To install and run the Seismicity Viewer you must create an HTML document containing an <APPLET> tag that loads the Seismicity Viewer applet code and specifies various attributes using <PARAM> tags. You must also put all of the Seismicity Viewer compiled code (*.jar and/or *.class files) and event and geographic data files in a public directory (for browser use) or other convenient directories. The Seismicity Viewer can then be run by opening this HTML document in a web browser.

The HTML document has the following form:

<HTML>
<HEAD>
<TITLE>Seismicity Viewer</TITLE>
</HEAD>
<BODY>

<APPLET ARCHIVE=archive CODEBASE=codebase CODE=net.alomax.seismicity.SeismicityApp.class WIDTH=width HEIGHT=height>

<PARAM NAME=appletAttribute1 VALUE=value1>
...
<PARAM NAME=appletAttributeN VALUE=valueN>

</APPLET>

</BODY>
</HTML>

where:


archive (chars)
is an optional attribute that specifies the relative location of a jar archive containing the SeismicityViewer class code. Typically this attribute is set to SeismicityViewer31.jar
codebase (chars)
is an optional attribute that specifies the base URL of the applet - the directory that contains the applet's *.class files or the jar archive. If this attribute is not specified, then the HTML document's URL is used.
width height (integers)
are required attributes that give the initial width and height (in pixels) of the applet display area.
<PARAM NAME=appletAttribute1 VALUE=value1>
are tags that specify Seismicity Viewer program parameter arguments (see below).


Notes:

  1. For more information on the <APPLET> tag see the Sun applet documentation.
  2. Applets have strong security restrictions that limit their functionality. For example, applets loaded over the internet can only open files on the same server they were loaded from, they cannot open or write to files on the local system. See the Sun site Applet Security page for more information.


Download and install Seismicity Viewer applet by following the steps below:

  1. Install an appropriate browser:
  2. To view the Seismicity Viewer applet, you need a browser with Java 1.1 or higher installed and enabled. Netscape 4.5 or higher, Internet Explorer 5, or equivalent is recommended. (You can also use the appletviewer program to view the Seismicity Viewer applet if you have the Java SDK/JDK available on your system. See the SDK/JDK documentation for more information.)

  3. Create the html and installation directories and download the Seismicity Viewer program files:
  4. The Seismicity Viewer applet is launched from an HTML page in a public space on a web server (a directory accessible from from the Internet with a URL, i.e. http://www.alomax.net/seismicity). Default applet security restrictions limit applets to reading files only from the server from which it was launched, and default local security restrictions limit locally run applet to reading files only under the directory from which it is launched (The directory specified by the codebase applet tag, if this tag exists, otherwise the directory containing the HTML page). Thus, for your first Seismicity Viewer applet installation, it is easiest to begin with a directory structure with the HTML page and Seismicity Viewer program files in a top directory, and the data files in a sub-directory.

    Create the top directory for the HTML files and Seismicity Viewer program files, i.e.

    .../public_html/seismicity

    Download the following files to the top directory (To download from a browser directly to local disk, press the right mouse button over each link and select "Save Link As..." (Netscape) or "Save Target As..." (IE), or press Shift+Button1 (Netscape)):

    Seismicity_basic_applet.html - HTML text file that will launch the Seismicity Viewer applet
    SeismicityViewer31.jar - Seismicity Viewer class files (the Java "byte-code" for Seismicity Viewer - DO NOT UNPACK THIS FILE))

    Directly under the top directory, create a sub-directory named "data" for the data files, i.e.

    .../public_html/seismicity/data

    Download the following data files to this sub-directory:

    vinti.hyp - NonLinLoc Hypocenter-Phase file
    vinti.hdr - NonLinLoc Grid Header file
    vinti.cont.xyz - topography 3D line file
    vinti.text - 3D text file

  5. Run your browser and launch the Seismicity Viewer applet
  6. Start your browser and open the HTML page Seismicity_basic_applet.html.

    Click on the link. This will load the Seismicity Viewer applet, and read and display a 3-component seismogram. Read the documentation in the Help->Help sub-menu, and try the various Seismicity Viewer options for "viewing" the seismogram.

    (Click here Seismicity_basic_applet.html to see how the Seismicity Viewer applet loads directly from the Seismicity Viewer site.)

 

Program parameter arguments

The Seismicity Viewer accepts a number of parameter tag attributes to specify an event location file name, geographic data files and other plotting parameters.

For the stand-alone version of Seismicity Viewer, each parameter is given as a command line argument of the form:

-name=value

For the applet version of Seismicity Viewer, each parameter is contained in an HTML tag has the form:

<PARAM NAME=name VALUE=value>

A selection of the principal parameters arguments are described below.  See the Seismicity Viewer Help for a complete list of parameters.

NAME=grid VALUE=gridHeaderFileURL (chars, optional)
the URL (Uniform Resouce Locator - file name or internet link) of a file containing the first line of a NonLinLoc 3D Grid Header file. The bounds of the 3D grid will determine the size of the default view and are plotted as a wire frame. Only the first line of the 3D Grid Header file is used.
Optionally, a second line in the format of the NonLinLocHypocenter-Phase file TRANS Line may be included to specify a geographic transformation if one is not specified in an event file.
If no Grid Header is specified, the default view is the whole earth in 3D.
Example:
37 48 10    -16.0 -27.0 0.0    1.0 1.0 1.0   PROB_DENSITY
TRANSFORM  SIMPLE   LatOrig 40.820959   LongOrig 14.428340  RotCW 0.0

or
101 101 21   -50. -50. 0.    1.0  1.0  1.0   PROB_DENSITY
TRANSFORM  LAMBERT RefEllipsoid Clarke-1880  LatOrig 43.75  LongOrig 7.5  FirstStdParal 43.199300 SecondStdParal 44.996100  RotCW 0.0

NAME=event VALUE=locationFileURL (chars, optional)
the URL (Uniform Resouce Locator - file name or internet link) of an ASCII NonLinLoc Hypocenter-Phase File, or another file type as specified in the NAME=eventfiletype parameter tag, or a Java binary event file ending in .jbin. The events in this file will be displayed by the viewer.
NAME=event.filetype VALUE=eventFileType (chars, optional)
the event file format specification:
eventFileType
description
example line or reference
NLLOC ASCII NonLinLoc "Hypocenter-Phase File"
Hypocenter-Phase File
HYPO NonLinLoc "Quasi-Hypoellipse"
Quasi-Hypoellipse
SPYDER Spyder summary file
OriginTime     Lat         Long     Depth  Mag Comment
9910070450 16. 52.32 N  177.70 W  142  5.5  ANDREANOF ISLANDS, ALEUTIAN IS.
SEISAN SEISAN summary file
Date    OriginTime    Lat      Long      Depth    Mag No Gap Dmin  Rms  Erh  Erz  Erx      Cvxy      Cvxz      Cvyz     Oterr
970928 1516 10.95 43  0.10  12 55.32    0.7    0.3  5 218  3.6 0.00 14.2 25.8 11.6 0.781E+02 0.878E+01 0.218E+02 0.155E+01
STRING_FILE simple string format (in file)
OriginTime               Lat      Lon  Depth Mag Comment
2000 10 31  18 43 20  -17.86  -175.32    33  5.9  TONGA ISLANDS
STRING simple string format (as command argument)
OriginTime               Lat      Lon  Depth Mag Comment
2000,10,31,18,43,20,-17.86,-175.32,33,5.9,TONGA ISLANDS
SEARCH_NEIC_PDE
SEARCH_NEIC_PDEQ

NEIC search "Spreadsheet Format"

2002,09,17,075222.90,-22.34, 171.36,4.9, 33
SEARCH_NEIC_SWE
NEIC search "Screen file format""
PDE-Q 2002 10 10 105019.98 -1.68 134.15 10 7.80 Ms GS .C.G 5T....M

For all formats the event file may contain one or more hypocenters.
Seismicity Viewer displays graphically and in the Information Window the phase information (residuals, first-motions, etc) contained in the NonLinLoc "Hypocenter-Phase File".
Conversion of HYPOELLIPSE summary or FPFIT summary formats to NonLinLoc Hypocenter-Phase format is available with the NonLinLoc Utility programs.
NAME=image2d VALUE=imageFileURL; lat, long lower left; lat, long upper right; [depth (km)] (chars, optional)
parameters for a 2D image file (GIF) that will  be displayed as a horizontal surface when the view is from directly above 
imageFileURL the URL (Uniform Resouce Locator - file name or internet link) of an image file (GIF). 
 lat, long lower left; lat, long upper right the true geographic coordinated of the lower left and upper right corners of the image.
 depth (km) an option depth level for the 2D image surface.
NAME=lines.white VALUE=geogLineFileURL#lineName (chars, optional)
the URL (Uniform Resouce Locator - file name or internet link) of a Seismicity Viewer Geographic line file. The lines in the file geogLineFileURL will be plotted in 3D in color white. The optional string lineName will be the label on a button to toggle the line display on and off.
NAME=lines.black, NAME=lines.blue, NAME=lines.cyan, NAME=lines.darkGray, NAME=lines.gray, NAME=lines.lightGray, NAME=lines.green, NAME=lines.magenta, NAME=lines.orange, NAME=lines.pink, NAME=lines.red, NAME=lines.yellow (chars, optional)
the same as above for other line colors.
NAME=init.plotfirst VALUE=YES or NO (boolean, optional, default=NO)
if YES then only the first location in the event file will be plotted on the initial display, otherwise all events will be plotted
NAME=init.rotation VALUE=z-rot,y-rot,x-rot (floats, optional)
Initial display coordinate rotations in deg ccw for each azis (z-rot,y-rot,x-rot)
NAME=polygons.index VALUE=polygonFileURL;border;fill;RGBcolor;label (chars, optional)
plot 3D planar surfaces each read from a file
index  the index for the symbole set (must be contiguous integers starting from 0)
polygonFileURL the URL (Uniform Resouce Locator - file name or internet link) of file containing a list of polygon vertices (use the same format as a Seismicity Viewer Geographic line file)
border border line style: NO_BORDER, SOLID_BORDER
fill border fill style: NO_FILL, SOLID_FILL, TRANSPARENT_FILL, MESH_FILL
RGBcolor symbol color specified in RGB ( 0-255,0-255,0-255 )
label  menu identification label for polygon
NAME=read.ellipsoids VALUE=YES or NO (boolean, optional, default=YES)
if YES then confidence ellipsoids are read from the event file and stored in memory, otherwise they are ignored. The storage of confidence ellipsoids can use excessive memory for large event files.
NAME=read.mechanisms VALUE=YES or NO (boolean, optional, default=YES)
if YES then focal mechanisms are read from the event file and stored in memory, otherwise they are ignored. The storage of mechanisms can use excessive memory for large event files.
NAME=read.phases VALUE=YES or NO (boolean, optional, default=YES)
if YES then individual phase data are read from the event file and stored in memory, otherwise they are ignored. The storage of phase data can use excessive memory for large event files.
NAME=read.stations VALUE=YES or NO (boolean, optional, default=YES)
if YES then station names and cumulative phase residuals are read from the event file and stored in memory, otherwise they are ignored. Reading and drawing station names is time consuming and can cause significant delays if there are many stations.
NAME=search VALUE=searchType[#ndays] (chars, optional)
retreive events directly from a search source (i.e. a cgi-bin request over the internet)
searchType search souce: NEIC, NEIC_PDE, NEIC_PDEQ, NEIC_SWE
ndays optional number of days before the current date for the start date of the search; if this parameter is not specified the search is performed for the past 60 days 
NAME=show.probability VALUE=YES or NO (boolean, optional, default=YES)
if YES then event probability density scatter clouds will be plotted on the initial display, otherwise they will not be plotted
NAME=symbols.index VALUE=symbolFileURL;type;RGBcolor;label (chars, optional)
plot 3D symbol sets each read from a file
index  the index for the symbole set (must be contiguous integers starting from 0)
symbolFileURL the URL (Uniform Resouce Locator - file name or internet link) of file containing a list of symbol locations (use the same format as a Seismicity Viewer Geographic line file with an extra field specifying the relative symbol size)
type symbol type: CROSS, TETRAHEDRON, INVERTED_TETRAHEDRON, DIAMOND, SPHERE, CUBE, PENTAGON, HEXAGON, OCTAGON, FILLED_SPHERE
RGBcolor symbol color specified in RGB ( 0-255,0-255,0-255 )
label  menu identification label for symbol set
NAME=text VALUE=geogTextFileURL (chars, optional)
the URL (Uniform Resouce Locator - file name or internet link) of a Seismicity Viewer Geographic text file. The text in the file geogTextFileURL will be plotted in 3D. A button withe the label Text allows on/off toggling of the text display.

 

Seismicity Viewer File Formats

Geographic line file - Geographic text file - [NonLinLoc Home]

 

Back to the NonLinLoc site Home page.

Anthony Lomax