From cba83984eec0d2a03d277393ac42481cc9af6b56 Mon Sep 17 00:00:00 2001 From: nemu Date: Tue, 5 May 2009 06:51:06 +0000 Subject: [PATCH] fixed range bug and added tstart phase shift correction --- src/classes/PFourier.cpp | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/src/classes/PFourier.cpp b/src/classes/PFourier.cpp index 643b7179..c0b8cfbc 100644 --- a/src/classes/PFourier.cpp +++ b/src/classes/PFourier.cpp @@ -189,27 +189,20 @@ void PFourier::Transform(unsigned int apodizationTag) if (!fValid) return; -//cout << endl << ">> PFourier::Transform (apodizationTag=" << apodizationTag << ") ..." << endl; - PrepareFFTwInputData(apodizationTag); -/* -if (fNoOfBins < 200) { -for (unsigned int i=0; i> PFourier::PrepareFFTwInputData: " << i << ": fIn[i][0] = " << fIn[i][0]; -} -cout << endl; -} -*/ - fftw_execute(fFFTwPlan); -/* -for (unsigned int i=fNoOfBins-10; i> PFourier::PrepareFFTwInputData: " << i << ": fOut[i][0] = " << fOut[i][0]; -} -cout << endl; -*/ + // correct the phase for tstart != 0.0 + double phase, re, im; + for (unsigned int i=0; i