List of all members | Public Member Functions | Static Public Member Functions | Static Private Member Functions | Friends
utl::FFTDataContainerAlgorithm Class Reference

Algorithms working on FFTDataContainer objects. More...

#include "utl/FFTDataContainerAlgorithm.h"

Public Member Functions

template<>
void HilbertEnvelope (FFTDataContainer< Trace, double, complex< double > > &container)
 Hilbert envelope on channel level. More...
 
template<>
void HilbertEnvelope (FFTDataContainer< Trace, Vector3D, Vector3C > &container)
 Hilbert enevelope on station level. More...
 
template<>
void HilbertTransform (FFTDataContainer< Trace, double, complex< double > > &container)
 Hilbert transform on channel level. More...
 
template<>
void HilbertTransform (FFTDataContainer< Trace, Vector3D, Vector3C > &container)
 Hilbert transformation on station level. More...
 

Static Public Member Functions

template<template< typename X > class C, typename T , typename F >
static void HilbertEnvelope (FFTDataContainer< C, T, F > &container)
 applies a HilbertEnvelope to the time series data More...
 
template<template< typename X > class C, typename T , typename F >
static void HilbertTransform (FFTDataContainer< C, T, F > &container)
 aplies a HilbertTransform in the data More...
 
template<template< typename X > class C, typename T , typename F >
static void ResampleTimeSeries (FFTDataContainer< C, T, F > &container, const double resampleBinning)
 resamples a time series to a given sampling timebase More...
 
template<template< typename X > class C, typename T , typename F >
static void ShiftTimeSeries (FFTDataContainer< C, T, F > &container, const TimeInterval &shift)
 shifts the time series of the FFTDataContainer in time More...
 
template<template< typename X > class C, typename T , typename F >
static void ThinOutTimeSeries (FFTDataContainer< C, T, F > &container, const long thinOutFactor)
 thins out a time series by a given factor More...
 
template<template< typename X > class C, typename T , typename F >
static void UpsampleTimeSeries (FFTDataContainer< C, T, F > &container, const unsigned int upsamplingFactor, const bool removeOffset)
 upsamples a trace by the given upsampling factor, removes DC offset if instructed so More...
 
template<template< typename X > class C, typename T , typename F >
static void zeroPad (FFTDataContainer< C, T, F > &container, const unsigned int newSize, const bool removeOffset)
 zero padding to a given number More...
 

Static Private Member Functions

static boost::rational< long > ConvertDecimalDoubleToRational (double fpn, const bool secondcall)
 

Friends

class ::testFFTDataContainerAlgorithm
 

Detailed Description

Algorithms working on FFTDataContainer objects.

Date
08 Sep 2009
Author
Tim Huege
Frank Schröder
Stefan Grebe

Definition at line 40 of file FFTDataContainerAlgorithm.h.

Member Function Documentation

static boost::rational<long> utl::FFTDataContainerAlgorithm::ConvertDecimalDoubleToRational ( double  fpn,
const bool  secondcall 
)
inlinestaticprivate

A crude algorithm to convert a double to a rational. For the application of resampling radio time bases the algorithm is ok because we know that the sampling frequencies have a simple decimal representation. Also, typical values will have no more than 4 significant digits.

Definition at line 213 of file FFTDataContainerAlgorithm.h.

Referenced by ResampleTimeSeries().

template<>
void utl::FFTDataContainerAlgorithm::HilbertEnvelope ( FFTDataContainer< Trace, double, complex< double > > &  container)

Hilbert envelope on channel level.

Definition at line 111 of file FFTDataContainerAlgorithm.cc.

References utl::Trace< T >::GetSize(), utl::FFTDataContainer< C, T, F >::GetTimeSeries(), utl::Sqr(), and sqrt().

template<>
void utl::FFTDataContainerAlgorithm::HilbertEnvelope ( FFTDataContainer< Trace, Vector3D, Vector3C > &  container)

Hilbert enevelope on station level.

Definition at line 126 of file FFTDataContainerAlgorithm.cc.

References utl::Trace< T >::GetSize(), utl::FFTDataContainer< C, T, F >::GetTimeSeries(), utl::Sqr(), and sqrt().

template<template< typename X > class C, typename T , typename F >
static void utl::FFTDataContainerAlgorithm::HilbertEnvelope ( FFTDataContainer< C, T, F > &  container)
static

applies a HilbertEnvelope to the time series data

Referenced by RdStationSimPulseFinder::RdStationSimPulseFinder::Run().

template<>
void utl::FFTDataContainerAlgorithm::HilbertTransform ( FFTDataContainer< Trace, double, complex< double > > &  container)

Hilbert transform on channel level.

Definition at line 13 of file FFTDataContainerAlgorithm.cc.

References fftwpp::fftw::fft(), FFTWComplex, FFTWdelete, utl::Trace< T >::GetSize(), and WARNING.

template<>
void utl::FFTDataContainerAlgorithm::HilbertTransform ( FFTDataContainer< Trace, Vector3D, Vector3C > &  container)
template<template< typename X > class C, typename T , typename F >
static void utl::FFTDataContainerAlgorithm::HilbertTransform ( FFTDataContainer< C, T, F > &  container)
static

aplies a HilbertTransform in the data

template<template< typename X > class C, typename T , typename F >
static void utl::FFTDataContainerAlgorithm::ResampleTimeSeries ( FFTDataContainer< C, T, F > &  container,
const double  resampleBinning 
)
inlinestatic

resamples a time series to a given sampling timebase

Definition at line 157 of file FFTDataContainerAlgorithm.h.

References ConvertDecimalDoubleToRational(), ThinOutTimeSeries(), and UpsampleTimeSeries().

template<template< typename X > class C, typename T , typename F >
static void utl::FFTDataContainerAlgorithm::ShiftTimeSeries ( FFTDataContainer< C, T, F > &  container,
const TimeInterval shift 
)
inlinestatic

shifts the time series of the FFTDataContainer in time

The time series of the FFTDataContainer channel is shifted in time by a certain time interval. This shift is done in the frequency domain by multiplying a phase gradient to the spectrum. As a result the time series is shifted cyclically. That means that data from the end of the original trace are put at the beginning for a positive time shift or vice versa for a negative time shift. Thus, take care and do not shift the data too much: Time shifts should be small in comparison to the trace length, to get physically meaningful results.

Definition at line 54 of file FFTDataContainerAlgorithm.h.

References utl::FFTDataContainer< C, T, F >::GetFrequencySpectrum(), utl::TimeInterval::GetInterval(), and utl::kTwoPi.

Referenced by RdBeamTimeOptimizer::RdBeamTimeOptimizer::crosscorr(), RdBeamTimeOptimizer::RdBeamTimeOptimizer::powertrace(), and RdBeamFormer::RdBeamFormer::shiftTraces().

template<template< typename X > class C, typename T , typename F >
static void utl::FFTDataContainerAlgorithm::ThinOutTimeSeries ( FFTDataContainer< C, T, F > &  container,
const long  thinOutFactor 
)
inlinestatic

thins out a time series by a given factor

Definition at line 180 of file FFTDataContainerAlgorithm.h.

References utl::FFTDataContainer< C, T, F >::GetTimeSeries().

Referenced by ResampleTimeSeries().

template<template< typename X > class C, typename T , typename F >
static void utl::FFTDataContainerAlgorithm::UpsampleTimeSeries ( FFTDataContainer< C, T, F > &  container,
const unsigned int  upsamplingFactor,
const bool  removeOffset 
)
inlinestatic

upsamples a trace by the given upsampling factor, removes DC offset if instructed so

Definition at line 69 of file FFTDataContainerAlgorithm.h.

References utl::FFTDataContainer< C, T, F >::GetFrequencySpectrum(), utl::FFTDataContainer< C, T, F >::GetNyquistZone(), and utl::FFTDataContainer< C, T, F >::SetNyquistZone().

Referenced by ResampleTimeSeries().

template<template< typename X > class C, typename T , typename F >
static void utl::FFTDataContainerAlgorithm::zeroPad ( FFTDataContainer< C, T, F > &  container,
const unsigned int  newSize,
const bool  removeOffset 
)
inlinestatic

Friends And Related Function Documentation

friend class ::testFFTDataContainerAlgorithm
friend

Definition at line 239 of file FFTDataContainerAlgorithm.h.


The documentation for this class was generated from the following files:

, generated on Tue Sep 26 2023.