1#ifndef __JACOUSTICS__JPLATYPUS_T__
2#define __JACOUSTICS__JPLATYPUS_T__
12#include "JLang/JObjectIterator.hh"
14#include "JMath/JQuantile_t.hh"
16#include "JTools/JHashMap.hh"
64 for (
size_t i = 0; i < ns; ++i) {
66 thread worker([
this, geometry, emitters, velocity, parameters]() {
72 katoomba.estimator.reset(getMEstimator(parameters.
mestimator));
75 unique_lock<mutex> lock(
in);
77 cv.wait(lock, [
this]() {
return stop || this->input.hasNext(); });
79 if (
stop && !this->input.hasNext()) {
83 const JSuperEvt* evt = this->input.next();
87 for (JSuperEvt::rx_type::const_iterator hit = evt->
rx.begin(); hit != evt->
rx.end(); ++hit) {
89 data.push_back(
JHit(emitters[hit->id],
91 JLocation(hit->string, hit->floor),
100 const double chi2 = katoomba (data.begin(), data.end()) / katoomba.estimator->getRho(1.0);
101 const double ndf =
getWeight(data.begin(), data.end()) - katoomba.value.getN();
104 unique_lock<mutex> lock(
out);
111 workers.emplace_back(std::move(worker));
124 unique_lock<mutex> lock(
in);
136 static JMATH::JQuantile_t
Q;
143 std::condition_variable
cv;
Fit functions of acoustic model.
Thread pool for global fits using super events.
JLANG::JObjectIterator< JSuperEvt > input_type
std::condition_variable cv
JTOOLS::JHashMap< int, JEmitter > JEmitters
static JMATH::JQuantile_t Q
chi2/NDF
JPlatypus(const JGeometry &geometry, const JEmitters &emitters, const JSoundVelocity &velocity, const JFitParameters ¶meters, input_type &input, const size_t ns)
Constructor.
std::vector< std::thread > workers
Auxiliary classes and methods for acoustic position calibration.
double getWeight(T __begin, T __end)
Get total weight of data points.
int option
fit option (see JACOUSTICS::JMODEL::JOption_t)
double sigma_s
time-of-arrival resolution [s]
int mestimator
M-estimator (see JFIT::JMEstimator_t)
Template definition of fit function of acoustic model.
Implementation for depth dependend velocity of sound.
Acoustic super event fit.
Auxiliary data structure to convert event to model.