STFINV library: seek source wavelet correction filter
stfinvfourier.h
Go to the documentation of this file.
1 
40 // include guard
41 #ifndef STFINV_STFINVFOURIER_H_VERSION
42 
43 #define STFINV_STFINVFOURIER_H_VERSION \
44  "STFINV_STFINVFOURIER_H V1.4"
45 
46 #include <stfinv/stfinvbase.h>
47 #include <aff/array.h>
48 #include <fourier/fftwaffar.h>
49 
50 namespace stfinv {
51 
109  public:
113  typedef fourier::fft::DRFFTWAFFArrayEngine Tfftengine;
115  typedef Tfftengine::TAseries TAseries;
117  typedef Tfftengine::TAspectrum TAspectrum;
118  protected:
122  const stfinv::Waveform& stf,
123  const std::string& parameters);
127  const stfinv::Waveform& stf,
128  const stfinv::Tvectorofpairs& pairs,
129  const std::string& parameters);
130  public:
134  virtual void exec() { STFINV_baseillegal; }
136  virtual void help(std::ostream& os=std::cout) const;
138  static void classhelp(std::ostream& os=std::cout);
140  virtual void usage(std::ostream& os=std::cout) const;
142  static void classusage(std::ostream& os=std::cout);
144  virtual const char* name() const;
145  protected:
155  void fftinput();
160  void fftoutput();
162  TAspectrum recordingspec() const;
164  TAspectrum syntheticspec() const;
166  TAspectrum stfspec() const;
170  TAspectrum recordingcoeff(const unsigned int& i) const;
174  TAspectrum syntheticcoeff(const unsigned int& i) const;
178  TAspectrum::Tvalue& stfcoeff(const unsigned int& i) const;
180  double frequency(const unsigned int& i) const;
182  unsigned int nfreq() const;
184  private:
191  void initialize();
196  void getinput();
200  void putoutput();
203  void convolve();
206  void stfshift();
209  void taperstf();
211  TAseries stfseries() const;
213 
214  // member data
215  // -----------
216  private:
284  double Mtshift;
304  double Mtt1, Mtt2, Mtt3, Mtt4;
306  }; // class STFFourierDomainEngine
307 
308 }
309 
310 #endif // STFINV_STFINVFOURIER_H_VERSION (includeguard)
311 
312 /* ----- END OF stfinvfourier.h ----- */
#define STFINV_baseillegal
Abort upon illegal call of base class function.
Definition: stfinvbase.h:137
std::vector< stfinv::WaveformPair > Tvectorofpairs
Vector of pairs.
Definition: stfinvbase.h:125
stfinv::STFBaseEngine Tbase
typedef to refer to base class
double Mtt4
time values defining taper.
Tfftengine::TAseries TAseries
type of array for time series values
double Mtt2
time values defining taper.
static void classhelp(std::ostream &os=std::cout)
print online help
float Tvalue
Value type of samples.All references to time series samples in user workspace are based on this type...
Tfftengine Mfftenginestf
FFT processor for source time function correction filter.
double Mtt3
time values defining taper.
void fftinput()
copy input signals to workspace and transform input workspace to Fourier domain
Tfftengine::TAspectrum TAspectrum
type of array for Fourier transforms
Root namespace of library.
Definition: doxygen.txt:43
Base class for all engines which operate in the Fourier domain.
double Mtt1
time values defining taper.
bool Mapplyshift
true if shift must be applied
TAspectrum recordingcoeff(const unsigned int &i) const
return reference to Fourier coeffients of recorded data for frequency i
double Mtshift
time shift to be applied to STF in order to expose acausal parts
void stfshift()
apply time shift to stf prior to FFT to time domain
TAspectrum::Tvalue & stfcoeff(const unsigned int &i) const
return reference to Fourier coefficients of stf for frequency i
virtual ~STFFourierDomainEngine()
abstract base requires virtual destructor
void taperstf()
apply a time domain taper to the correction filter response.
void convolve()
convolve synthetics with stf
void putoutput()
copy workspace time series for convolved synthetics and stf to user memory
virtual const char * name() const
return name of engine
TAspectrum syntheticspec() const
return reference to Fourier transform of synthetics
virtual void exec()
Start engine.
TAseries stfseries() const
return reference to time series container of stf
TAspectrum recordingspec() const
return reference to Fourier transform of recorded data
TAspectrum stfspec() const
return reference to Fourier transform of stf
void initialize()
initialize work space
A class to store a single waveform. This will be used to pass the source correction filter...
Definition: stfinvbase.h:111
STFFourierDomainEngine(const stfinv::Tvectoroftriples &triples, const stfinv::Waveform &stf, const std::string &parameters)
Constructor.
double frequency(const unsigned int &i) const
return value of frequency i in Hz
Tfftengine Mfftengineinput
combined FFT engine for recorded data and synthetics and additional time series
void getinput()
copy input time series for recorded data and synthetics to workspace
C++ interface and abstract base class (prototypes)
virtual void help(std::ostream &os=std::cout) const
print online help
unsigned int nfreq() const
return number of frequencies in use
Abstract base class for engines to derive source correction filter.
Definition: stfinvbase.h:208
Tfftengine Mfftengineoutput
combined FFT engine for stf and convolved synthetics and additional convolved time series ...
virtual void usage(std::ostream &os=std::cout) const
print detailed description
std::vector< stfinv::WaveformTriple > Tvectoroftriples
Vector of triples.
Definition: stfinvbase.h:132
bool Mapplystftaper
true if time domain taper should be applied to filter response.
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 ...
Tseries stf() const
return source correction filter series
Definition: stfinvbase.h:273
static void classusage(std::ostream &os=std::cout)
print detailed description
fourier::fft::DRFFTWAFFArrayEngine Tfftengine
type of underlying Fourier engine