|
neic-glass3
1.4.6
|
glasscore pick class More...
#include <Pick.h>

Public Member Functions | |
| CPick () | |
| CPick default constructor. More... | |
| CPick (std::shared_ptr< CSite > pickSite, double pickTime, std::string pickIdString, double backAzimuth, double slowness) | |
| CPick advanced constructor. More... | |
| CPick (std::shared_ptr< CSite > pickSite, double pickTime, std::string pickIdString, std::string source, 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) | |
| CPick advanced constructor. More... | |
| CPick (std::shared_ptr< json::Object > pick, CSiteList *pSiteList) | |
| CPick advanced constructor. More... | |
| ~CPick () | |
| CPick destructor. More... | |
| void | clear () |
| CPick clear function. More... | |
| bool | initialize (std::shared_ptr< CSite > pickSite, double pickTime, std::string pickIdString, std::string source, 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) |
| CPick initialization function. More... | |
| void | addHypoReference (std::shared_ptr< CHypo > hyp, bool force=false) |
| Add hypo reference to this pick. More... | |
| void | removeHypoReference (std::shared_ptr< CHypo > hyp) |
| Remove hypo reference to this pick. More... | |
| void | removeHypoReference (std::string pid) |
| Remove hypo specific reference to this pick by id. More... | |
| bool | nucleate (CPickList *parentThread) |
| Attempt to nucleate new hypo based on the addition of this pick. More... | |
| double | getBackAzimuth () const |
| Get the optional back azimuth related to this pick. More... | |
| double | getSlowness () const |
| Get the optional slowness related to this pick. More... | |
| const std::shared_ptr< json::Object > & | getJSONPick () const |
| Get input JSON pick message. More... | |
| const std::shared_ptr< CHypo > | getHypoReference () const |
| Get the current hypo referenced by this pick. More... | |
| const std::shared_ptr< CSite > | getSite () const |
| Get the site for this pick. More... | |
| const std::string & | getPhaseName () const |
| Get the phase name for this pick. More... | |
| const std::string & | getID () const |
| Get the ID of this pick. More... | |
| double | getTPick () const |
| Get the arrival time for this pick. More... | |
| void | setTPick (double tPick) |
| Set the arrival time for this pick. More... | |
| double | getTSort () const |
| Get the sorting time for this pick. More... | |
| void | setTSort (double newTSort) |
| Set the sorting time for this pick. More... | |
| double | getTInsertion () const |
| Get the insertion time for this pick. More... | |
| double | getTFirstAssociation () const |
| Get the first assoc time for this pick. More... | |
| double | getTNucleation () const |
| Get the nucleation time for this pick. More... | |
| const std::string & | getClassifiedPhase () const |
| Get the classified phase for this pick. More... | |
| double | getClassifiedPhaseProbability () const |
| Get the classified phase probability for this pick. More... | |
| double | getClassifiedDistance () const |
| Get the classified distance for this pick. More... | |
| double | getClassifiedDistanceProbability () const |
| Get the classified distance probability for this pick. More... | |
| double | getClassifiedAzimuth () const |
| Get the classified azimuth for this pick. More... | |
| double | getClassifiedAzimuthProbability () const |
| Get the classified azimuth probability for this pick. More... | |
| double | getClassifiedDepth () const |
| Get the classified depth for this pick. More... | |
| double | getClassifiedDepthProbability () const |
| Get the classified depth probability for this pick. More... | |
| double | getClassifiedMagnitude () const |
| Get the classified magnitude for this pick. More... | |
| double | getClassifiedMagnitudeProbability () const |
| Get the classified magnitude probability for this pick. More... | |
| const std::string & | getSource () const |
| Get the source for this pick. More... | |
Protected Member Functions | |
| void | clearHypoReference () |
| Remove hypo reference to this pick. More... | |
| void | setTFirstAssociation () |
| Set the first-assoc time for this pick to Now. More... | |
| void | setTNucleation () |
| Set the nucleation time for this pick to Now. More... | |
glasscore pick class
The CPick class is the class that encapsulates everything necessary to represent a waveform arrival pick, including arrival time, phase id, and an unique identifier. The CPick class is also a node in the detection graph database.
CPick contains functions to support nucleation of a new event based on the pick.
CPick maintains a graph database link between it and the the site (station) the pick was made at.
CPick also maintains a vector of CHypo objects represent the graph database links between this pick and various hypocenters. A single pick may be linked to multiple hypocenters
CPick uses smart pointers (std::shared_ptr).
| glasscore::CPick::CPick | ( | ) |
| glasscore::CPick::CPick | ( | std::shared_ptr< CSite > | pickSite, |
| double | pickTime, | ||
| std::string | pickIdString, | ||
| double | backAzimuth, | ||
| double | slowness | ||
| ) |
CPick advanced constructor.
An advanced constructor for the CPick class. This function initializes members to the provided values.
| pickSite | - A shared pointer to a CSite object that the pick was made at |
| pickTime | - A double containing the pick arrival time |
| pickIdString | - A std::string containing the external pick id. |
| backAzimuth | - A double containing the optional back azimuth, std::numeric_limits<double>::quiet_NaN() to omit |
| slowness | - A double containing the optional slowness, std::numeric_limits<double>::quiet_NaN() to omit |
| glasscore::CPick::CPick | ( | std::shared_ptr< CSite > | pickSite, |
| double | pickTime, | ||
| std::string | pickIdString, | ||
| std::string | source, | ||
| 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 | ||
| ) |
CPick advanced constructor.
An advanced constructor for the CPick class. This function initializes members to the provided values.
| pickSite | - A shared pointer to a CSite object that the pick was made at |
| pickTime | - A double containing the pick arrival time |
| pickIdString | - A std::string containing the external pick id. |
| source | - A std::string containing the pick source. |
| backAzimuth | - A double containing the optional back azimuth, std::numeric_limits<double>::quiet_NaN() to omit |
| slowness | - A double containing the optional slowness, std::numeric_limits<double>::quiet_NaN() to omit |
| phase | - A std::string containing the optional classified phase, empty string to omit. |
| phaseProb | - A double containing the optional classified phase probability, std::numeric_limits<double>::quiet_NaN() to omit |
| distance | - A double containing the optional classified distance, std::numeric_limits<double>::quiet_NaN() to omit |
| distanceProb | - A double containing the optional classified distance probability, std::numeric_limits<double>::quiet_NaN() to omit |
| azimuth | - A double containing the optional classified azimuth, std::numeric_limits<double>::quiet_NaN() to omit |
| azimuthProb | - A double containing the optional classified azimuth probability, std::numeric_limits<double>::quiet_NaN() to omit |
| depth | - A double containing the optional classified depth, std::numeric_limits<double>::quiet_NaN() to omit |
| depthProb | - A double containing the optional classified depth probability, std::numeric_limits<double>::quiet_NaN() to omit |
| magnitude | - A double containing the optional classified magnitude, std::numeric_limits<double>::quiet_NaN() to omit |
| magnitudeProb | - A double containing the optional classified magnitude probability, std::numeric_limits<double>::quiet_NaN() to omit |
| glasscore::CPick::CPick | ( | std::shared_ptr< json::Object > | pick, |
| CSiteList * | pSiteList | ||
| ) |
CPick advanced constructor.
An advanced constructor for the CPick class. This function initializes members to the values parsed from the provided json object and using the provided pointer to a CSiteList class to lookup the pick station.
| pick | - A shared pointer to a json::Object to containing the data to construct the pick from |
| pSiteList | - A pointer to the CSiteList class to use when looking up the pick station |
| glasscore::CPick::~CPick | ( | ) |
CPick destructor.
| void glasscore::CPick::addHypoReference | ( | std::shared_ptr< CHypo > | hyp, |
| bool | force = false |
||
| ) |
Add hypo reference to this pick.
Adds a weak_ptr reference to the given hypo to this pick, representing a graph database link between this pick and a hypocenter. If the pick is already linked to a hypocenter, the new link will be ignored unless force is set to true.
Note that this pick may or may not also be included in other hypocenter pick data lists, but this pick will only link to a single hypocenter
| hyp | - A std::shared_ptr to an object containing the hypocenter to link. |
| force | - A boolean flag indicating whether to force the association, defaults to false. |
| void glasscore::CPick::clear | ( | ) |
CPick clear function.
|
protected |
Remove hypo reference to this pick.
Remove any existing weak_ptr reference to a hypo from this pick, breaking the graph database link between this pick and a hypocenter.
Note that this pick may or may not still be included in other hypocenter pick data lists.
| double glasscore::CPick::getBackAzimuth | ( | ) | const |
Get the optional back azimuth related to this pick.
| double glasscore::CPick::getClassifiedAzimuth | ( | ) | const |
Get the classified azimuth for this pick.
| double glasscore::CPick::getClassifiedAzimuthProbability | ( | ) | const |
Get the classified azimuth probability for this pick.
| double glasscore::CPick::getClassifiedDepth | ( | ) | const |
Get the classified depth for this pick.
| double glasscore::CPick::getClassifiedDepthProbability | ( | ) | const |
Get the classified depth probability for this pick.
| double glasscore::CPick::getClassifiedDistance | ( | ) | const |
Get the classified distance for this pick.
| double glasscore::CPick::getClassifiedDistanceProbability | ( | ) | const |
Get the classified distance probability for this pick.
| double glasscore::CPick::getClassifiedMagnitude | ( | ) | const |
Get the classified magnitude for this pick.
| double glasscore::CPick::getClassifiedMagnitudeProbability | ( | ) | const |
Get the classified magnitude probability for this pick.
| const std::string & glasscore::CPick::getClassifiedPhase | ( | ) | const |
Get the classified phase for this pick.
| double glasscore::CPick::getClassifiedPhaseProbability | ( | ) | const |
Get the classified phase probability for this pick.
| const std::shared_ptr< CHypo > glasscore::CPick::getHypoReference | ( | ) | const |
Get the current hypo referenced by this pick.
Note that this pick may or may not also be included in other hypocenter pick data lists, but this pick will only link to a single hypocenter
| const std::string & glasscore::CPick::getID | ( | ) | const |
Get the ID of this pick.
| const std::shared_ptr< json::Object > & glasscore::CPick::getJSONPick | ( | ) | const |
Get input JSON pick message.
| const std::string & glasscore::CPick::getPhaseName | ( | ) | const |
Get the phase name for this pick.
| const std::shared_ptr< CSite > glasscore::CPick::getSite | ( | ) | const |
Get the site for this pick.
| double glasscore::CPick::getSlowness | ( | ) | const |
Get the optional slowness related to this pick.
| const std::string & glasscore::CPick::getSource | ( | ) | const |
Get the source for this pick.
| double glasscore::CPick::getTFirstAssociation | ( | ) | const |
Get the first assoc time for this pick.
| double glasscore::CPick::getTInsertion | ( | ) | const |
Get the insertion time for this pick.
| double glasscore::CPick::getTNucleation | ( | ) | const |
Get the nucleation time for this pick.
| double glasscore::CPick::getTPick | ( | ) | const |
Get the arrival time for this pick.
| double glasscore::CPick::getTSort | ( | ) | const |
Get the sorting time for this pick.
| bool glasscore::CPick::initialize | ( | std::shared_ptr< CSite > | pickSite, |
| double | pickTime, | ||
| std::string | pickIdString, | ||
| std::string | source, | ||
| 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 | ||
| ) |
CPick initialization function.
Initializes pick class to provided values.
| pickSite | - A shared pointer to a CSite object that the pick was made at |
| pickTime | - A double containing the pick arrival time |
| pickIdString | - A std::string containing the external pick id. |
| source | - A std::string containing the pick source. |
| backAzimuth | - A double containing the optional back azimuth, std::numeric_limits<double>::quiet_NaN() to omit |
| slowness | - A double containing the optional slowness, std::numeric_limits<double>::quiet_NaN() to omit |
| phase | - A std::string containing the optional classified phase, empty string to omit. |
| phaseProb | - A double containing the optional classified phase probability, std::numeric_limits<double>::quiet_NaN() to omit |
| distance | - A double containing the optional classified distance, std::numeric_limits<double>::quiet_NaN() to omit |
| distanceProb | - A double containing the optional classified distance probability, std::numeric_limits<double>::quiet_NaN() to omit |
| azimuth | - A double containing the optional classified azimuth, std::numeric_limits<double>::quiet_NaN() to omit |
| azimuthProb | - A double containing the optional classified azimuth probability, std::numeric_limits<double>::quiet_NaN() to omit |
| depth | - A double containing the optional classified depth, std::numeric_limits<double>::quiet_NaN() to omit |
| depthProb | - A double containing the optional classified depth probability, std::numeric_limits<double>::quiet_NaN() to omit |
| magnitude | - A double containing the optional classified magnitude, std::numeric_limits<double>::quiet_NaN() to omit |
| magnitudeProb | - A double containing the optional classified magnitude probability, std::numeric_limits<double>::quiet_NaN() to omit |
| bool glasscore::CPick::nucleate | ( | CPickList * | parentThread | ) |
Attempt to nucleate new hypo based on the addition of this pick.
Attempt to nucleate a new hypo based on the addition of this pick. By scanning all nodes linked to this pick's site, producing a list of triggers. Then, for the best trigger for each web, try to generate a new hypo, performing a fast location/prune using hypo->anneal
| parentThread | - A pointer to the parent CPickList thread to allow nucleate to call the CPickList thread status update function, the owner of this pointer is the CPickList object |
| void glasscore::CPick::removeHypoReference | ( | std::shared_ptr< CHypo > | hyp | ) |
Remove hypo reference to this pick.
Remove a weak_ptr reference to the given hypo from this pick, breaking the graph database link between this pick and the hypocenter.
Note that this pick may or may not still be included in other hypocenter pick data lists.
| hyp | - A std::shared_ptr to an object containing the hypocenter to unlink. |
| void glasscore::CPick::removeHypoReference | ( | std::string | pid | ) |
Remove hypo specific reference to this pick by id.
Remove a weak_ptr reference to the given hypo id from this pick, breaking the graph database link between this pick and the hypocenter.
Note that this pick may or may not still be included in other hypocenter pick data lists.
| pid | - A std::string identifying the the hypocenter to unlink. |
|
protected |
Set the first-assoc time for this pick to Now.
|
protected |
Set the nucleation time for this pick to Now.
| void glasscore::CPick::setTPick | ( | double | tPick | ) |
Set the arrival time for this pick.
| tPick | - a double containing the pick arrival time |
| void glasscore::CPick::setTSort | ( | double | newTSort | ) |
Set the sorting time for this pick.
| newTSort | - a double containing the pick sort time in Gregorian seconds |
1.8.11