|
neic-glass3
1.4.6
|
glasscore hypocenter class More...
#include <Hypo.h>

Public Member Functions | |
| CHypo () | |
| CHypo constructor. More... | |
| CHypo (std::shared_ptr< json::Object > detection, double thresh, int cut, std::shared_ptr< traveltime::CTravelTime > firstTrav, std::shared_ptr< traveltime::CTravelTime > secondTrav, std::shared_ptr< traveltime::CTTT > ttt, double resolution=100, double aziTaper=360.0, double maxDepth=800.0, CSiteList *pSiteList=NULL) | |
| CHypo advanced constructor. More... | |
| CHypo (double lat, double lon, double z, double time, std::string pid, std::string web, double bayes, double thresh, int cut, std::shared_ptr< traveltime::CTravelTime > firstTrav, std::shared_ptr< traveltime::CTravelTime > secondTrav, std::shared_ptr< traveltime::CTTT > ttt, double resolution=100, double aziTaper=360.0, double maxDepth=800.0) | |
| CHypo advanced constructor. More... | |
| CHypo (std::shared_ptr< CTrigger > trigger, std::shared_ptr< traveltime::CTTT > ttt) | |
| CHypo advanced constructor. More... | |
| CHypo (std::shared_ptr< CCorrelation > corr, std::shared_ptr< traveltime::CTravelTime > firstTrav, std::shared_ptr< traveltime::CTravelTime > secondTrav, std::shared_ptr< traveltime::CTTT > ttt) | |
| CHypo advanced constructor. More... | |
| ~CHypo () | |
| CHypo destructor. More... | |
| void | clear () |
| CHypo clear function. More... | |
| bool | initialize (double lat, double lon, double z, double time, std::string pid, std::string web, double bayes, double thresh, int cut, std::shared_ptr< traveltime::CTravelTime > firstTrav, std::shared_ptr< traveltime::CTravelTime > secondTrav, std::shared_ptr< traveltime::CTTT > ttt, double resolution=100, double aziTaper=360.0, double maxDepth=800.0) |
| CHypo initialization function. More... | |
| bool | addPickReference (std::shared_ptr< CPick > pck) |
| Add pick reference to this hypo. More... | |
| void | removePickReference (std::shared_ptr< CPick > pck) |
| Remove pick reference from this hypo. More... | |
| bool | hasPickReference (std::shared_ptr< CPick > pck) |
| Check if pick is referenced by this hypo. More... | |
| void | clearPickReferences () |
| Clear all pick references for this hypo. More... | |
| void | addCorrelationReference (std::shared_ptr< CCorrelation > corr) |
| Add correlation reference to this hypo. More... | |
| void | removeCorrelationReference (std::shared_ptr< CCorrelation > corr) |
| Remove correlation reference from this hypo. More... | |
| bool | hasCorrelationReference (std::shared_ptr< CCorrelation > corr) |
| Check if correlation is referenced by this hypo. More... | |
| void | clearCorrelationReferences () |
| Clear all correlation references for this hypo. More... | |
| std::shared_ptr< json::Object > | generateHypoMessage () |
| Generate Hypo message. More... | |
| std::shared_ptr< json::Object > | generateEventMessage () |
| Generate Event message. More... | |
| std::shared_ptr< json::Object > | generateCancelMessage () |
| Generate cancel message. More... | |
| std::shared_ptr< json::Object > | generateExpireMessage () |
| Generate expire message. More... | |
| bool | canAssociate (std::shared_ptr< CPick > pick, double sigma, double sdassoc, bool p_only=false, bool debug=false) |
| Check to see if pick could be associated. More... | |
| double | getTravelTimeForPhase (std::shared_ptr< CPick > pick, std::string phaseName) |
| Gets the travel time for the given pick and phase to this hypo. More... | |
| double | calculateDistanceToPick (std::shared_ptr< CPick > pick) |
| Gets the distance between the given pick and phase to this hypo. More... | |
| double | calculateResidual (std::shared_ptr< CPick > pick, bool *useForLocations=NULL, std::string *phaseName=NULL, bool p_only=false) |
| Calculates the residual of a pick to this hypo. More... | |
| bool | canAssociate (std::shared_ptr< CCorrelation > corr, double tWindow, double xWindow) |
| Check to see if correlation could be associated. More... | |
| double | calculateAffinity (std::shared_ptr< CPick > pck) |
| double | calculateAffinity (std::shared_ptr< CCorrelation > corr) |
| bool | pruneData (CHypoList *parentThread=NULL) |
| bool | cancelCheck () |
| Evaluate hypocenter viability. More... | |
| bool | reportCheck () |
| Evaluate hypocenter report suitability. More... | |
| void | calculateStatistics () |
| Calculate supporting data statistical values. More... | |
| double | anneal (int nIter=5000, double dStart=100.0, double dStop=1.0, double tStart=5., double tStop=.5) |
| Fast baysian fit synthetic annealing location algorithm used by nucleation. More... | |
| double | localize () |
| Location calculation function. More... | |
| void | annealingLocateBayes (int nIter, double dStart, double dStop, double tStart, double tStop, bool nucleate=false) |
| Baysian Fit synthetic annealing location algorithm. More... | |
| void | annealingLocateResidual (int nIter, double dStart, double dStop, double tStart, double tStop, bool nucleate=false) |
| Residual synthetic annealing location algorithm. More... | |
| double | calculateGap (double lat, double lon, double z) |
| Calculate gap. More... | |
| double | calculateCurrentBayes () |
| Calculate bayes at current location. More... | |
| double | calculateBayes (double xlat, double xlon, double xZ, double oT, bool nucleate) |
| Calculate bayes. More... | |
| double | calculateAbsResidualSum (double xlat, double xlon, double xZ, double oT, bool nucleate) |
| Calculate absolute residual sum. More... | |
| double | calculateWeightedResidual (std::string sPhase, double tObs, double tCal) |
| Calculate residual for a phase Calculates the weighted residual (with S down weighted) for the current location given the phase, observed travel time, and calculated travel time. More... | |
| void | graphicsOutput () |
| Write files for plotting output. More... | |
| bool | resolveData (std::shared_ptr< CHypo > hypo, bool allowStealing=true, CHypoList *parentThread=NULL) |
| Ensure all supporting data belong to this hypo. More... | |
| void | trap () |
| Supporting data link checking function. More... | |
| double | getAzimuthTaper () const |
| Get the azimuth taper used on the bayseian stack value in order to compensate for a large azimuthal gap. More... | |
| double | getMaxDepth () const |
| Get the maximum allowed depth for this hypo. More... | |
| double | getLatitude () const |
| Get the latitude for this hypo. More... | |
| void | setLatitude (double lat) |
| Set the latitude for this hypo. More... | |
| double | getLongitude () const |
| Get the longitude for this hypo. More... | |
| void | setLongitude (double lon) |
| Set the longitude for this hypo, accounting for the longitude wrap at +/-180. More... | |
| double | getDepth () const |
| Get the depth for this hypo. More... | |
| void | setDepth (double z) |
| Sets the depth for this hypo. More... | |
| glass3::util::Geo | getGeo () const |
| Get the combined hypo location (latitude, longitude, depth) as a CGeo object. More... | |
| double | getTOrigin () const |
| Get the origin time for this hypo. More... | |
| void | setTOrigin (double newTOrg) |
| Sets the origin time for this hypo. More... | |
| double | getBayesValue () const |
| Gets the current bayes stack value for this hypo. More... | |
| bool | getCorrelationAdded () const |
| Gets whether a correlation has been added to this hypo. More... | |
| void | setCorrelationAdded (bool corrAdded) |
| Sets whether a correlation has been added to this hypo. More... | |
| bool | getEventGenerated () const |
| Gets whether an event message was generated for this hypo. More... | |
| bool | getHypoGenerated () const |
| Gets whether an hypo message was generated for this hypo. More... | |
| bool | getFixed () const |
| Gets whether this hypo is fixed. More... | |
| void | setFixed (bool fixed) |
| Sets whether this hypo is fixed. More... | |
| double | getInitialBayesValue () const |
| Gets the initial (nucleation) bayes stack value for this hypo. More... | |
| double | getAssociationDistanceCutoff () const |
| Gets the association distance cutoff used in canAssociate() and generateAffinitu() More... | |
| double | getDistanceCutoffFactor () const |
| Gets the distance cutoff factor used in calculating the Association Distance Cutoff. More... | |
| int | getNucleationDataThreshold () const |
| Gets the threshold that represents the minimum count of data required to successfully nucleate or maintain (via passing cancelCheck() a hypocenter. More... | |
| void | setNucleationDataThreshold (int cut) |
| Sets the threshold that represents the minimum count of data required to successfully nucleate or maintain (via passing cancelCheck() a hypocenter. More... | |
| double | getNucleationStackThreshold () const |
| Gets the nucleation stack minimum threshold used in determining hypo viability in cancelCheck() More... | |
| void | setNucleationStackThreshold (double thresh) |
| Sets the nucleation stack minimum threshold used in determining hypo viability in cancelCheck() More... | |
| double | getGap () const |
| Gets the azimuthal gap as of the last call of calculateStatistics. More... | |
| int | getTeleseismicPhaseCount () const |
| Gets the teleseismic phase count as of the last call of calculateStatistics. More... | |
| double | getMedianDistance () const |
| Gets the median data distance as of the last call of calculateStatistics() More... | |
| double | getMinDistance () const |
| Gets the minimum data distance as of the last call of calculateStatistics() More... | |
| std::mutex & | getProcessingMutex () |
| Gets the mutex used to ensure that the hypo can be processed by only one thread at a time. More... | |
| double | getWebResolution () const |
| Gets the node resolution of the web that nucleated this hypo. More... | |
| double | getDistanceSD () const |
| Gets the current distance standard deviation. More... | |
| int | getProcessCount () const |
| Gets the current process count, used by HypoList to prevent continuous hypo reprocessing. More... | |
| int | setProcessCount (int newCycle) |
| Sets the process count, used by HypoList to prevent continuous hypo reprocessing. More... | |
| int | getTotalProcessCount () const |
| Gets the total process count. More... | |
| int | incrementTotalProcessCount () |
| Increments the total process count. More... | |
| const std::string & | getID () const |
| Gets the identifier for this hypo. More... | |
| const std::string & | getWebName () const |
| Gets the name of the web that nucleated this hypo. More... | |
| int | getPickDataSize () const |
| Get the current size of the supporting data pick vector. More... | |
| std::vector< std::shared_ptr< CPick > > | getPickData () const |
| Get a vector containing all the supporting pick data for this hypo. More... | |
| int | getCorrelationDataSize () const |
| Get the current size of the supporting data correlation vector. More... | |
| double | getTCreate () const |
| Get the time that this hypo was created. More... | |
| std::shared_ptr< traveltime::CTravelTime > | getNucleationTravelTime1 () const |
| Get the primary phase/travel time used in nucleating this hypo This object is kept in CHypo for performance (throughput) reasons, and is used in the calculateBayes() and calculateAbsResidualSum() functions. More... | |
| std::shared_ptr< traveltime::CTravelTime > | getNucleationTravelTime2 () const |
| Get the secondary phase/travel time used in nucleating this hypo This object is kept in CHypo for performance (throughput) reasons, and is used in the calculateBayes() and calculateAbsResidualSum() functions. More... | |
| std::shared_ptr< traveltime::CTTT > | getTravelTimeTables () const |
| Get the list of association phases / travel times for this hypo This object is kept in CHypo for performance (throughput) reasons, and is used in canAssociate() calculateResidual(), and annealingLocateResidual() functions. More... | |
| int | getReportCount () const |
| Gets the number of times that this hypo has been reported. More... | |
| bool | isLockedForProcessing () |
| Gets whether the mutex accessed via getProcessingMutex() is locked. More... | |
| int64_t | getTSort () const |
| Get the sorting time for this hypo. More... | |
| void | setTSort (double newTSort) |
| Set the sorting time for this hypo. More... | |
| void | setTCreate (double newTCreate) |
| Sets the time that this hypo was created. More... | |
| void | setNucleationAuditingInfo (double tNucleation, double tNucleationKeyPickInsertion) |
| Set nucleation auditing info for this hypo. More... | |
| const HypoAuditingPerformanceStruct * | getHypoAuditingPerformanceInfo () |
| Returns performance-auditing information for the hypo via a const HypoAuditingPerformanceStruct pointer. More... | |
Static Public Attributes | |
| static constexpr double | k_dResidualSigmaLengthSeconds = 1.0 |
| The residual sigma length in seconds. More... | |
| static constexpr double | k_dGapTaperDownBegin = 270.0 |
| The beginning of the gap taper. More... | |
| static constexpr double | k_dGapTaperDownEnd = 360.0 |
| The end of the gap taper. More... | |
| static constexpr double | k_dTimeToDistanceCorrectionFactor = 10.0 |
| The factor to correct time to distance. More... | |
| static constexpr double | k_dVerticalToHorizontalDistanceCorrectionFactor = 2.0 |
| The factor to correct vertical to horizontal distance. More... | |
| static constexpr double | k_dBayesFactorMaximumRange = 0.2 |
| The maximum range factor used in bayes stack calculations. More... | |
| static constexpr double | k_dBayesFactorExponent = 2.0 |
| The exponent factor used in bayes stack calculations. More... | |
| static constexpr double | k_dBayesFactorStepSizeReduction = 500.0 |
| The step size reduction factor used in bayes stack calculations. More... | |
| static constexpr double | k_dLocationChangeWebResolutionRatio = 0.5 |
| static constexpr double | k_dMinimumDepthChangeKMThreshold = 7.5 |
| The minimum depth change in km that constitutes a significant change in location. Used for auditing purposes. More... | |
| static constexpr double | k_dMinimumDepthChangeRatioThreshold = 0.25 |
| The minimum depth change (expressed as a ratio to the previous depth, that constitutes a significant change in location. Used for auditing purposes. More... | |
| static constexpr double | k_dInitialAnnealStepReducationFactor = .5 |
| The initial step reduction factor for anneal. More... | |
| static constexpr double | k_dFinalAnnealStepReducationFactor = 100.0 |
| The final step reduction factor for anneal. More... | |
| static constexpr double | k_dLocationMinDistanceStepSize = 1.0 |
| The minimum location iteration distance step size. More... | |
| static constexpr double | k_dLocationMinTimeStepSize = 0.1 |
| The minimum location iteration time step size. More... | |
| static constexpr double | k_dLocationSearchRadiusToTime = 30.0 |
| The factor used to convert the location search radius to time. More... | |
| static constexpr double | k_dLocationTaperConstant = 0.0001 |
| The location taper constant. More... | |
| static constexpr double | k_dLocationMaxTaperThreshold = 30.0 |
| The maximum threshold for the location taper. More... | |
| static const int | k_iLocationNPicksToSkipSmall = 5 |
| The small nPick threshold to skip during location. More... | |
| static const int | k_iLocationNPicksToSkipMedium = 10 |
| The medium nPick threshold to skip during location. More... | |
| static const int | k_iLocationNPicksToSkipLarge = 25 |
| The large nPick threshold to skip during location. More... | |
| static const int | k_iLocationNPickThresholdSmall = 25 |
| The nPick threshold indicating a small hypo during location. More... | |
| static const int | k_iLocationNPickThresholdMedium = 50 |
| The nPick threshold indicating a medium hypo during location. More... | |
| static const int | k_iLocationNPickThresholdLarge = 150 |
| The nPick threshold indicating a large hypo during location. More... | |
| static const int | k_iLocationNumIterationsSmall = 500 |
| The small number of location iterations to perform for a hypo. More... | |
| static const int | k_iLocationNumIterationsMedium = 1250 |
| The medium number of location iterations to perform for a hypo. More... | |
| static const int | k_iLocationNumIterationsLarge = 10000 |
| The large number of location iterations to perform for a hypo. More... | |
| static constexpr double | k_dSearchRadiusResolutionFactor = 1.0 |
| The factor for dividing the web resolution when computing the location search radius. More... | |
| static constexpr double | k_dSearchRadiusTaperFactor = 0.75 |
| The factor for multiplying the taper when computing the location search radius. More... | |
| static constexpr double | k_dSearchRadiusFactor = 0.5 |
| The factor for dividing when computing the location search radius. More... | |
glasscore hypocenter class
The CHypo class is the class that encapsulates everything necessary to represent an earthquake hypocenter.
CHypo also maintains vectors of shared_ptr's to CPick and CCorrelation objects that make up the data that supports the hypocenter
CHypo contains functions to support association, disassociation, location, removal, and various statistical calculations, as well as generating output data in various formats.
The CHypo associate() and prune() functions essentially make up the glasscore data association engine, along with the various statistical calculations.
The glasscore location algorithm consists of the CHypo anneal(), localize(), annealingLocateBayes(), annealingLocateResidual(), calculateBayes(), and calculateAbsResidualSum() functions, along with the various statistical calculations.
CHypo uses smart pointers (std::shared_ptr).
| glasscore::CHypo::CHypo | ( | ) |
| glasscore::CHypo::CHypo | ( | std::shared_ptr< json::Object > | detection, |
| double | thresh, | ||
| int | cut, | ||
| std::shared_ptr< traveltime::CTravelTime > | firstTrav, | ||
| std::shared_ptr< traveltime::CTravelTime > | secondTrav, | ||
| std::shared_ptr< traveltime::CTTT > | ttt, | ||
| double | resolution = 100, |
||
| double | aziTaper = 360.0, |
||
| double | maxDepth = 800.0, |
||
| CSiteList * | pSiteList = NULL |
||
| ) |
CHypo advanced constructor.
An advanced constructor for the CHypo class. This function initializes members to the provided values found in the json detection message.
| detection | - A shared pointer to a json::Object to containing the data to construct the hypo from |
| thresh | - A double containing the threshold value for this hypo |
| cut | - An integer containing the Bayesian stack threshold for this hypo |
| firstTrav | - A traveltime::CTravelTime containing the first travel time used in creating this hypo |
| secondTrav | - A traveltime::CTravelTime containing the second travel time used in creating this hypo |
| ttt | - A traveltime::CTTT to be used for association for this hypo |
| resolution | - A double value containing the web resolution used |
| aziTaper | = A double value containing the azimuth taper to be used, defaults to 360 |
| maxDepth | = A double value containing the maximum allowed depth, defaults to 800 |
| pSiteList | - A pointer to the CSiteList class to use when looking up the pick station |
| glasscore::CHypo::CHypo | ( | double | lat, |
| double | lon, | ||
| double | z, | ||
| double | time, | ||
| std::string | pid, | ||
| std::string | web, | ||
| double | bayes, | ||
| double | thresh, | ||
| int | cut, | ||
| std::shared_ptr< traveltime::CTravelTime > | firstTrav, | ||
| std::shared_ptr< traveltime::CTravelTime > | secondTrav, | ||
| std::shared_ptr< traveltime::CTTT > | ttt, | ||
| double | resolution = 100, |
||
| double | aziTaper = 360.0, |
||
| double | maxDepth = 800.0 |
||
| ) |
CHypo advanced constructor.
An advanced constructor for the CHypo class. This function initializes members to the provided values.
| lat | - A double containing the geocentric latitude in degrees to use |
| lon | - A double containing the geocentric longitude in degrees to use |
| z | - A double containing the geocentric depth in kilometers to use |
| time | - A double containing the Gregorian time in seconds to use |
| pid | - A std::string containing the id of this hypo |
| web | - A std::string containing the name of the web that nucleated this hypo |
| bayes | - A double containing the bayesian value for this hypo. |
| thresh | - A double containing the threshold value for this hypo |
| cut | - An integer containing the Bayesian stack threshold for this hypo |
| firstTrav | - A traveltime::CTravelTime containing the first travel time used in creating this hypo |
| secondTrav | - A traveltime::CTravelTime containing the second travel time used in creating this hypo |
| ttt | - A traveltime::CTTT to be used for association for this hypo |
| resolution | - A double value containing the web resolution used |
| aziTaper | = A double value containing the azimuth taper to be used, defaults to 360 |
| maxDepth | = A double value containing the maximum allowed depth, defaults to 800 |
|
explicit |
CHypo advanced constructor.
An advanced constructor for the CHypo class. This function initializing members to the values contained in the provided CTrigger object, used when a new hypo is nucleated.
| trigger | - A CTrigger object containing the nucleation trigger to construct this hypo from. |
| ttt | - A traveltime::CTTT to be used for association for this hypo |
|
explicit |
CHypo advanced constructor.
An advanced constructor for the CHypo class. This function initializing members to the values contained in the provided CCorrelation object, used when a creating a new hypo based on a correlation message.
| corr | - A shared pointer to a CNode object containing the correlation to construct this hypo from. |
| firstTrav | - A traveltime::CTravelTime containing the first travel time used in creating this hypo |
| secondTrav | - A traveltime::CTravelTime containing the second travel time used in creating this hypo |
| ttt | - A traveltime::CTTT to be used for association for this hypo |
| glasscore::CHypo::~CHypo | ( | ) |
| void glasscore::CHypo::addCorrelationReference | ( | std::shared_ptr< CCorrelation > | corr | ) |
Add correlation reference to this hypo.
Adds a shared_ptr reference to the given correlation to the list of supporting correlation references for this hypo, representing a graph database link between this hypocenter and the provided correlation. This link also represents a correlation association.
Note that this correlation may or may not also be referenced by other hypocenters
| corr | - A std::shared_ptr to the CCorrelation object to add. |
| bool glasscore::CHypo::addPickReference | ( | std::shared_ptr< CPick > | pck | ) |
Add pick reference to this hypo.
Adds a shared_ptr reference to the given pick to the list of supporting pick references for this hypo, representing a graph database link between this hypocenter and the provided pick. This link also represents a phase association.
Note that this pick may or may not also be referenced by other hypocenters
| pck | - A std::shared_ptr to the CPick object to add. |
| double glasscore::CHypo::anneal | ( | int | nIter = 5000, |
| double | dStart = 100.0, |
||
| double | dStop = 1.0, |
||
| double | tStart = 5., |
||
| double | tStop = .5 |
||
| ) |
Fast baysian fit synthetic annealing location algorithm used by nucleation.
Rapid synthetic annealing algoritym used by nucleation to calculate an initial starting location.
Also computes supporting data statistics by calling calculateStatistics()
| nIter | - An integer containing the number of iterations to perform, defaults to 250 |
| dStart | - A double value containing the starting distance iteration step size in kilometers, default 100 km |
| dStop | - A double value containing the ending distance iteration step size in kilometers, default 1 km |
| tStart | - A double value containing the starting time iteration step size in seconds, default 5 seconds |
| tStop | - A double value containing the ending time iteration step size in seconds, default 0.5 seconds |
| void glasscore::CHypo::annealingLocateBayes | ( | int | nIter, |
| double | dStart, | ||
| double | dStop, | ||
| double | tStart, | ||
| double | tStop, | ||
| bool | nucleate = false |
||
| ) |
Baysian Fit synthetic annealing location algorithm.
Locator which uses synthetic annealing to compute the geographic point of the maximum bayesian fit given the supporting data.
| nIter | - An integer value containing the number of iterations |
| dStart | - A double value containing the distance starting value |
| dStop | - A double value containing the distance stopping value |
| tStart | - A double value containing the time starting value in gregorian seconds |
| tStop | - A double value containing the time stopping value in gregorian seconds |
| nucleate | - An boolean flag that sets if this is a nucleation which limits the phase used. |
| void glasscore::CHypo::annealingLocateResidual | ( | int | nIter, |
| double | dStart, | ||
| double | dStop, | ||
| double | tStart, | ||
| double | tStop, | ||
| bool | nucleate = false |
||
| ) |
Residual synthetic annealing location algorithm.
Locator which uses synthetic annealing to compute the geographic point of the minimum of sum of absolute of residuals given the supporting data.
| nIter | - An integer value containing the number of iterations |
| dStart | - A double value containing the distance starting value |
| dStop | - A double value containing the distance stopping value |
| tStart | - A double value containing the time starting value in gregorian seconds |
| tStop | - A double value containing the time stopping value in gregorian seconds |
| nucleate | - A boolean flag that sets if this is a nucleation, which limits the phases used. |
| double glasscore::CHypo::calculateAbsResidualSum | ( | double | xlat, |
| double | xlon, | ||
| double | xZ, | ||
| double | oT, | ||
| bool | nucleate | ||
| ) |
Calculate absolute residual sum.
Calculates the sum of the absolute residuals of the supporting data for a given location. Used in calculating locations by annealingLocateResidual()
| xlat | - A double of the latitude to evaluate |
| xlon | - A double of the longitude to evaluate |
| xZ | - A double of the depth to evaluate |
| oT | - A double of the oT in gregorian seconds |
| nucleate | - A boolean flag that sets if this is a nucleation, which limits the phases used. |
| double glasscore::CHypo::calculateAffinity | ( | std::shared_ptr< CPick > | pck | ) |
| double glasscore::CHypo::calculateAffinity | ( | std::shared_ptr< CCorrelation > | corr | ) |
| double glasscore::CHypo::calculateBayes | ( | double | xlat, |
| double | xlon, | ||
| double | xZ, | ||
| double | oT, | ||
| bool | nucleate | ||
| ) |
Calculate bayes.
Calculates the total bayseian stack value for a given location using the supporting data. Used in calculating locations by annealingLocateBayes()
| xlat | - A double of the latitude to evaluate |
| xlon | - A double of the longitude to evaluate |
| xZ | - A double of the depth to evaluate |
| oT | - A double of the oT to evaluate |
| nucleate | - A boolean flag that sets if this is a nucleation, which limits the phases used. |
| double glasscore::CHypo::calculateCurrentBayes | ( | ) |
Calculate bayes at current location.
Calculates the total bayseian stack value at current location using the supporting data.
| double glasscore::CHypo::calculateDistanceToPick | ( | std::shared_ptr< CPick > | pick | ) |
Gets the distance between the given pick and phase to this hypo.
Calculates the distance between the given supporting data to this hypo for the given phase
| pick | - The pick to calculate a distance for for |
| phaseName | - The phase name to use for calcuation |
| double glasscore::CHypo::calculateGap | ( | double | lat, |
| double | lon, | ||
| double | z | ||
| ) |
Calculate gap.
Calculates the azimuthal gap for a given location using the supporting data
| lat | - latitude of test location |
| lon | - longitude of test location |
| z | - depth of test location |
| double glasscore::CHypo::calculateResidual | ( | std::shared_ptr< CPick > | pick, |
| bool * | useForLocations = NULL, |
||
| std::string * | phaseName = NULL, |
||
| bool | p_only = false |
||
| ) |
Calculates the residual of a pick to this hypo.
Calculates the residual of the given supporting data to this hypo
| pick | - The pick to calculate a residual for |
| useForLocations | - An optional pointer to a boolean flag to be returned indicating whether this pick can be used in locations, default is null. |
| phaseName | - An optional pointer to a string to be returned indicating the phase name, default is null. |
| p_only | - A boolean flag indicating that this pick should calculate a residual ONLY for P, default to false |
| void glasscore::CHypo::calculateStatistics | ( | ) |
Calculate supporting data statistical values.
Calculate various statistical values for this hypo, including minimum distance, median distance, gap, kurtosis value, and association distance cutoff as part of the anneal() and localize()
| double glasscore::CHypo::calculateWeightedResidual | ( | std::string | sPhase, |
| double | tObs, | ||
| double | tCal | ||
| ) |
Calculate residual for a phase Calculates the weighted residual (with S down weighted) for the current location given the phase, observed travel time, and calculated travel time.
| sPhase | - A string with the phase type |
| tObs | - The observed travel time in gregorian seconds |
| tCal | - The calculated travel time in gregorian seconds |
| bool glasscore::CHypo::canAssociate | ( | std::shared_ptr< CPick > | pick, |
| double | sigma, | ||
| double | sdassoc, | ||
| bool | p_only = false, |
||
| bool | debug = false |
||
| ) |
Check to see if pick could be associated.
Check to see if a given pick could be associated to this CHypo
| pick | - A std::shared_ptr to the CPick object to check. |
| sigma | - A double value containing the sigma to use |
| sdassoc | - A double value containing the standard deviation assocaiation limit to use |
| p_only | - A boolean flag indicating that this pick should try to associate ONLY with P, default to false |
| p_only | - A boolean flag indicating that debug logging should be performed, default to false |
| bool glasscore::CHypo::canAssociate | ( | std::shared_ptr< CCorrelation > | corr, |
| double | tWindow, | ||
| double | xWindow | ||
| ) |
Check to see if correlation could be associated.
Check to see if a given correlation could be associated to this CHypo
| corr | - A std::shared_ptr to the CCorrelation object to check. |
| tWindow | - A double value containing the time window to use |
| xWindow | - A double value containing the distance window |
| bool glasscore::CHypo::cancelCheck | ( | ) |
Evaluate hypocenter viability.
Evaluate whether the hypocenter is viable, first by checking to see if the current number of supporting data exceeds the configured threshold, second checking if the current bayes value exceeds the configured threshold, and finally making a depth/gap check to ensure the hypocenter is not a "whispy".
| void glasscore::CHypo::clear | ( | ) |
CHypo clear function.
| void glasscore::CHypo::clearCorrelationReferences | ( | ) |
Clear all correlation references for this hypo.
Clears the list of supporting shared_ptr correlation references for this hypo
Note correlations may or may not be still referenced by other hypocenters
| void glasscore::CHypo::clearPickReferences | ( | ) |
Clear all pick references for this hypo.
Clears the list of supporting shared_ptr pick references for this hypo
Note picks may or may not be still referenced by other hypocenters
| std::shared_ptr< json::Object > glasscore::CHypo::generateCancelMessage | ( | ) |
Generate cancel message.
Generate a json object representing a cancellation of this hypocenter in the "Cancel" format
| std::shared_ptr< json::Object > glasscore::CHypo::generateEventMessage | ( | ) |
Generate Event message.
Generate a json object representing a summary of this hypocenter in the "Event" format
| std::shared_ptr< json::Object > glasscore::CHypo::generateExpireMessage | ( | ) |
Generate expire message.
Generate a json object representing a expiration of this hypocenter in the "Expire" format
If this hypocenter was previously reported, a copy of it is included in this message via the generateHypoMessage() function
| std::shared_ptr< json::Object > glasscore::CHypo::generateHypoMessage | ( | ) |
Generate Hypo message.
Generate a json object representing this hypocenter in the "Hypo" format
| double glasscore::CHypo::getAssociationDistanceCutoff | ( | ) | const |
Gets the association distance cutoff used in canAssociate() and generateAffinitu()
| double glasscore::CHypo::getAzimuthTaper | ( | ) | const |
Get the azimuth taper used on the bayseian stack value in order to compensate for a large azimuthal gap.
| double glasscore::CHypo::getBayesValue | ( | ) | const |
Gets the current bayes stack value for this hypo.
| bool glasscore::CHypo::getCorrelationAdded | ( | ) | const |
Gets whether a correlation has been added to this hypo.
Gets whether a correlation has been added to this hypo. This flag is used in preserving hypos generated from correlations long enough for supporting data to be added.
| int glasscore::CHypo::getCorrelationDataSize | ( | ) | const |
Get the current size of the supporting data correlation vector.
| double glasscore::CHypo::getDepth | ( | ) | const |
Get the depth for this hypo.
| double glasscore::CHypo::getDistanceCutoffFactor | ( | ) | const |
Gets the distance cutoff factor used in calculating the Association Distance Cutoff.
| double glasscore::CHypo::getDistanceSD | ( | ) | const |
Gets the current distance standard deviation.
| bool glasscore::CHypo::getEventGenerated | ( | ) | const |
Gets whether an event message was generated for this hypo.
| bool glasscore::CHypo::getFixed | ( | ) | const |
Gets whether this hypo is fixed.
| double glasscore::CHypo::getGap | ( | ) | const |
Gets the azimuthal gap as of the last call of calculateStatistics.
| glass3::util::Geo glasscore::CHypo::getGeo | ( | ) | const |
Get the combined hypo location (latitude, longitude, depth) as a CGeo object.
| const HypoAuditingPerformanceStruct * glasscore::CHypo::getHypoAuditingPerformanceInfo | ( | ) |
Returns performance-auditing information for the hypo via a const HypoAuditingPerformanceStruct pointer.
| bool glasscore::CHypo::getHypoGenerated | ( | ) | const |
Gets whether an hypo message was generated for this hypo.
| const std::string & glasscore::CHypo::getID | ( | ) | const |
Gets the identifier for this hypo.
| double glasscore::CHypo::getInitialBayesValue | ( | ) | const |
Gets the initial (nucleation) bayes stack value for this hypo.
| double glasscore::CHypo::getLatitude | ( | ) | const |
Get the latitude for this hypo.
| double glasscore::CHypo::getLongitude | ( | ) | const |
Get the longitude for this hypo.
| double glasscore::CHypo::getMaxDepth | ( | ) | const |
Get the maximum allowed depth for this hypo.
| double glasscore::CHypo::getMedianDistance | ( | ) | const |
Gets the median data distance as of the last call of calculateStatistics()
| double glasscore::CHypo::getMinDistance | ( | ) | const |
Gets the minimum data distance as of the last call of calculateStatistics()
| int glasscore::CHypo::getNucleationDataThreshold | ( | ) | const |
Gets the threshold that represents the minimum count of data required to successfully nucleate or maintain (via passing cancelCheck() a hypocenter.
If threshold is 10, then 8 picks + 1 correlation + 1 beam would be sufficient, but 9 picks would not be.
| double glasscore::CHypo::getNucleationStackThreshold | ( | ) | const |
Gets the nucleation stack minimum threshold used in determining hypo viability in cancelCheck()
| std::shared_ptr< traveltime::CTravelTime > glasscore::CHypo::getNucleationTravelTime1 | ( | ) | const |
Get the primary phase/travel time used in nucleating this hypo This object is kept in CHypo for performance (throughput) reasons, and is used in the calculateBayes() and calculateAbsResidualSum() functions.
| std::shared_ptr< traveltime::CTravelTime > glasscore::CHypo::getNucleationTravelTime2 | ( | ) | const |
Get the secondary phase/travel time used in nucleating this hypo This object is kept in CHypo for performance (throughput) reasons, and is used in the calculateBayes() and calculateAbsResidualSum() functions.
| std::vector< std::shared_ptr< CPick > > glasscore::CHypo::getPickData | ( | ) | const |
Get a vector containing all the supporting pick data for this hypo.
| int glasscore::CHypo::getPickDataSize | ( | ) | const |
Get the current size of the supporting data pick vector.
| int glasscore::CHypo::getProcessCount | ( | ) | const |
Gets the current process count, used by HypoList to prevent continuous hypo reprocessing.
| std::mutex & glasscore::CHypo::getProcessingMutex | ( | ) |
Gets the mutex used to ensure that the hypo can be processed by only one thread at a time.
| int glasscore::CHypo::getReportCount | ( | ) | const |
Gets the number of times that this hypo has been reported.
| double glasscore::CHypo::getTCreate | ( | ) | const |
Get the time that this hypo was created.
| int glasscore::CHypo::getTeleseismicPhaseCount | ( | ) | const |
Gets the teleseismic phase count as of the last call of calculateStatistics.
| double glasscore::CHypo::getTOrigin | ( | ) | const |
Get the origin time for this hypo.
| int glasscore::CHypo::getTotalProcessCount | ( | ) | const |
Gets the total process count.
| double glasscore::CHypo::getTravelTimeForPhase | ( | std::shared_ptr< CPick > | pick, |
| std::string | phaseName | ||
| ) |
Gets the travel time for the given pick and phase to this hypo.
Calculates the travel time of the given supporting data to this hypo for the given phase
| pick | - The pick to calculate a travel tiem for for |
| phaseName | - The phase name to use for calcuation |
| std::shared_ptr< traveltime::CTTT > glasscore::CHypo::getTravelTimeTables | ( | ) | const |
Get the list of association phases / travel times for this hypo This object is kept in CHypo for performance (throughput) reasons, and is used in canAssociate() calculateResidual(), and annealingLocateResidual() functions.
| int64_t glasscore::CHypo::getTSort | ( | ) | const |
Get the sorting time for this hypo.
| const std::string & glasscore::CHypo::getWebName | ( | ) | const |
Gets the name of the web that nucleated this hypo.
| double glasscore::CHypo::getWebResolution | ( | ) | const |
Gets the node resolution of the web that nucleated this hypo.
| void glasscore::CHypo::graphicsOutput | ( | ) |
Write files for plotting output.
| bool glasscore::CHypo::hasCorrelationReference | ( | std::shared_ptr< CCorrelation > | corr | ) |
Check if correlation is referenced by this hypo.
Check to see if a shared_ptr reference from the given correlation to this hypo exists
Note that this correlation may or may not be also referenced by other hypocenters
| corr | - A std::shared_ptr to the CCorrelation object to check. |
| bool glasscore::CHypo::hasPickReference | ( | std::shared_ptr< CPick > | pck | ) |
Check if pick is referenced by this hypo.
Check to see if a shared_ptr reference from the given pick to this hypo exists
Note that this pick may or may not be also referenced by other hypocenters
| pck | - A std::shared_ptr to the CPick object to check. |
| int glasscore::CHypo::incrementTotalProcessCount | ( | ) |
Increments the total process count.
| bool glasscore::CHypo::initialize | ( | double | lat, |
| double | lon, | ||
| double | z, | ||
| double | time, | ||
| std::string | pid, | ||
| std::string | web, | ||
| double | bayes, | ||
| double | thresh, | ||
| int | cut, | ||
| std::shared_ptr< traveltime::CTravelTime > | firstTrav, | ||
| std::shared_ptr< traveltime::CTravelTime > | secondTrav, | ||
| std::shared_ptr< traveltime::CTTT > | ttt, | ||
| double | resolution = 100, |
||
| double | aziTaper = 360.0, |
||
| double | maxDepth = 800.0 |
||
| ) |
CHypo initialization function.
Initializes hypo class to provided values.
| lat | - A double containing the geocentric latitude in degrees to use |
| lon | - A double containing the geocentric longitude in degrees to use |
| z | - A double containing the geocentric depth in kilometers to use |
| time | - A double containing the Gregorian time in seconds to use |
| pid | - A std::string containing the id of this hypo |
| web | - A std::string containing the name of the web that nucleated this hypo |
| bayes | - A double containing the bayesian value for this hypo. |
| thresh | - A double containing the threshold value for this hypo |
| cut | - An integer containing the Bayesian stack threshold for this hypo |
| firstTrav | - A traveltime::CTravelTime containing the first travel time used in creating this hypo |
| secondTrav | - A traveltime::CTravelTime containing the second travel time used in creating this hypo |
| ttt | - A traveltime::CTTT to be used for association for this hypo |
| resolution | - A double value containing the web resolution used |
| aziTaper | = A double value containing the azimuth taper to be used, defaults to 360 |
| maxDepth | = A double value the maximum event depth for the locator, defaults to 800 |
| bool glasscore::CHypo::isLockedForProcessing | ( | ) |
Gets whether the mutex accessed via getProcessingMutex() is locked.
| double glasscore::CHypo::localize | ( | ) |
Location calculation function.
This function calculates the current location of this hypo given the supporting data using either a maximum baysian fit (annealingLocateBayes) or minimum residual (annealingLocateResidual) depending on the configuration
Also computes supporting data statistics by calling calculateStatistics()
| bool glasscore::CHypo::pruneData | ( | CHypoList * | parentThread = NULL | ) |
| void glasscore::CHypo::removeCorrelationReference | ( | std::shared_ptr< CCorrelation > | corr | ) |
Remove correlation reference from this hypo.
Remove a shared_ptr reference to the given correlation from the list of supporting correlation references for this hypo, breaking the graph database link between this hypocenter and the provided correlation. The breaking of this link also represents a correlation disassociation.
Note that this correlation may or may not still be referenced by other hypocenters
| corr | - A std::shared_ptr to the CCorrelation object to remove. |
| void glasscore::CHypo::removePickReference | ( | std::shared_ptr< CPick > | pck | ) |
Remove pick reference from this hypo.
Remove a shared_ptr reference to the given pick from the list of supporting pick references for this hypo, breaking the graph database link between this hypocenter and the provided pick. The breaking of this link also represents a phase disassociation.
Note that this pick may or may not be still referenced by other hypocenters
| pck | - A std::shared_ptr to the CPick object to remove. |
| bool glasscore::CHypo::reportCheck | ( | ) |
Evaluate hypocenter report suitability.
Evaluate whether the hypocenter is suitable to be reported, utilizing the reporting data and stack thresholds (instead of the nucleation thresholds)
| bool glasscore::CHypo::resolveData | ( | std::shared_ptr< CHypo > | hypo, |
| bool | allowStealing = true, |
||
| CHypoList * | parentThread = NULL |
||
| ) |
Ensure all supporting data belong to this hypo.
Search through all supporting data (eg. Picks) in the given hypocenter's lists, using the affinity functions to determine whether the data best fits this hypocenter or not.
| hypo | - A shared_ptr to a CHypo to use when adding references to this hypo. This parameter is passed because issues occurred using this-> to reference data. |
| allowStealing | - A boolean flag indicating whether to allow resolveData to steal data, defaults to true |
| parentThread | - A pointer to a parent Hypolist thread to reprt status to. |
| void glasscore::CHypo::setCorrelationAdded | ( | bool | corrAdded | ) |
Sets whether a correlation has been added to this hypo.
Sets whether a correlation has been added to this hypo. This flag is used in preserving hypos generated from correlations long enough for supporting data to be added.
| corrAdded | - a boolean flag indicating whether a correlation has been added to this hypo, true if one has, false otherwise |
| void glasscore::CHypo::setDepth | ( | double | z | ) |
Sets the depth for this hypo.
| z | - a double containing the hypo depth in kilometers |
| void glasscore::CHypo::setFixed | ( | bool | fixed | ) |
Sets whether this hypo is fixed.
| fixed | - a boolean flag indicating whether this hypo is fixed, true if it is, false otherwise |
| void glasscore::CHypo::setLatitude | ( | double | lat | ) |
Set the latitude for this hypo.
| lat | - a double containing the hypo latitude in degrees |
| void glasscore::CHypo::setLongitude | ( | double | lon | ) |
Set the longitude for this hypo, accounting for the longitude wrap at +/-180.
| lon | - a double containing the hypo longitude in degrees |
| void glasscore::CHypo::setNucleationAuditingInfo | ( | double | tNucleation, |
| double | tNucleationKeyPickInsertion | ||
| ) |
Set nucleation auditing info for this hypo.
| tNucleation | - time this hypo was nucleated(Gregorian seconds). |
| tNucleationKeyPickInsertion | - time the key pick for nucleating this hypo was inserted into Glass3(Gregorian seconds). |
| void glasscore::CHypo::setNucleationDataThreshold | ( | int | cut | ) |
Sets the threshold that represents the minimum count of data required to successfully nucleate or maintain (via passing cancelCheck() a hypocenter.
If threshold is 10, then 8 picks + 1 correlation + 1 beam would be sufficient, but 9 picks would not be.
| cut | - a double value containing the nucleation minimum stack threshold |
| void glasscore::CHypo::setNucleationStackThreshold | ( | double | thresh | ) |
Sets the nucleation stack minimum threshold used in determining hypo viability in cancelCheck()
| thresh | - an integer value containing the nucleation stack minimum threshold |
| int glasscore::CHypo::setProcessCount | ( | int | newCycle | ) |
Sets the process count, used by HypoList to prevent continuous hypo reprocessing.
| void glasscore::CHypo::setTCreate | ( | double | newTCreate | ) |
Sets the time that this hypo was created.
| newTCreate | - a double containing the hypo creation time in Gregorian seconds |
| void glasscore::CHypo::setTOrigin | ( | double | newTOrg | ) |
Sets the origin time for this hypo.
| newTOrg | - a double containing the hypo origin time in Gregorian seconds |
| void glasscore::CHypo::setTSort | ( | double | newTSort | ) |
Set the sorting time for this hypo.
| newTSort | - a double containing the hypo sort time in Gregorian seconds |
| void glasscore::CHypo::trap | ( | ) |
|
static |
The exponent factor used in bayes stack calculations.
|
static |
The maximum range factor used in bayes stack calculations.
|
static |
The step size reduction factor used in bayes stack calculations.
|
static |
The final step reduction factor for anneal.
|
static |
The beginning of the gap taper.
|
static |
The end of the gap taper.
|
static |
The initial step reduction factor for anneal.
|
static |
|
static |
The maximum threshold for the location taper.
|
static |
The minimum location iteration distance step size.
|
static |
The minimum location iteration time step size.
|
static |
The factor used to convert the location search radius to time.
|
static |
The location taper constant.
|
static |
The minimum depth change in km that constitutes a significant change in location. Used for auditing purposes.
|
static |
The minimum depth change (expressed as a ratio to the previous depth, that constitutes a significant change in location. Used for auditing purposes.
|
static |
The residual sigma length in seconds.
|
static |
The factor for dividing when computing the location search radius.
|
static |
The factor for dividing the web resolution when computing the location search radius.
|
static |
The factor for multiplying the taper when computing the location search radius.
|
static |
The factor to correct time to distance.
|
static |
The factor to correct vertical to horizontal distance.
|
static |
The large nPick threshold to skip during location.
|
static |
The medium nPick threshold to skip during location.
|
static |
The small nPick threshold to skip during location.
|
static |
The nPick threshold indicating a large hypo during location.
|
static |
The nPick threshold indicating a medium hypo during location.
|
static |
The nPick threshold indicating a small hypo during location.
|
static |
The large number of location iterations to perform for a hypo.
|
static |
The medium number of location iterations to perform for a hypo.
|
static |
The small number of location iterations to perform for a hypo.
1.8.11