Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.
John Patton edited this page Sep 28, 2018 · 24 revisions

Welcome to the neic-glass3 wiki!

Please note that this wiki is Under Construction and not all pages have been completed yet.

Overview

The third generation GLobal ASSociation algorithm (or GLASS3) is an earthquake event detection and association algorithm. This algorithm converts a time series of seismic waveform phase arrival times, back-azimuth estimates, and correlation detections into a catalog of earthquake detections. GLASS3 nucleates detections via a in-memory graph database, a Bayesian affinity function, and a synthetic annealing function. Once a seismic event is found, GLASS3 associates other available data with the seismic event using Bayesian multivariate probability density estimation, affinity statistics, and waveform phase travel-time table lookups.

Design

Glass Design

GLASS3 is designed around the core association and nucleation libraries (glasscore). All communication with the core libraries is by JSON formatted messages or interfaces. It is the purpose of the process library to monitor the input interface for new data, send data to glasscore, and to pass results to the output interface.

The Parse library is used to convert between various internal and external formats.

The util library is a support library used by the others for various functions, logging, configuration, and message formatting.

Various external libraries, including SuperEasyJSON, RapidJSON, spdlog, librdkafka, etc., are stored in the lib directory.

Application Documentation

DOxygen Library Documentation

External Libraries

  • GLASS3 utilizes rapidjson to format, parse, and write JSON. A copy of rapidjson is included in this project.
  • The glass core library utilizes SuperEasyJSON to format, parse, and write JSON. A copy of SuperEasyJSON is included in this project.
  • GLASS3 uses uuid on linux for unique identifiers, this package may need to be installed via the sudo yum install libuuid libuuid-devel command.
  • GLASS3 uses the earthquake-detection-formats library for input and output formatting. A copy of earthquake-detection-formats is downloaded as part of the build.
  • GLASS3 optionally uses the hazdev-broker library for input and output processing. A copy of hazdev-broker is downloaded as part of the build.
  • GLASS3 optionally uses the librdkafka library for input and output processing. A copy of librdkafka is included in this project.
  • GLASS3 optionally uses doxygen for documentation generation. A copy of doxygen is optionally downloaded as part of the build.
  • GLASS3 optionally uses cpplint to check coding style. A copy of cpplint is included in this project.
  • GLASS3 optionally uses cppcheck for static code analysis.
  • GLASS3 optionally uses googletest for unit testing. A copy of googletest is optionally downloaded as part of the build.
  • GLASS3 optionally uses lcov/gcov for code coverage analysis.

Formats

GLASS3 supports several input and output formats. Glass uses the earthquake-detection-formats library for formatting (except the legacy formats).

Supported input formats:

Internal formats:

Supported output formats:

Legacy testing formats:

  • globalpick - A space delimited seismic arrival time pick format used at the NEIC.
  • ccdata - A space delimited cross-correlation pick/detection format used by a prototype cross-correlation algorithm being developed at the NEIC.

Building

The steps to get and build GLASS3 using CMake are as follows:

  1. Clone neic-glass3.
  2. Open a command window and change directories to neic-glass3
  3. Make a build directory mkdir build
  4. Make a distribution directory mkdir dist
  5. Change to the build directory cd build
  6. Run the the appropriate CMake command:
    a. cmake .. -DCMAKE_INSTALL_PREFIX=../dist -DRAPIDJSON_PATH=../lib/rapidjson -DBUILD_GLASS-APP=0 to build just the glass core libraries
    b. cmake .. -DCMAKE_INSTALL_PREFIX=../dist -DRAPIDJSON_PATH=../lib/rapidjson to build the glass core libraries and glass-app application.
    c. cmake .. -DCMAKE_INSTALL_PREFIX=../dist -DRAPIDJSON_PATH=../lib/rapidjson -DBUILD_GEN-TRAVELTMES-APP=1 to build the glass core libraries, glass-app, and gen-traveltimes-app applications.
    d. cmake .. -DCMAKE_INSTALL_PREFIX=../dist -DRAPIDJSON_PATH=../lib/rapidjson -DBUILD_GLASS-BROKER-APP=1 -DLIBRDKAFKA_C_LIB=/usr/local/lib/librdkafka.a -DLIBRDKAFKA_CPP_LIB=/usr/local/lib/librdkafka++.a -DLIBRDKAFKA_PATH=/usr/local/include/librdkafka to build the glass core libraries, glass-app, and glass-broker-app applications.
    NOTE: Requires that librdkafa be built and installed.
  7. If you are on a *nix system, you should now see a Makefile in the current directory. Just type 'make' to build the glass libraries and desired applcations.
  8. If you are on Windows and have Visual Studio installed, a Glass.sln file and several .vcproj files will be created. You can then build them using Visual Studio.
  9. Note that for *nix you must generate seperate build directories for x86 vs x64 compilation specifying the appropriate generator cmake -G <generator> ...

Note that example configuration files are included in the project, including an example station list file. Input data examples are included in testdata.

Configuration

See GLASS3 Configuration for help in configuring GLASS3.

Backlog