37 #define STFINV_STFINVFDLEASTSQUARES_CC_VERSION \ 38 "STFINV_STFINVFDLEASTSQUARES_CC V1.2" 41 #include <aff/functions/sqrsum.h> 53 =
"least squares in the frequency domain";
73 return(
"STFEngineFDLeastSquares");
81 std::istringstream is (this->
parameter(
"waterlevel",
"1.e-3"));
86 "ERROR: parameter for option \"waterlevel\" not larger than 0");
95 stfinv::tools::report_engine_ID<STFEngineFDLeastSquares>(os);
106 stfinv::tools::report_engine_ID<STFEngineFDLeastSquares>(os);
117 double waterlevel=0.;
118 for (
unsigned int i=0; i<this->
nreceivers(); ++i)
126 "waterlevel=" << waterlevel);
129 "nfreq=" << this->
nfreq());
131 for (
unsigned int i=0; i<this->
nfreq(); ++i)
138 "syntheticref.first(0)=" << syntheticref.first(0) <<
" " <<
139 "syntheticref.last(0)=" << syntheticref.last(0) <<
" " 140 "syntheticref.first(1)=" << syntheticref.first(1) <<
" " <<
141 "syntheticref.last(1)=" << syntheticref.last(1) <<
" ");
143 denominator=waterlevel;
145 for (
unsigned int j=0; j<this->
nreceivers(); ++j)
148 *conj(syntheticref(j))*recordingref(j);
150 *conj(syntheticref(j))*syntheticref(j);
152 this->
stfcoeff(i)=numerator/denominator;
char stfinvfdleastsquares_summary_usage[]
unsigned int nreceivers() const
return number of receiver signals in use
float Tvalue
Value type of samples.All references to time series samples in user workspace are based on this type...
double weight(const unsigned int &i) const
return weight for signal at receiver i
void fftinput()
copy input signals to workspace and transform input workspace to Fourier domain
Tfftengine::TAspectrum TAspectrum
type of array for Fourier transforms
suport debugging in libstfinv (prototypes)
Root namespace of library.
TAspectrum recordingcoeff(const unsigned int &i) const
return reference to Fourier coeffients of recorded data for frequency i
TAspectrum::Tvalue & stfcoeff(const unsigned int &i) const
return reference to Fourier coefficients of stf for frequency i
std::string parameter(const std::string &key, const std::string &defvalue="false") const
return the value of a parameters
virtual void exec()
Start engine.
#define STFINV_assert(C, M)
Check an assertion and report by throwing an exception.
least squares in the frequency domain (prototypes)
Tseries::Tcoc synthetic(const unsigned int &i) const
return synthetic data at receiver i
virtual void usage(std::ostream &os=std::cout) const
print detailed description
static const char *const ID
ID used to select this engine.
double Mwaterlevel
waterlevel
virtual void help(std::ostream &os=std::cout) const
print online help
static void classusage(std::ostream &os=std::cout)
print detailed description
char stfinvfdleastsquares_description_usage[]
unsigned int nfreq() const
return number of frequencies in use
TAspectrum syntheticcoeff(const unsigned int &i) const
return reference to Fourier coefficients of synthetics for frequency i
void fftoutput()
convolve synthetics with Fourier transform of stf and transform convolved synthetics and stf to time ...
virtual const char * name() const
return name of engine
static void classhelp(std::ostream &os=std::cout)
print online help
void initialize()
initialize work space
#define STFINV_debug(C, N, M)
produce debug output
static const char *const description
short description of this engine
static void classusage(std::ostream &os=std::cout)
print detailed description