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 #25 from wyeck-usgs/working
Browse files Browse the repository at this point in the history
Azimuthal Gap Down-Weighting option for local grids
  • Loading branch information
jpatton-USGS authored May 23, 2018
2 parents 69ae3aa + 8855c7e commit a100f95
Show file tree
Hide file tree
Showing 7 changed files with 251 additions and 120 deletions.
25 changes: 23 additions & 2 deletions glasscore/glasslib/include/Hypo.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ class CHypo {
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);
std::shared_ptr<traveltime::CTTT> ttt, double resolution = 100,
double aziTaper = 360.);

/**
* \brief CHypo alternate constructor
Expand Down Expand Up @@ -148,7 +149,7 @@ class CHypo {
std::shared_ptr<traveltime::CTravelTime> firstTrav,
std::shared_ptr<traveltime::CTravelTime> secondTrav,
std::shared_ptr<traveltime::CTTT> ttt, double resolution =
100);
100, double aziTap = 360.);

/**
* \brief Add pick reference to this hypo
Expand Down Expand Up @@ -478,6 +479,15 @@ class CHypo {
double tStart, double tStop, int nucleate =
0);

/**
* Calculates azimuthal gap for a proposed location
*
* \param lat - latitude of test location
* \param lon - longitude of test location
* \param z - depth of test location
*/
double gap(double lat, double lon, double z);

/**
* Gets the stack of associated arrivals at location
*
Expand Down Expand Up @@ -549,6 +559,12 @@ class CHypo {
*/
void trap();

/**
* \brief aziTaper
* \return the aziTaper
*/
double getAziTaper() const;

/**
* \brief Latitude getter
* \return the latitude
Expand Down Expand Up @@ -853,6 +869,11 @@ class CHypo {
*/
double searchVals[5];

/**
* \brief where to taper bayesVal from azi gap
*/
double aziTaper;

/**
* \brief An integer value containing this hypo's processing cycle count
*/
Expand Down
18 changes: 16 additions & 2 deletions glasscore/glasslib/include/Web.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class CWeb {
std::shared_ptr<traveltime::CTravelTime> firstTrav,
std::shared_ptr<traveltime::CTravelTime> secondTrav,
int numThreads = 0, int sleepTime = 100,
int checkInterval = 60);
int checkInterval = 60, double aziTaper = 360.);

/**
* \brief CWeb destructor
Expand Down Expand Up @@ -157,7 +157,8 @@ class CWeb {
int numNucleate, int resolution, int numRows, int numCols,
int numZ, bool update,
std::shared_ptr<traveltime::CTravelTime> firstTrav,
std::shared_ptr<traveltime::CTravelTime> secondTrav);
std::shared_ptr<traveltime::CTravelTime> secondTrav,
double aziTap);

/**
* \brief Generate a local detection grid
Expand Down Expand Up @@ -338,6 +339,13 @@ class CWeb {
*/
void addJob(std::function<void()> newjob);

/**
* \brief aziTapre Getter
* \return double with the azi taper start
*/
double getAziTaper() const;


/**
* \brief CGlass getter
* \return the CGlass pointer
Expand Down Expand Up @@ -495,6 +503,12 @@ class CWeb {
*/
double dResolution;

/**
* \brief A double which describes where the locator should start
* down weighting for azimuthal gap
**/
double aziTaper = 360.;

/**
* \brief A boolean flag that stores whether to update this web when a
* station has changed.
Expand Down
Loading

0 comments on commit a100f95

Please sign in to comment.