All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Public Member Functions
ArrayCore::KmaxSolver Class Reference

Computes Kmax according to Wathelet et al. (2008) More...

#include <KmaxSolver.h>

Inheritance diagram for ArrayCore::KmaxSolver:
QGpCoreTools::Thread QGpCoreWave::TheoreticalLinearFK QGpCoreTools::ConcentricSearch QGpCoreWave::TheoreticalFK QGpCoreTools::AbstractFunction2

List of all members.

Public Member Functions

void calculate ()
double kmax (bool &ok) const
 KmaxSolver (const QVector< Point2D > &stations, double kmin)
void terminate ()
 ~KmaxSolver ()

Detailed Description

Computes Kmax according to Wathelet et al. (2008)

Todo:
Do not inherit TheoreticalLinearFK but rather use a pointer

TheoreticalFK is used for peak search. TheoreticalLinearFK to find the intersection with level line at 0.5 around found peak (fixing azimuth).


Constructor & Destructor Documentation

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();
}

Member Function Documentation

double ArrayCore::KmaxSolver::kmax ( bool &  ok) const

References QGpCoreTools::ConcentricSearch::r0(), and TRACE.

Referenced by ToolFK::setComputedKmax(), Simulator::setKmax(), and ToolFK::setTemporaryKmax().

{
  TRACE;
  QMutexLocker ml(&_kMutex);
  ok=_valid;
  if(ok) {
    return _kmax;
  } else {
    return r0();
  }
}

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines