List of all members | Public Types | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
utl::FFTDataContainer< C, T, F > Class Template Reference

Template class for a data container that offers and takes both time series and corresponding frequency data, keeping track of which one is the most recent and doing FFTs automatically if necessary. More...

#include "utl/FFTDataContainer.h"

Inheritance diagram for utl::FFTDataContainer< C, T, F >:
Inheritance graph
[legend]

Public Types

enum  Domain { eTime, eFrequency, eBoth }
 

Public Member Functions

void Clear ()
 delete contents of the contained traces More...
 
return startingfrequency signdouble (bin)*binning
 
 FFTDataContainer ()=default
 constructor setting up default values More...
 
C< F > & GetFrequencySpectrum ()
 read out the frequency spectrum (write access) More...
 
unsigned int GetNyquistZone () const
 get the Nyquist zone More...
 
C< T > & GetTimeSeries ()
 read out the time series (write access) More...
 
throw OutOfBoundException ("Requested frequency for a bin that is not in the FrequencySpectrum.")
 
throw OutOfBoundException ("Requested bin for a frequency that is not in the FrequencySpectrum.")
 
void SetNyquistZone (const unsigned int zone)
 set the Nyquist zone More...
 
return std::round (bin)
 

Public Attributes

const double bandwidth = double(highestbin) * binning
 
const double bin = (frequency - startingfrequency) * sign * timeBinning * timeTraceLength
 
const double binning = fFrequencySpectrum.GetBinning()
 
double const
 get the frequency corresponding to a bin of the frequency spectrum More...
 
int const
 get the bin of a corresponding frequency of the frequency spectrum More...
 
const C< T > & const
 read out the time series (read access) More...
 
const C< F > & const
 read out the frequency spectrum (read access) More...
 
const unsigned int evenedzone = (fNyquistZone / 2) * 2
 
return fFrequencySpectrum
 
return fTimeSeries
 
const C< F >::SizeType highestbin = fFrequencySpectrum.GetSize() - 1
 
const int sign = (fNyquistZone == evenedzone) ? -1 : 1
 
const double startingfrequency = evenedzone * bandwidth
 
const double timeBinning = fTimeSeries.GetBinning()
 
const int timeTraceLength = fTimeSeries.GetSize()
 

Private Member Functions

template<>
void UpdateFrequencySpectrum () const
 
template<>
void UpdateFrequencySpectrum () const
 
void UpdateFrequencySpectrum () const
 if the time domain data has been changed last, update the frequency domain data with an fft More...
 
template<>
void UpdateTimeSeries () const
 
template<>
void UpdateTimeSeries () const
 
void UpdateTimeSeries () const
 if the frequency domain data has been changed last, update the time domain data with an fft^-1 More...
 

Private Attributes

C< F > fFrequencySpectrum
 
unsigned int fNyquistZone = 1
 
C< T > fTimeSeries
 
Domain fUpToDateDomain = eBoth
 

Detailed Description

template<template< typename X > class C, typename T, typename F>
class utl::FFTDataContainer< C, T, F >

Template class for a data container that offers and takes both time series and corresponding frequency data, keeping track of which one is the most recent and doing FFTs automatically if necessary.

Parameters
CContainer class that is used to store the data, usually Trace
TData type that is used to store time-series data, usually double
FData type that is used to store frequency-spectrum data, usually complex<double>
Author
Tim Huege

Definition at line 31 of file FFTDataContainer.h.

Member Enumeration Documentation

template<template< typename X > class C, typename T, typename F>
enum utl::FFTDataContainer::Domain
Enumerator
eTime 
eFrequency 
eBoth 

Definition at line 34 of file FFTDataContainer.h.

Constructor & Destructor Documentation

template<template< typename X > class C, typename T, typename F>
utl::FFTDataContainer< C, T, F >::FFTDataContainer ( )
default

constructor setting up default values

Member Function Documentation

template<template< typename X > class C, typename T, typename F>
void utl::FFTDataContainer< C, T, F >::Clear ( )
inline

delete contents of the contained traces

Definition at line 134 of file FFTDataContainer.h.

template<template< typename X > class C, typename T, typename F>
return startingfrequency sign* utl::FFTDataContainer< C, T, F >::double ( bin  )
template<template< typename X > class C, typename T, typename F>
C<F>& utl::FFTDataContainer< C, T, F >::GetFrequencySpectrum ( )
inline

read out the frequency spectrum (write access)

Definition at line 124 of file FFTDataContainer.h.

Referenced by MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::ApplyCITIROCTransfer(), MdCounterSimulatorAG::MdCounterSimulator::ApplyCITIROCTransfer(), MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::ApplyTransferBlock(), MdCounterSimulatorAG::MdCounterSimulator::ApplyTransferBlock(), MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::ApplyTransferBlocks(), MdCounterSimulatorAG::MdCounterSimulator::ApplyTransferBlocks(), RdStationSignalReconstructorWithBgSubtraction::RdStationSignalReconstructorWithBgSubtraction::CalculateTheBGAverage(), RdChannelBandstopFilter::RdChannelBandstopFilter::CutNoiseFrequencies(), revt::Channel::GetChannelFrequencySpectrum(), RdStationInterpolatorStarShape::RdStationInterpolatorStarShape::Interpolate(), RdStationInterpolator::RdStationInterpolator::InterpolateInTwoD(), MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::ProcessPulses(), MdCounterSimulatorAG::MdCounterSimulator::ProcessPulses(), RdADCTraceFixer::RdADCTraceFixer::Run(), RdChannelBandstopFilter::RdChannelBandstopFilter::Run(), RdAntennaStationToChannelConverter::RdAntennaStationToChannelConverter::Run(), RdStationNoiseAnalyser::Run(), RdChannelNoiseGenerator::RdChannelNoiseGenerator::Run(), RdStationSignalReconstructorWithBgSubtraction::RdStationSignalReconstructorWithBgSubtraction::Run(), utl::FFTDataContainerAlgorithm::ShiftTimeSeries(), utl::FFTDataContainerAlgorithm::UpsampleTimeSeries(), and utl::FFTDataContainerAlgorithm::zeroPad().

template<template< typename X > class C, typename T, typename F>
unsigned int utl::FFTDataContainer< C, T, F >::GetNyquistZone ( ) const
inline
template<template< typename X > class C, typename T, typename F>
C<T>& utl::FFTDataContainer< C, T, F >::GetTimeSeries ( )
inline

read out the time series (write access)

Definition at line 104 of file FFTDataContainer.h.

Referenced by MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::ApplyBackEndTransfer(), MdCounterSimulatorAG::MdCounterSimulator::ApplyBackEndTransfer(), MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::ApplyBackEndTransferWStepSaturation(), MdCounterSimulatorAG::MdCounterSimulator::ApplyBackEndTransferWStepSaturation(), MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::ApplyCITIROCTransfer(), MdCounterSimulatorAG::MdCounterSimulator::ApplyCITIROCTransfer(), RdStationSignalReconstructorWithBgSubtraction::RdStationSignalReconstructorWithBgSubtraction::CalculateTheBGAverage(), revt::Channel::GetChannelTimeSeries(), utl::FFTDataContainerAlgorithm::HilbertEnvelope(), utl::FFTDataContainerAlgorithm::HilbertTransform(), io::ChannelFFTDataContainer_ROOT::operator>>(), io::StationFFTDataContainer_ROOT::operator>>(), RdBeamTimeOptimizer::RdBeamTimeOptimizer::powertrace(), MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::ProcessPulses(), MdCounterSimulatorAG::MdCounterSimulator::ProcessPulses(), RdAntennaStationToChannelConverter::RdAntennaStationToChannelConverter::Run(), RdStationNoiseAnalyser::Run(), RdStationSignalReconstructor::RdStationSignalReconstructor::Run(), RdChannelNoiseGenerator::RdChannelNoiseGenerator::Run(), RdStationSignalReconstructorWithBgSubtraction::RdStationSignalReconstructorWithBgSubtraction::Run(), RdStationInterpolatorStarShape::RdStationInterpolatorStarShape::Run(), and utl::FFTDataContainerAlgorithm::ThinOutTimeSeries().

template<template< typename X > class C, typename T, typename F>
throw utl::FFTDataContainer< C, T, F >::OutOfBoundException ( "Requested frequency for a bin that is not in the FrequencySpectrum."  )
template<template< typename X > class C, typename T, typename F>
throw utl::FFTDataContainer< C, T, F >::OutOfBoundException ( "Requested bin for a frequency that is not in the FrequencySpectrum."  )
template<template< typename X > class C, typename T, typename F>
void utl::FFTDataContainer< C, T, F >::SetNyquistZone ( const unsigned int  zone)
inline
template<template< typename X > class C, typename T, typename F>
return utl::FFTDataContainer< C, T, F >::std::round ( bin  )
template<>
void utl::FFTDataContainer< Trace, double, complex< double > >::UpdateFrequencySpectrum ( ) const
private

Definition at line 49 of file FFTDataContainer.cc.

References fftwpp::fftw::fft(), FFTWComplex, FFTWdelete, FFTWdouble, utl::g, and WARNING.

template<>
void utl::FFTDataContainer< Trace, Vector3D, Vector3C >::UpdateFrequencySpectrum ( ) const
private

Definition at line 134 of file FFTDataContainer.cc.

References fftwpp::fftw::fft(), FFTWComplex, FFTWdelete, FFTWdouble, utl::g, and WARNING.

template<template< typename X > class C, typename T, typename F>
void utl::FFTDataContainer< C, T, F >::UpdateFrequencySpectrum ( ) const
private

if the time domain data has been changed last, update the frequency domain data with an fft

Referenced by utl::FFTDataContainer< utl::Trace, double, std::complex< double > >::GetFrequencySpectrum().

template<>
void utl::FFTDataContainer< Trace, double, complex< double > >::UpdateTimeSeries ( ) const
private

Definition at line 13 of file FFTDataContainer.cc.

References fftwpp::fftw::fft(), FFTWComplex, FFTWdelete, FFTWdouble, utl::g, and WARNING.

template<>
void utl::FFTDataContainer< Trace, Vector3D, Vector3C >::UpdateTimeSeries ( ) const
private

Definition at line 92 of file FFTDataContainer.cc.

References fftwpp::fftw::fft(), FFTWComplex, FFTWdelete, FFTWdouble, utl::g, and WARNING.

template<template< typename X > class C, typename T, typename F>
void utl::FFTDataContainer< C, T, F >::UpdateTimeSeries ( ) const
private

if the frequency domain data has been changed last, update the time domain data with an fft^-1

Referenced by utl::FFTDataContainer< utl::Trace, double, std::complex< double > >::GetTimeSeries().

Member Data Documentation

template<template< typename X > class C, typename T, typename F>
const double utl::FFTDataContainer< C, T, F >::bandwidth = double(highestbin) * binning

Definition at line 62 of file FFTDataContainer.h.

template<template< typename X > class C, typename T, typename F>
const double utl::FFTDataContainer< C, T, F >::bin = (frequency - startingfrequency) * sign * timeBinning * timeTraceLength

Definition at line 88 of file FFTDataContainer.h.

template<template< typename X > class C, typename T, typename F>
const double utl::FFTDataContainer< C, T, F >::binning = fFrequencySpectrum.GetBinning()

Definition at line 58 of file FFTDataContainer.h.

template<template< typename X > class C, typename T, typename F>
double utl::FFTDataContainer< C, T, F >::const
Initial value:

get the frequency corresponding to a bin of the frequency spectrum

Definition at line 55 of file FFTDataContainer.h.

template<template< typename X > class C, typename T, typename F>
int utl::FFTDataContainer< C, T, F >::const
Initial value:

get the bin of a corresponding frequency of the frequency spectrum

Definition at line 74 of file FFTDataContainer.h.

template<template< typename X > class C, typename T, typename F>
const C<T>& utl::FFTDataContainer< C, T, F >::const
Initial value:

read out the time series (read access)

Definition at line 96 of file FFTDataContainer.h.

template<template< typename X > class C, typename T, typename F>
const C<F>& utl::FFTDataContainer< C, T, F >::const
Initial value:

read out the frequency spectrum (read access)

Definition at line 116 of file FFTDataContainer.h.

template<template< typename X > class C, typename T, typename F>
const unsigned int utl::FFTDataContainer< C, T, F >::evenedzone = (fNyquistZone / 2) * 2

Definition at line 63 of file FFTDataContainer.h.

template<template< typename X > class C, typename T, typename F>
return utl::FFTDataContainer< C, T, F >::fFrequencySpectrum
template<template< typename X > class C, typename T, typename F>
C<F> utl::FFTDataContainer< C, T, F >::fFrequencySpectrum
mutableprivate

Definition at line 147 of file FFTDataContainer.h.

template<template< typename X > class C, typename T, typename F>
unsigned int utl::FFTDataContainer< C, T, F >::fNyquistZone = 1
private
template<template< typename X > class C, typename T, typename F>
return utl::FFTDataContainer< C, T, F >::fTimeSeries
template<template< typename X > class C, typename T, typename F>
C<T> utl::FFTDataContainer< C, T, F >::fTimeSeries
mutableprivate

Definition at line 146 of file FFTDataContainer.h.

template<template< typename X > class C, typename T, typename F>
Domain utl::FFTDataContainer< C, T, F >::fUpToDateDomain = eBoth
mutableprivate
template<template< typename X > class C, typename T, typename F>
const C< F >::SizeType utl::FFTDataContainer< C, T, F >::highestbin = fFrequencySpectrum.GetSize() - 1

Definition at line 59 of file FFTDataContainer.h.

template<template< typename X > class C, typename T, typename F>
const int utl::FFTDataContainer< C, T, F >::sign = (fNyquistZone == evenedzone) ? -1 : 1

Definition at line 66 of file FFTDataContainer.h.

template<template< typename X > class C, typename T, typename F>
const double utl::FFTDataContainer< C, T, F >::startingfrequency = evenedzone * bandwidth

Definition at line 64 of file FFTDataContainer.h.

template<template< typename X > class C, typename T, typename F>
const double utl::FFTDataContainer< C, T, F >::timeBinning = fTimeSeries.GetBinning()

Definition at line 86 of file FFTDataContainer.h.

template<template< typename X > class C, typename T, typename F>
const int utl::FFTDataContainer< C, T, F >::timeTraceLength = fTimeSeries.GetSize()

Definition at line 87 of file FFTDataContainer.h.


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

, generated on Tue Sep 26 2023.