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

Commit

Permalink
Merge pull request #59 from wyeck-usgs/AI
Browse files Browse the repository at this point in the history
Adding Deep Learning Azimuth and Distance Classification Use
  • Loading branch information
jpatton-USGS authored Jun 19, 2019
2 parents 9bf55ca + 34ba79e commit 07f7a6b
Show file tree
Hide file tree
Showing 17 changed files with 647 additions and 173 deletions.
2 changes: 1 addition & 1 deletion cmake/version.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# version.cmake - a CMake script that defines the overall project version
set (PROJECT_VERSION_MAJOR 1)
set (PROJECT_VERSION_MINOR 0)
set (PROJECT_VERSION_PATCH 6)
set (PROJECT_VERSION_PATCH 7)
12 changes: 9 additions & 3 deletions glass-broker-app/params/initialize.d
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,15 @@
"HypocenterTimeWindow": 30,
"HypocenterDistanceWindow": 3
},
"PickClassification": {
"NoiseThreshold": 0.75,
"PhaseThreshold": 0.75
"PickClassification":{
"NoiseClassificationThreshold": 0.75,
"PhaseClassificationThreshold": 0.75,
"DistanceClassificationThreshold": 0.75,
"DistanceClassificationClasses": [0., 1.5, 10., 30.],
"DistanceClassificationClassesLowerBound": [0., 1., 5., 20.],
"DistanceClassificationClassesUpperBound": [4., 15.., 35., 180.]
"AzimuthClassificationThreshold":.75,
"AzimuthClassificationUncertainty":90.
},
"DefaultNucleationPhase": {
"PhaseName": "P",
Expand Down
69 changes: 68 additions & 1 deletion glasscore/glasslib/include/Glass.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <string>
#include <memory>
#include <atomic>

#include <vector>
namespace glasscore {

// forward declarations
Expand Down Expand Up @@ -420,6 +420,36 @@ class CGlass {
*/
static double getPickPhaseClassificationThreshold();

/**
* \brief Gets the optional threshold used for accepting the classification
* of a pick Distance by an external algorithm. -1 indicates this feature is
* disabled
*/
static double getPickDistanceClassificationThreshold();

/**
* \brief Gets the upper distance bound for a given distance class
*/
static double getDistanceClassUpperBound(double distClass);

/**
* \brief Gets the lower distance bound for a given distance class
*/
static double getDistanceClassLowerBound(double distClass);

/**
* \brief Gets the optional threshold used for accepting the classification
* of a pick Azimuth by an external algorithm. -1 indicates this feature is
* disabled
*/
static double getPickAzimuthClassificationThreshold();

/**
* \brief Gets the optional uncertainty used for accepting the classification
* of a pick Azimuth by an external algorithm.
*/
static double getPickAzimuthClassificationUncertainty();

/**
* \brief Gets a pointer to the Correlation list
* \return Returns a pointer to the correlation list
Expand Down Expand Up @@ -708,6 +738,43 @@ class CGlass {
*/
static std::atomic<double> m_dPickPhaseClassificationThreshold;

/**
* \brief The probability threshold for accepting the pick distance
* classification, picks that meet this threshold will use these
* parameters in nulceation/association
*/
static std::atomic<double> m_dPickDistanceClassificationThreshold;

/**
* \brief The possible distance classes from the external classifier
*/
static std::vector<double> m_dPickDistClassificationClasses;

/**
* \brief The distances upper distance bound associated with a given
* distance class.
*/
static std::vector<double> m_dPickDistClassificationClassesUpperBound;

/**
* \brief The distances lower distance bound associated with a given
* distance class.
*/
static std::vector<double> m_dPickDistClassificationClassesLowerBound;

/**
* \brief The probability threshold for accepting the pick azimuth
* classification, picks that meet this threshold will use these
* parameters in nulceation/association
*/
static std::atomic<double> m_dPickAzimuthClassificationThreshold;

/**
* \brief The uncertainty allowed for the pick azimuth
* classification.
*/
static std::atomic<double> m_dPickAzimuthClassificationUncertainty;

/**
* \brief An IGlassSend interface pointer used to send communication
* (such as output data), to outside the glasscore library
Expand Down
13 changes: 6 additions & 7 deletions glasscore/glasslib/include/Pick.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ class CPick {
* std::numeric_limits<double>::quiet_NaN() to omit
*/
CPick(std::shared_ptr<CSite> pickSite, double pickTime,
std::string pickIdString, double backAzimuth,
double slowness);
std::string pickIdString, double backAzimuth, double slowness);

/**
* \brief CPick advanced constructor
Expand Down Expand Up @@ -106,11 +105,11 @@ class CPick {
* magnitude probability, std::numeric_limits<double>::quiet_NaN() to omit
*/
CPick(std::shared_ptr<CSite> pickSite, double pickTime,
std::string pickIdString, double backAzimuth,
double slowness, std::string phase, double phaseProb,
double distance, double distanceProb, double azimuth,
double azimuthProb, double depth, double depthProb,
double magnitude, double magnitudeProb);
std::string pickIdString, double backAzimuth, double slowness,
std::string phase, double phaseProb, double distance,
double distanceProb, double azimuth, double azimuthProb,
double depth, double depthProb, double magnitude,
double magnitudeProb);

/**
* \brief CPick advanced constructor
Expand Down
Loading

0 comments on commit 07f7a6b

Please sign in to comment.