STFINV library: seek source wavelet correction filter
stfinv::STFEngineNormalize Class Reference

Normalization engine. More...

#include <stfinvnormalize.h>

Inheritance diagram for stfinv::STFEngineNormalize:
Collaboration diagram for stfinv::STFEngineNormalize:

Public Types

typedef Tfftengine::TAseries TAseries
 type of array for time series values More...
 
typedef Tfftengine::TAspectrum TAspectrum
 type of array for Fourier transforms More...
 
typedef stfinv::STFFourierDomainEngine Tbase
 typedef to refer to base class More...
 
typedef fourier::fft::DRFFTWAFFArrayEngine Tfftengine
 type of underlying Fourier engine More...
 

Public Member Functions

 STFEngineNormalize (const stfinv::Tvectoroftriples &triples, const stfinv::Waveform &stf, const std::string &parameters)
 Constructor. More...
 
virtual ~STFEngineNormalize ()
 abstract base requires virtual destructor More...
 
virtual void exec ()
 Start engine. More...
 
virtual void help (std::ostream &os=std::cout) const
 print online help More...
 
virtual const char * name () const
 return name of engine More...
 
virtual void usage (std::ostream &os=std::cout) const
 print detailed description More...
 
Basic interface for users
stfinv::Waveform run ()
 Start engine and return reference to source correction filter. More...
 
Shape query functions
unsigned int nsamples () const
 return number of samples used in time series More...
 
unsigned int nreceivers () const
 return number of receiver signals in use More...
 
unsigned int npairs () const
 return number of additional signals to be convolved More...
 
double dt () const
 return sampling interval More...
 
Data query functions
Tseries stf () const
 return source correction filter series More...
 
Tseries::Tcoc recording (const unsigned int &i) const
 return recorded data at receiver i More...
 
Tseries::Tcoc synthetic (const unsigned int &i) const
 return synthetic data at receiver i More...
 
Tseries convolvedsynthetic (const unsigned int &i) const
 return synthetic data convolved with stf at receiver i More...
 
Tseries::Tcoc series (const unsigned int &i) const
 return synthetic data of pair i More...
 
Tseries convolvedseries (const unsigned int &i) const
 return synthetic data convolved with stf for pair i More...
 

Static Public Member Functions

static void classhelp (std::ostream &os=std::cout)
 print online help More...
 
static void classusage (std::ostream &os=std::cout)
 print detailed description More...
 

Static Public Attributes

static const char *const description ="Fourier domain normalization"
 short description of this engine More...
 
static const char *const ID ="fdnorm"
 ID used to select thsi engine. More...
 

Protected Member Functions

Access and control functions to be used by derived classes.

These functions are part of the interface implemented in STFFourierDomainEngine.

void fftinput ()
 copy input signals to workspace and transform input workspace to Fourier domain More...
 
void fftoutput ()
 convolve synthetics with Fourier transform of stf and transform convolved synthetics and stf to time domain and pass signals to user memory space More...
 
TAspectrum recordingspec () const
 return reference to Fourier transform of recorded data More...
 
TAspectrum syntheticspec () const
 return reference to Fourier transform of synthetics More...
 
TAspectrum stfspec () const
 return reference to Fourier transform of stf More...
 
TAspectrum recordingcoeff (const unsigned int &i) const
 return reference to Fourier coeffients of recorded data for frequency i More...
 
TAspectrum syntheticcoeff (const unsigned int &i) const
 return reference to Fourier coefficients of synthetics for frequency i More...
 
TAspectrum::Tvaluestfcoeff (const unsigned int &i) const
 return reference to Fourier coefficients of stf for frequency i More...
 
double frequency (const unsigned int &i) const
 return value of frequency i in Hz More...
 
unsigned int nfreq () const
 return number of frequencies in use More...
 
Functions presented to derived classes
std::string parameter (const std::string &key, const std::string &defvalue="false") const
 return the value of a parameters More...
 
bool parameterisset (const std::string &key) const
 check is parameter was set by user More...
 
void checkreceiverindex (const unsigned int &i) const
 check for vaid receiver index More...
 
void checkseriesindex (const unsigned int &i) const
 check for vaid index off additional time series pair More...
 
double weight (const unsigned int &i) const
 return weight for signal at receiver i More...
 
aff::Series< double > weights () const
 return weights array More...
 

Protected Attributes

int Mdebug
 debug level More...
 
stfinv::Tvectorofpairs Mpairs
 Waveform pairs. More...
 
stfinv::Waveform Mstf
 source correction filter. More...
 
stfinv::Tvectoroftriples Mtriples
 Waveform triples. More...
 
int Mverbose
 verbose level More...
 

Private Member Functions

void initialize ()
 initialize work space More...
 

Private Attributes

double Mwaterlevel
 waterlevel More...
 

Detailed Description

Normalization engine.

Attention
This engine is not yet implemented. The concept of the approach is drafted in the comments to the class declaration. However this approach is under debate and might not even work properly. As long a stfinv::STFEngineNormalize is not made available through stfinv::STFEngine::initialize it must be regarded as a stub.
Motivation
On the down-side of Fourier domain least squares as is implemented in stfinv::STFEngineFDLeastSquares is the least squares approach. Least squares aims in minimizing the least squares misfit between recorded data and synthetics. In cases where it is difficult to minimize the misfit, e.g. when the wave propagation properties of the synthetics differ from those of the recorded data, the least squares misfit optimum might be a source correction filter equal zero. The current approach (stfinv::STFEngineNormalize) seeks a source correction filter such that the average energy as well as the average phase of data and synthetics equal. This is what you usually want in a early stage of inversion.
Concept of this algorithm
Consider that
  • $d_{lk}$ is the Fourier coefficient of recorded data at Frequency $f_l$ and receiver $k$ at offset $r_k$ and
  • $s_{lk}$ is the Fourier coefficient of the corresponding synthetics.

Then we seek a source correction filter with Fourier coefficients $q_l$ such that

\[ \sum\limits_{k}\left|d_{lk}\right|^2 = \sum\limits_{k}\left|s_{lk}\,q_l\right|^2 \quad\forall\, l \]

and

\[ \sum\limits_{k}\Im(\ln(d_{lk})) = \sum\limits_{k}\Im(\ln(s_{lk}\,q_l)) \quad\forall\, l. \]

Actually we will apply weights $w_k$ to data from different offsets $r_k$ such that

\[ \sum\limits_{k}\left|w_k\,d_{lk}\right|^2 = \sum\limits_{k}\left|w_k\,s_{lk}\,q_l\right|^2 \quad\forall\, l \]

and

\[ \sum\limits_{k}w_k\,\Im(\ln(d_{lk})) = \sum\limits_{k}w_k\,\Im(\ln(s_{lk}\,q_l)) \quad\forall\, l. \]

Additionally we will apply a waterlevel $\epsilon^2$, such that Fourier coefficients for which the average weighted energy of the synthetics is smaller than a fraction $\epsilon^2$ of the total average energy of the synthetics, will be damped.

These conditions are satisfied by

\[ q_l=A_l\,e^{i\Phi_{l}} \]

with

\[ A_l=\sqrt{\frac{\sum\limits_{k}\left|w_k\,d_{lk}\right|^2}{ \sum\limits_{k}\left|w_k\,s_{lk}\right|^{2} + \frac{\epsilon^2}{N_{f}}\,\sum\limits_{k}\sum\limits_{l=0}^{N_{f}-1} \left|w_k\,s_{lk}\right|^2}} \]

and

\[ \Phi_{l}=\frac{\sum\limits_{k}w_{k}\left( \Im\left(\ln(d_{lk})\right)-\Im\left(\ln(s_{lk})\right) \right)}{\sum\limits_k w_{k}} \]

Definition at line 134 of file stfinvnormalize.h.


The documentation for this class was generated from the following files: