37 #define STFINV_STFINVBASE_CC_VERSION \ 38 "STFINV_STFINVBASE_CC V1.2" 56 const std::string& parameters)
57 : Mtriples(triples), Mstf(stf), Mpairs(pairs),
58 Mweights(0,triples.size()-1)
71 const std::string& parameters)
72 : Mtriples(triples), Mstf(stf), Mweights(0,triples.size()-1)
97 std::istringstream is(this->
parameter(
"DEBUG",
"0"));
101 "initializing base class");
106 std::istringstream is(this->
parameter(
"exp",
"0."));
108 for (
unsigned int i=0; i<
Mtriples.size(); ++i)
125 stfinv::Tvectoroftriples::iterator I=
Mtriples.begin();
128 if (I->data.first()!=0) { I->data.shift(-(I->data.first())); }
129 if (I->synthetics.first()!=0)
130 { I->synthetics.shift(-(I->synthetics.first())); }
131 if (I->convolvedsynthetics.first()!=0)
132 { I->convolvedsynthetics.shift(-(I->convolvedsynthetics.first())); }
138 stfinv::Tvectorofpairs::iterator I=
Mpairs.begin();
141 if (I->synthetics.first()!=0)
142 { I->synthetics.shift(-(I->synthetics.first())); }
143 if (I->convolvedsynthetics.first()!=0)
144 { I->convolvedsynthetics.shift(-(I->convolvedsynthetics.first())); }
164 "inconsistent number of samples");
165 const double tolerance=1.e-4;
168 stfinv::Tvectoroftriples::const_iterator I=
Mtriples.begin();
173 "inconsistent number of samples");
175 "inconsistent number of samples");
177 "inconsistent number of samples");
179 "inconsistent number of samples");
181 "inconsistent values of sampling interval");
187 stfinv::Tvectorofpairs::const_iterator I=
Mpairs.begin();
192 "inconsistent number of samples");
194 "inconsistent number of samples");
196 "inconsistent number of samples");
198 "inconsistent values of sampling interval");
243 while (parameters.length()>0)
248 if (value.length()==0)
280 const std::string& defvalue)
const 298 return(
"STFBaseEngine");
322 return(
Mtriples[i].convolvedsynthetics);
330 return(
Mpairs[i].synthetics);
338 return(
Mpairs[i].convolvedsynthetics);
346 "ERROR: receiver index out of range");
354 "ERROR: series index out of range");
363 return (sqrt(dx*dx+dy*dy));
bool parameterisset(const std::string &key) const
check is parameter was set by user
void checkseriesindex(const unsigned int &i) const
check for vaid index off additional time series pair
std::vector< stfinv::WaveformPair > Tvectorofpairs
Vector of pairs.
static void classhelp(std::ostream &os=std::cout)
print online help
void parseparameters(std::string parameters)
parse parameters and store them in Mparamap
suport debugging in libstfinv (prototypes)
Root namespace of library.
virtual void help(std::ostream &os=std::cout) const
print online help
int Mverbose
verbose level
stfinv::Waveform Mstf
source correction filter.
void initialize(const std::string ¶meters)
initialize base class
char stfinvbase_description_usage[]
std::string parameter(const std::string &key, const std::string &defvalue="false") const
return the value of a parameters
stfinv::Tvectoroftriples Mtriples
Waveform triples.
Tseries::Tcoc recording(const unsigned int &i) const
return recorded data at receiver i
virtual void usage(std::ostream &os=std::cout) const
print detailed description
Tseries::Tcoc series(const unsigned int &i) const
return synthetic data of pair i
#define STFINV_assert(C, M)
Check an assertion and report by throwing an exception.
static void classusage(std::ostream &os=std::cout)
print detailed description
Tseries::Tcoc synthetic(const unsigned int &i) const
return synthetic data at receiver i
Tseries convolvedseries(const unsigned int &i) const
return synthetic data convolved with stf for pair i
double dt() const
return sampling interval
C++ interface and abstract base class (prototypes)
aff::Series< double > Mweights
Weights.
stfinv::Tvectorofpairs Mpairs
Waveform pairs.
void checkreceiverindex(const unsigned int &i) const
check for vaid receiver index
virtual const char * name() const
return name of engine
STFBaseEngine(const stfinv::Tvectoroftriples &triples, const stfinv::Waveform &stf, const std::string ¶meters)
Constructor.
std::vector< stfinv::WaveformTriple > Tvectoroftriples
Vector of triples.
void checkconsistency() const
Check consistency of data members.
char stfinvbase_summary_usage[]
stfinv::tools::Tparamap Mparamap
Parameter map.
Tseries convolvedsynthetic(const unsigned int &i) const
return synthetic data convolved with stf at receiver i
#define STFINV_debug(C, N, M)
produce debug output
aff::Series< Tvalue > Tseries
Type of sample values.