Computes Kmax according to Wathelet et al. (2008) More...
#include <KmaxSolver.h>
Public Member Functions | |
void | calculate () |
double | kmax (bool &ok) const |
KmaxSolver (const QVector< Point2D > &stations, double kmin) | |
void | terminate () |
~KmaxSolver () |
Computes Kmax according to Wathelet et al. (2008)
TheoreticalFK is used for peak search. TheoreticalLinearFK to find the intersection with level line at 0.5 around found peak (fixing azimuth).
ArrayCore::KmaxSolver::KmaxSolver | ( | const QVector< Point2D > & | stations, |
double | kmin | ||
) |
References QGpCoreTools::ConcentricSearch::setCenter(), QGpCoreTools::Function2Search::setFunction(), QGpCoreTools::ConcentricSearch::setGrid(), QGpCoreTools::ConcentricSearch::setNoiseLevel(), and TRACE.
: TheoreticalLinearFK(stations) { TRACE; _kmax=1e99; _kminHalf=0.5*kmin; _dk=0.25*kmin; _terminated=false; _valid=false; setCenter(0.0, 0.0); setGrid(2.0*kmin, 1e99, _dk); // Disregard any peak with amplitude lower than 0.1 // Even if we are interested in peaks exceeding 0.5, the coarse grid search has // a step of kmin/4, hence first peak estimates might be less than 0.5 even if peak is // above 0.5. setNoiseLevel(0.1); // Doing this forces us to takeFunction() in destructor setFunction(this); }
References QGpCoreTools::Function2Search::takeFunction(), and TRACE.
{ TRACE; // Concentric search is the owner of this, remove this ownership takeFunction(); }
void ArrayCore::KmaxSolver::calculate | ( | ) | [inline] |
Referenced by Simulator::init(), ArrayGui::ArrayResponse::setArray(), and ToolFK::setDefaultGridParameters().
{start();}
double ArrayCore::KmaxSolver::kmax | ( | bool & | ok | ) | const |
References QGpCoreTools::ConcentricSearch::r0(), and TRACE.
Referenced by ToolFK::setComputedKmax(), Simulator::setKmax(), and ToolFK::setTemporaryKmax().
void ArrayCore::KmaxSolver::terminate | ( | ) |
References TRACE.
Referenced by ArrayGui::ArrayResponse::setArray(), ToolFK::setDefaultGridParameters(), ToolFK::setTemporaryKmax(), ArrayGui::ArrayResponse::~ArrayResponse(), and ToolFK::~ToolFK().
{ TRACE; _terminated.fetchAndStoreOrdered(true); wait(); }