Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

usgs/neic-glass3

Repository files navigation

THIS PROJECT HAS BEEN ARCHIVED

Please see [https://code.usgs.gov/ghsc/neic/algorithms/neic-glass3)

codecov Codacy Badge Documentation

neic-glass3

Next generation seismic event detection and association algorithm developed by the United States Geological Survey National Earthquake Information Center and Caryl Erin Johnson, PhD, Introspective Systems LLC.

This algorithm converts a time series of seismic waveform phase arrival times, back azimuth estimates from array beams, and cross-correlated detections into a catalog of earthquake detections.

The algorithm nucleates detections via a Bayesian stacking algorithm using an in-memory graph database of detection nodes. Once a detection is made, the algorithm associates other available arrival times, back azimuths, etc. using affinity statistics and waveform phase travel-time table lookups.

Dependencies

  • Glass utilizes JSON for formatting.
  • Glass uses a CMake build script (CMakeLists.txt) for cross platform compilation. A copy of CMake is not included in this project
  • Glass 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.
  • Glass uses uuid on linux for unique identifiers, this package is not included in this project, and may need to be installed via the sudo yum install libuuid libuuid-devel command.
  • Glass uses the earthquake-detection-formats library for input and output formatting. A copy of earthquake-detection-formats is downloaded as part of the build.
  • Glass optionally uses the hazdev-broker library for input and output processing. A copy of hazdev-broker is downloaded as part of the build.
  • Glass optionally uses the librdkafka library for input and output processing. A copy of librdkafka is included in this project.
  • Glass optionally uses doxygen for documentation generation. A copy of doxygen is optionally downloaded as part of the build.
  • Glass optionally uses cpplint to check coding style. A copy of cpplint is included in this project.
  • Glass optionally uses cppcheck for static code analysis. A copy of cppcheck is not included in this project.
  • Glass optionally uses googletest for unit testing. A copy of googletest is optionally downloaded as part of the build.
  • Glass optionally uses lcov/gcov for code coverage analysis. A copy of lcov/gcov is not included in this project.

Building

The steps to get and build neic-glass3 using CMake are as follows:

  1. Clone neic-glass3.
  2. Open a command window and change directories to Glass
  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> ...

Further Information and Documentation

For further information and documentation please check out the neic-glass3 Wiki, neic-glass Documentation Site, and the Examples Directory.

File bug reports, feature requests and questions using GitHub Issues