STFINV library: seek source wavelet correction filter

◆ convolve()

void stfinv::STFFourierDomainEngine::convolve ( )
private

convolve synthetics with stf

Convolve all synthetics with the source time function correction filter.

The filter response is available in terms of the Fourier coefficients of the correction filter as are returned by STFFourierDomainEngine::stfspec(). Convolution takes place in the Fourier domain simply by a multiplication of Fourier coefficients. Since all Fourier coefficients are expected to be scaled appropriately to represent samples for the Fourier integral transform, no scaling has to be applied here.

Definition at line 503 of file stfinvfourier.cc.

References stfinv::STFBaseEngine::convolvedseries(), stfinv::STFBaseEngine::convolvedsynthetic(), Mfftengineinput, Mfftengineoutput, nfreq(), stfinv::STFBaseEngine::npairs(), stfinv::STFBaseEngine::nreceivers(), stfcoeff(), stfspec(), stfinv::STFBaseEngine::synthetic(), and syntheticspec().

Referenced by fftoutput().

504  {
507  =aff::subarray(Mfftengineoutput.spectrum())()(0,this->nreceivers()-1);
508  convolvedsynthetic.shape().setfirst(0,0);
509  convolvedsynthetic.shape().setfirst(1,0);
510  TAspectrum stfcoeff=this->stfspec();
511 
512  // cycle through all receivers
513  for (unsigned int i=0; i<this->nreceivers(); ++i)
514  {
515  for (unsigned int j=0; j<this->nfreq(); ++j)
516  {
518  } // for (unsigned int j=0; j<this->nfreq(); ++j)
519  } // for (unsigned int i=0; i<this->nreceivers(); ++i)
520 
521  // copy signals for additional pairs
522  if (this->npairs()>0)
523  {
524  // reference to input series Fourier coefficients of additional pairs
525  TAspectrum inspecarray=Mfftengineinput.spectrum();
526  TAspectrum seriesspecarray
527  =aff::subarray(inspecarray)()(2*this->nreceivers(),
528  (2*this->nreceivers()
529  +this->npairs()-1));
530  seriesspecarray.shape().setfirst(0,0);
531  seriesspecarray.shape().setfirst(1,0);
532 
533  // reference to convolved series Fourier coefficients of additional
534  // pairs
536  =aff::subarray(Mfftengineoutput.spectrum())()(this->nreceivers()+1,
537  this->nreceivers()
538  +this->npairs());
539  convolvedseries.shape().setfirst(0,0);
540  convolvedseries.shape().setfirst(1,0);
541  // cycle through all pairs
542  for (unsigned int i=0; i<this->npairs(); ++i)
543  {
544  for (unsigned int j=0; j<this->nfreq(); ++j)
545  {
546  convolvedseries(j,i)=seriesspecarray(j,i)*stfcoeff(j);
547  } // for (unsigned int j=0; j<this->nfreq(); ++j)
548  } // for (unsigned int i=0; i<this->npairs(); ++i)
549  } // if (this->npairs()>0)
550 
551  } // void STFFourierDomainEngine::convolve()
unsigned int npairs() const
return number of additional signals to be convolved
Definition: stfinvbase.h:262
unsigned int nreceivers() const
return number of receiver signals in use
Definition: stfinvbase.h:259
Tfftengine::TAspectrum TAspectrum
type of array for Fourier transforms
TAspectrum::Tvalue & stfcoeff(const unsigned int &i) const
return reference to Fourier coefficients of stf for frequency i
TAspectrum syntheticspec() const
return reference to Fourier transform of synthetics
TAspectrum stfspec() const
return reference to Fourier transform of stf
Tseries::Tcoc synthetic(const unsigned int &i) const
return synthetic data at receiver i
Definition: stfinvbase.cc:311
Tseries convolvedseries(const unsigned int &i) const
return synthetic data convolved with stf for pair i
Definition: stfinvbase.cc:335
Tfftengine Mfftengineinput
combined FFT engine for recorded data and synthetics and additional time series
unsigned int nfreq() const
return number of frequencies in use
Tfftengine Mfftengineoutput
combined FFT engine for stf and convolved synthetics and additional convolved time series ...
Tseries convolvedsynthetic(const unsigned int &i) const
return synthetic data convolved with stf at receiver i
Definition: stfinvbase.cc:319
Here is the call graph for this function:
Here is the caller graph for this function: