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"

Public Types | |
| enum | Domain { eTime, eFrequency, eBoth } |
Public Member Functions | |
| void | Clear () |
| delete contents of the contained traces More... | |
| return startingfrequency sign * | double (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 |
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.
| C | Container class that is used to store the data, usually Trace |
| T | Data type that is used to store time-series data, usually double |
| F | Data type that is used to store frequency-spectrum data, usually complex<double> |
Definition at line 31 of file FFTDataContainer.h.
| enum utl::FFTDataContainer::Domain |
| Enumerator | |
|---|---|
| eTime | |
| eFrequency | |
| eBoth | |
Definition at line 34 of file FFTDataContainer.h.
|
default |
constructor setting up default values
|
inline |
delete contents of the contained traces
Definition at line 134 of file FFTDataContainer.h.
| return startingfrequency sign* utl::FFTDataContainer< C, T, F >::double | ( | bin | ) |
|
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().
|
inline |
get the Nyquist zone
Definition at line 40 of file FFTDataContainer.h.
Referenced by revt::Channel::GetNyquistZone(), RdStationInterpolatorStarShape::RdStationInterpolatorStarShape::Run(), utl::FFTDataContainerAlgorithm::UpsampleTimeSeries(), and utl::FFTDataContainerAlgorithm::zeroPad().
|
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().
| throw utl::FFTDataContainer< C, T, F >::OutOfBoundException | ( | "Requested frequency for a bin that is not in the FrequencySpectrum." | ) |
| throw utl::FFTDataContainer< C, T, F >::OutOfBoundException | ( | "Requested bin for a frequency that is not in the FrequencySpectrum." | ) |
|
inline |
set the Nyquist zone
Definition at line 44 of file FFTDataContainer.h.
Referenced by io::ChannelFFTDataContainer_ROOT::operator>>(), io::StationFFTDataContainer_ROOT::operator>>(), RdAntennaStationToChannelConverter::RdAntennaStationToChannelConverter::Run(), RdStationNoiseAnalyser::Run(), revt::Channel::SetNyquistZone(), utl::FFTDataContainerAlgorithm::UpsampleTimeSeries(), and utl::FFTDataContainerAlgorithm::zeroPad().
| return utl::FFTDataContainer< C, T, F >::std::round | ( | bin | ) |
|
private |
Definition at line 49 of file FFTDataContainer.cc.
References fftwpp::fftw::fft(), FFTWComplex, FFTWdelete, FFTWdouble, utl::g, and WARNING.
|
private |
Definition at line 134 of file FFTDataContainer.cc.
References fftwpp::fftw::fft(), FFTWComplex, FFTWdelete, FFTWdouble, utl::g, and WARNING.
|
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().
|
private |
Definition at line 13 of file FFTDataContainer.cc.
References fftwpp::fftw::fft(), FFTWComplex, FFTWdelete, FFTWdouble, utl::g, and WARNING.
|
private |
Definition at line 92 of file FFTDataContainer.cc.
References fftwpp::fftw::fft(), FFTWComplex, FFTWdelete, FFTWdouble, utl::g, and WARNING.
|
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().
| const double utl::FFTDataContainer< C, T, F >::bandwidth = double(highestbin) * binning |
Definition at line 62 of file FFTDataContainer.h.
| const double utl::FFTDataContainer< C, T, F >::bin = (frequency - startingfrequency) * sign * timeBinning * timeTraceLength |
Definition at line 88 of file FFTDataContainer.h.
| const double utl::FFTDataContainer< C, T, F >::binning = fFrequencySpectrum.GetBinning() |
Definition at line 58 of file FFTDataContainer.h.
| double utl::FFTDataContainer< C, T, F >::const |
get the frequency corresponding to a bin of the frequency spectrum
Definition at line 55 of file FFTDataContainer.h.
| int utl::FFTDataContainer< C, T, F >::const |
get the bin of a corresponding frequency of the frequency spectrum
Definition at line 74 of file FFTDataContainer.h.
| const C<T>& utl::FFTDataContainer< C, T, F >::const |
read out the time series (read access)
Definition at line 96 of file FFTDataContainer.h.
| const C<F>& utl::FFTDataContainer< C, T, F >::const |
read out the frequency spectrum (read access)
Definition at line 116 of file FFTDataContainer.h.
| const unsigned int utl::FFTDataContainer< C, T, F >::evenedzone = (fNyquistZone / 2) * 2 |
Definition at line 63 of file FFTDataContainer.h.
| return utl::FFTDataContainer< C, T, F >::fFrequencySpectrum |
Definition at line 119 of file FFTDataContainer.h.
Referenced by utl::FFTDataContainer< utl::Trace, double, std::complex< double > >::Clear(), and utl::FFTDataContainer< utl::Trace, double, std::complex< double > >::GetFrequencySpectrum().
|
mutableprivate |
Definition at line 147 of file FFTDataContainer.h.
|
private |
Definition at line 144 of file FFTDataContainer.h.
Referenced by utl::FFTDataContainer< utl::Trace, double, std::complex< double > >::GetNyquistZone(), and utl::FFTDataContainer< utl::Trace, double, std::complex< double > >::SetNyquistZone().
| return utl::FFTDataContainer< C, T, F >::fTimeSeries |
Definition at line 99 of file FFTDataContainer.h.
Referenced by utl::FFTDataContainer< utl::Trace, double, std::complex< double > >::Clear(), and utl::FFTDataContainer< utl::Trace, double, std::complex< double > >::GetTimeSeries().
|
mutableprivate |
Definition at line 146 of file FFTDataContainer.h.
|
mutableprivate |
Definition at line 142 of file FFTDataContainer.h.
Referenced by utl::FFTDataContainer< utl::Trace, double, std::complex< double > >::Clear(), utl::FFTDataContainer< utl::Trace, double, std::complex< double > >::GetFrequencySpectrum(), and utl::FFTDataContainer< utl::Trace, double, std::complex< double > >::GetTimeSeries().
| const C< F >::SizeType utl::FFTDataContainer< C, T, F >::highestbin = fFrequencySpectrum.GetSize() - 1 |
Definition at line 59 of file FFTDataContainer.h.
| const int utl::FFTDataContainer< C, T, F >::sign = (fNyquistZone == evenedzone) ? -1 : 1 |
Definition at line 66 of file FFTDataContainer.h.
| const double utl::FFTDataContainer< C, T, F >::startingfrequency = evenedzone * bandwidth |
Definition at line 64 of file FFTDataContainer.h.
| const double utl::FFTDataContainer< C, T, F >::timeBinning = fTimeSeries.GetBinning() |
Definition at line 86 of file FFTDataContainer.h.
| const int utl::FFTDataContainer< C, T, F >::timeTraceLength = fTimeSeries.GetSize() |
Definition at line 87 of file FFTDataContainer.h.