26 double mean = pulse.Sum(pulse.Size())/pulse.Size();
27 QVector meanPulse(pulse.Size()); meanPulse.Initialize(mean);
28 QVector zeroMeanPulse = pulse;
29 zeroMeanPulse -= meanPulse;
31 QVectorC transformedPulse(pulse.Size());
32 int ierr =
fTransformer.TransformToFreq(zeroMeanPulse, transformedPulse);
34 QVector realPart = transformedPulse.Re();
35 QVector imagPart = transformedPulse.Im();
37 double magSquared = realPart[k]*realPart[k] + imagPart[k]*imagPart[k];
error class with error type and description
Diana::QVector fNoisePowerSpectrum
Diana::QVector GetNoisePowerSpectrum() const
Diana::QRealComplexFFT fTransformer
QNoisePowerSpectrumEstimator(const int size, Diana::QFFT::WindowType w, int coherentGain=2)
QError Add(const Diana::QVector &pulse)
the Diana namespace is needed because sometimes we use Qt libraries, that use same class names of our...