Commit 6fda7fb5 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

implemented initialization

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 3988
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 6b65540e
......@@ -50,17 +50,28 @@ namespace stfinv {
/*----------------------------------------------------------------------*/
void STFEngineBlindDeconvolution::exec()
void STFEngineBlindDeconvolution::help(std::ostream& os) const
{
STFINV_abort("STFEngineBlindDeconvolution::run not yet implemented");
} // void STFEngineBlindDeconvolution::exec()
STFEngineBlindDeconvolution::classhelp(os);
} // void STFEngineBlindDeconvolution::help(std::ostream& os) const
/*----------------------------------------------------------------------*/
void STFEngineBlindDeconvolution::help(std::ostream& os) const
const char* STFEngineBlindDeconvolution::name() const
{
STFEngineBlindDeconvolution::classhelp(os);
} // void STFEngineBlindDeconvolution::help(std::ostream& os) const
return("STFEngineBlindDeconvolution");
} // const char const* STFEngineBlindDeconvolution::name() const
/*----------------------------------------------------------------------*/
void STFEngineBlindDeconvolution::initialize()
{
// scale energy
std::istringstream is (this->parameter("waterlevel","1.e-3"));
is >> Mwaterlevel;
STFINV_assert(Mwaterlevel > 0,
"ERROR: parameter for option \"waterlevel\" not larger than 0");
} // void STFEngineBlindDeconvolution::initialize()
/*----------------------------------------------------------------------*/
......@@ -69,17 +80,22 @@ namespace stfinv {
os << "class STFEngineBlindDeconvolution ("
<< STFEngineBlindDeconvolution::ID << ")\n";
os << STFEngineBlindDeconvolution::description << "\n" << std::endl;
os << "This class is not yet implemented." << std::endl;
os << "Online help is not yet provided." << std::endl;
os << "This engine calculates a blind deconvolution in the Fourier\n"
<< "domain. A waterlevel as a fraction of the signal energy of the\n"
<< "input synthetics is applied. If per receiver scaling is\n"
<< "selected, the receivers will be weighted in the deconvolution.\n";
os << "Options and parameters:\n"
<< "waterlevel=l waterlevel to be applied for regularization."
<< std::endl;
Tbase::classhelp(os);
} // void STFEngineBlindDeconvolution::classhelp(std::ostream& os)
/*----------------------------------------------------------------------*/
const char* STFEngineBlindDeconvolution::name() const
void STFEngineBlindDeconvolution::exec()
{
return("STFEngineBlindDeconvolution");
} // const char const* STFEngineBlindDeconvolution::name() const
STFINV_abort("STFEngineBlindDeconvolution::run not yet implemented");
} // void STFEngineBlindDeconvolution::exec()
} // namespace stfinv
......
......@@ -105,7 +105,8 @@ namespace stfinv {
* Now \f$\eta\f$ and \f$\lambda\f$ have to be used to balance the
* regularization.
* We aim to specify a waterlevel as a fraction of synthetic data energy.
* .
*
* \par Setting up the waterlevel
* The misfit equals one if the scaled energy of the residual
* \f$d_{lk}-s_{lk}q_l\f$ equals the scaled energy of the synthetics
* \f$s_{lk}\f$ and
......@@ -196,7 +197,8 @@ namespace stfinv {
STFEngineBlindDeconvolution(const stfinv::Tvectoroftriples& triples,
const stfinv::Waveform& stf,
const std::string& parameters)
:Tbase(triples, stf, parameters) { }
: Tbase(triples, stf, parameters), Mwaterlevel(1.e-3)
{ this->initialize(); }
//! \brief abstract base requires virtual destructor
virtual ~STFEngineBlindDeconvolution() { }
//! \brief Start engine
......@@ -209,7 +211,12 @@ namespace stfinv {
virtual const char* name() const;
private:
//! \brief initialize work space
void initialize() { }
void initialize();
// member data
private:
//! \brief waterlevel
double Mwaterlevel;
}; // class STFEngineBlindDeconvolution
} // namespace stfinv
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment