All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Public Member Functions
GeopsyCore::ComplexSignal Class Reference

Brief description of class still missing. More...

#include <ComplexSignal.h>

Inheritance diagram for GeopsyCore::ComplexSignal:
GeopsyCore::SignalTemplate< Complex > CacheItem

List of all members.

Public Member Functions

DoubleSignalabs () const
 ComplexSignal ()
 ComplexSignal (int n)
 ComplexSignal (const ComplexSignal &o)
void debugPrint () const
bool multiply (double d)
bool sqrt ()
bool square ()
DoubleSignaltoDouble () const

Detailed Description

Brief description of class still missing.

Full description of class still missing


Constructor & Destructor Documentation

: SignalTemplate<Complex>() {}
: SignalTemplate<Complex>(n) {}
: SignalTemplate<Complex>(o) {}

Member Function Documentation

Retruns a double signal with the absolute value

References GeopsyCore::SignalTemplate< Complex >::_nSamples, CONST_LOCK_SAMPLES, LOCK_SAMPLES, TRACE, and UNLOCK_SAMPLES.

Referenced by HVStationSignals::horizontal(), and GeopsyCore::SubSignalPool::waveletTransform().

{
  TRACE;
  DoubleSignal * sig=new DoubleSignal(_nSamples);
  CONST_LOCK_SAMPLES(Complex, thisSamples, this)
    LOCK_SAMPLES(double, sigSamples, sig)
      for(int i=0;i < _nSamples;i++ ) {
        sigSamples[ i ]=thisSamples[ i ].abs();
      }
    UNLOCK_SAMPLES(sig)
  UNLOCK_SAMPLES(this)
  return sig;
}

References GeopsyCore::SignalTemplate< Complex >::_nSamples, CONST_LOCK_SAMPLES, TRACE, and UNLOCK_SAMPLES.

{
  TRACE;
  printf( "Debug samples for signal %s\n", debugName().toAscii().data());
  CONST_LOCK_SAMPLES(Complex, thisSamples, this)
    for(int i=0;i < _nSamples;i++ ) printf( "%i\t%lg\t%lg\n", i, thisSamples[ i ].re(), thisSamples[ i ].im());
  UNLOCK_SAMPLES(this)
}

Multiplies all samples by d

References GeopsyCore::SignalTemplate< Complex >::_nSamples, LOCK_SAMPLES, TRACE, and UNLOCK_SAMPLES.

Referenced by HVStationSignals::horizontal().

{
  TRACE;
  LOCK_SAMPLES(Complex, thisSamples, this)
    for(int i=0;i < _nSamples;i++ )
      thisSamples[ i ]*=d;
  UNLOCK_SAMPLES(this) else return false;
  return true;
}

Takes the square root of all samples

References GeopsyCore::SignalTemplate< Complex >::_nSamples, LOCK_SAMPLES, QGpCoreTools::sqrt(), TRACE, and UNLOCK_SAMPLES.

{
  TRACE;
  LOCK_SAMPLES(Complex, thisSamples, this)
    for(int i=0;i < _nSamples;i++ )
      thisSamples[ i ]=QGpCoreTools::sqrt(thisSamples[ i ]);
  UNLOCK_SAMPLES(this) else return false;
  return true;
}

Takes the square of all samples

References GeopsyCore::SignalTemplate< Complex >::_nSamples, LOCK_SAMPLES, TRACE, and UNLOCK_SAMPLES.

{
  TRACE;
  LOCK_SAMPLES(Complex, thisSamples, this)
    for(int i=0;i < _nSamples;i++ )
      thisSamples[ i ] *= thisSamples[ i ];
  UNLOCK_SAMPLES(this) else return false;
  return true;
}

Retruns a double signal with complex numbers arranged according to real Fourier transform

References TRACE.

{
  TRACE;
  /*TODO DoubleSignal * sig=new DoubleSignal(_nSamples);
  CONST_LOCK_SAMPLES(Complex, thisSamples, this)
    LOCK_SAMPLES(double, sigSamples, sig)
      for(int i=0;i < _nSamples;i++ ) {
        sigSamples[ i ]=thisSamples[ i ].abs();
      }
    UNLOCK_SAMPLES(sig)
  UNLOCK_SAMPLES(this)*/
  return 0;
}

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines