Commit d80fd618 authored by thomas.forbriger's avatar thomas.forbriger

libstfinv [WP]: provide FFT processor for stf correction filter alone

parent 05d10711
......@@ -34,11 +34,13 @@
* - 14/10/2015 V1.3 new end-user usage functions
* - 28/06/2016 V1.4 introduce taper parameter to taper correction filter
* response in the time domain
* - 22/07/2016 V1.5 provide separate FFT processor addressing just the
* source time function correction filter
*
* ============================================================================
*/
#define STFINV_STFINVFOURIER_CC_VERSION \
"STFINV_STFINVFOURIER_CC V1.4"
"STFINV_STFINVFOURIER_CC V1.5"
#include <sstream>
#include <stfinv/stfinvfourier.h>
......@@ -236,6 +238,8 @@ namespace stfinv {
Mfftengineoutput=fourier::fft::DRFFTWAFFArrayEngine(
1+this->nreceivers()+this->npairs(),
nsamples);
Mfftenginestf=fourier::fft::DRFFTWAFFArrayEngine(this->stfseries(),
this->stfspec());
// set time shift for STF if requested
// -----------------------------------
......@@ -345,6 +349,13 @@ namespace stfinv {
/*----------------------------------------------------------------------*/
STFFourierDomainEngine::TAseries STFFourierDomainEngine::stfseries() const
{
return(Mfftengineoutput.series(this->nreceivers()));
} // STFFourierDomainEngine::Tspectrum STFFourierDomainEngine::stfseries() const
/*----------------------------------------------------------------------*/
STFFourierDomainEngine::TAspectrum
STFFourierDomainEngine::recordingcoeff(const unsigned int& i) const
{
......
......@@ -31,6 +31,8 @@
* - 30/09/2011 V1.1 implemented handling of additional time series pairs
* - 14/10/2015 V1.2 new end-user usage functions
* - 28/06/2016 V1.3 provide time domain tapering of filter response
* - 22/07/2016 V1.4 provide separate FFT processor addressing just the
* source time function correction filter
*
* ============================================================================
*/
......@@ -39,7 +41,7 @@
#ifndef STFINV_STFINVFOURIER_H_VERSION
#define STFINV_STFINVFOURIER_H_VERSION \
"STFINV_STFINVFOURIER_H V1.3"
"STFINV_STFINVFOURIER_H V1.4"
#include <stfinv/stfinvbase.h>
#include <aff/array.h>
......@@ -141,6 +143,12 @@ namespace stfinv {
//! \brief return name of engine
virtual const char* name() const;
protected:
/*! \name Access and control functions to be used by derived classes.
*
* These functions are part of the interface implemented in
* STFFourierDomainEngine.
*/
//@{
/*! \brief copy input signals to workspace and
* transform input workspace to Fourier domain
*/
......@@ -172,7 +180,14 @@ namespace stfinv {
double frequency(const unsigned int& i) const;
//! \brief return number of frequencies in use
unsigned int nfreq() const;
//@}
private:
/*! \name Internal processing control functions of.
*
* These functions are part of the interface implemented in
* STFFourierDomainEngine.
*/
//@{
//! \brief initialize work space
void initialize();
/*! \brief copy input time series for recorded data and synthetics
......@@ -192,6 +207,9 @@ namespace stfinv {
/*! \brief apply a time domain taper to the correction filter response.
*/
void taperstf();
//! \brief return reference to time series container of stf
TAseries stfseries() const;
//@}
// member data
// -----------
......@@ -248,6 +266,18 @@ namespace stfinv {
* M is returned by function npairs().
*/
Tfftengine Mfftengineoutput;
/*! \brief FFT processor for source time function correction filter
*
* This uses a reference to the source time function correction filter
* data in Mfftengineoutput. It is used in cases, where this data has to
* be transformed alone (like in STFFourierDomainEngine::taperstf).
*
* \note
* This processor does not maintain a separate data space.
* It rather operates on a reference to data space also maintained by
* Mfftengineoutput.
*/
Tfftengine Mfftenginestf;
/*! \brief time shift to be applied to STF in order to expose
* acausal parts
*/
......
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