Commit 039ecfbe authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

proceeding with fourier engine

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.

SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 3971
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent b4eb77d3
......@@ -38,6 +38,7 @@
#define STFINV_STFINVFOURIER_CC_CVSID \
"$Id$"
#include <sstream>
#include <stfinv/stfinvfourier.h>
namespace stfinv {
......@@ -61,19 +62,11 @@ namespace stfinv {
const std::string& parameters)
:Tbase(triples, stf, parameters)
{
STFINV_abort("STFFourierDomainEngine constructor not yet implemented");
this->initialize();
} // STFFourierDomainEngine::STFFourierDomainEngine
/*----------------------------------------------------------------------*/
stfinv::Waveform STFFourierDomainEngine::run()
{
STFINV_abort("STFFourierDomainEngine::run not yet implemented");
} // void STFFourierDomainEngine::run()
/*----------------------------------------------------------------------*/
void STFFourierDomainEngine::help(std::ostream& os) const
{
STFFourierDomainEngine::classhelp(os);
......@@ -99,6 +92,24 @@ namespace stfinv {
void STFFourierDomainEngine::initialize()
{
STFINV_abort("STFFourierDomainEngine::initialize not yet implemented");
// extract parameter values
double padfactor;
{
std::istringstream is(this->parameter("fpad","1.5"));
is >> padfactor;
}
STFINV_assert(padfactor >= 1.,
"ERROR: parameter for option \"fpad\" not larger or equal 1");
bool poweroftwo=(this->parameter("fpow2","false")=="true");
bool divisorset=this->parameterisset("fdiv");
unsigned int divisor;
if (divisorset)
{
std::istringstream is (this->parameter("fdiv","100"));
}
// define number of samples to be used by Fourier engine
} // void STFFourierDomainEngine::initialize()
/*----------------------------------------------------------------------*/
......
......@@ -59,6 +59,10 @@ namespace stfinv {
* 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 time function separately.
*
* \par Layout of Fourier transform arrays
* The workspace for the Fourier transform engine is initialized by
* fourier::fft::DRFFTWAFFArrayEngine.
*/
class STFFourierDomainEngine: public stfinv::STFBaseEngine {
public:
......@@ -84,7 +88,7 @@ namespace stfinv {
//! \brief abstract base requires virtual destructor
virtual ~STFFourierDomainEngine() { }
//! \brief Start engine and return source time function.
virtual stfinv::Waveform run();
virtual stfinv::Waveform run() { STFINV_baseillegal; }
//! \brief print online help
virtual void help(std::ostream& os=std::cout) const;
//! \brief print online help
......@@ -107,6 +111,22 @@ namespace stfinv {
TAspectrum synthetics() const;
//! \brief return reference to Fourier transform of stf
Tspectrum stf() const;
/*! \brief return reference to Fourier coeffients of recorded data for
* frequency i
*/
TAspectrum data(const unsigned int& i) const;
/*! \brief return reference to Fourier coefficients of synthetics for
* frequency i
*/
TAspectrum synthetics(const unsigned int& i) const;
/*! \brief return reference to Fourier coefficients of stf for frequency
* i
*/
Tspectrum::Tvalue& stf(const unsigned int& i) const;
//! \brief return value of frequency i in Hz
double frequency(const unsigned int& i) const;
//! \brief return number of frequencies in use
unsigned int nfreq() const;
private:
//! \brief initialize work space
void initialize();
......
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