From 9997f39a82c9ac7178575f37c0dc12d7f79c3d97 Mon Sep 17 00:00:00 2001 From: Thomas Forbriger Date: Fri, 22 Jul 2016 10:49:05 +0200 Subject: [PATCH] libstfinv [WP][DOC]: locate appropriate location for application of taper --- src/libs/libstfinv/stfinvfourier.cc | 1 + src/libs/libstfinv/stfinvfourier.h | 25 ++++++++++++++++++++----- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/libs/libstfinv/stfinvfourier.cc b/src/libs/libstfinv/stfinvfourier.cc index ca261d22..f0390b65 100644 --- a/src/libs/libstfinv/stfinvfourier.cc +++ b/src/libs/libstfinv/stfinvfourier.cc @@ -271,6 +271,7 @@ namespace stfinv { void STFFourierDomainEngine::fftoutput() { + // NOTE: apply taper here this->convolve(); if (Mapplyshift) { this->stfshift(); } Mfftengineoutput.c2r(); diff --git a/src/libs/libstfinv/stfinvfourier.h b/src/libs/libstfinv/stfinvfourier.h index ccef14fe..b3327c76 100644 --- a/src/libs/libstfinv/stfinvfourier.h +++ b/src/libs/libstfinv/stfinvfourier.h @@ -57,7 +57,8 @@ namespace stfinv { * It provides the FFT from input signals to the workspace through a member * functions as well as the convolution of the synthetic data with a given * source wavelet Fourier transform and a subsequent FFT to time domain for - * the convolved synthetics as well as the source correction filter separately. + * the convolved synthetics as well as the source correction filter + * separately. * * \par What STFFourierDomainEngine does for you * All derived classes call STFFourierDomainEngine::fftinput prior to @@ -70,13 +71,27 @@ namespace stfinv { * \par * When processing has finished, the derived classes should call * STFFourierDomainEngine::fftoutput. - * This function convolves the synthetic data with the source correction + * This function first applies a time domain taper to the correction filter + * impulse response if requested (STFFourierDomainEngine::taperstf). + * Then it convolves the synthetic data with the source correction * filter (STFFourierDomainEngine::convolve). - * Then it applies a time shift to the source correction filter if requested - * (STFFourierDomainEngine::stfshift). + * If requested it applies a time shift to the source correction filter + * as a next step (STFFourierDomainEngine::stfshift). * The convolved synthetics as well as the source correction filter then are * transformed to time domain and written to the users workspace - * ((STFFourierDomainEngine::putoutput). + * (STFFourierDomainEngine::putoutput). + * + * \par + * This should take place in the exec-function (e.g. + * STFEngineFDLeastSquares::exec) of the derived class. + * I.e. the first statement in the exec function is a call to function + * STFFourierDomainEngine::fftinput of the base class and the very last + * statement is a call to function STFFourierDomainEngine::fftoutput of the + * base class. + * This also guarantees that STFFourierDomainEngine::fftoutput is only + * called once per derived correction filter response. + * This is necessary, since otherwise the taper function and the time shift + * would be applied twice to the impulse response. * * \par Layout of Fourier transform arrays * The workspace for the Fourier transform engine is initialized by -- GitLab