4 #include "CMTStation.h"
8 #include "CLevmarConf.h"
10 #include <boost/bind.hpp>
13 using namespace gplib;
24 const int nlayers = abs(*m) / 3;
25 const int nparam = nlayers * 2;
27 for (
int i = 0; i < nparam; ++i)
31 for (
int i = 0; i < nparam; ++i)
32 recmember(i) = p[i + nlayers];
48 void init(
int* nd,
float* ranges)
51 string version =
"$Id: levjoint.cpp 1131 2007-05-15 22:25:06Z max $";
53 cout <<
"Program " << version << endl;
54 cout <<
" Levenberg Marquardt to jointly invert seismic and MT data "
56 cout <<
" look at levmar.conf for configuration and setup " << endl;
57 cout <<
" output files will be of the form " << endl;
58 cout <<
" best_lev + ending " << endl;
67 cerr << e.what() << endl;
80 const int nparams = nlayers * 3;
82 ttranscribed mtmember(nlayers * 2), recmember(nlayers * 2);
86 mtmember.begin() + nlayers);
90 recmember.begin() + nlayers);
94 for (
int i = 0; i < nlayers; ++i)
99 for (
int i = 0; i < nlayers; ++i)
102 ranges[2 * i + 2 * nlayers + 1] =
Configuration.maxthick.at(i);
104 for (
int i = 0; i < nlayers; ++i)
107 ranges[2 * i + 4 * nlayers + 1] =
Configuration.maxsvel.at(i);
109 cout <<
"Init finished ! " << endl;
void SetupMTFitParameters(const tConfObject &Configuration, C1DMTObjective &Objective)
ublas::vector< double > ttranscribed
std::vector< double > & GetData()
Access for data vector, for ease of use and efficiency we return a reference.
double CalcPerformance(const ttranscribed &member)
For serial execution CalcPerformance calls the three Parallel functions for more convenient use...
void init(int *nd, float *ranges)
void SetErrorLevel(const double level)
Set the errorlevel for fit, this is relative to the maximum amplitude, not for each individual data p...
C1DRecObjective RecObjective(RecData, Configuration.shift, Configuration.omega, Configuration.sigma, Configuration.wlevel, Configuration.slowness)
void misfit(float *p, float *misfit, int *m)
These two functions provide the interface between the C++ implementation and the C interfacea of CADI...
C1DMTObjective MTObjective(MTData)
CLevmarConf Configuration
void SetPoisson(const double ratio)
Set poisson's ratio, at the moment the same for all layers, used for calculating P-velocity.
Calculate the misfit between observed receiver function for a given 1D model by calculating a synthet...
void SetTimeWindow(const double start, const double end)
Set the time window used for misfit calculations, start and end are in seconds.
C1DMTObjective is the base class for MT misfit calculations from 1D models, it provides common functi...
The basic exception class for all errors that arise in gplib.