Commit 80412a19 authored by thomas.forbriger's avatar thomas.forbriger
Browse files

cross [WP]: use on-the-fly scaling in FFT

parent 59d66e99
......@@ -218,16 +218,7 @@ void FourierProcessor::padseries(const unsigned int& n)
if (refft)
{
Mpadded=aff::subarray(Mseries)(Mseries.f(),Mseries.f()+n-1);
Mspectrum=MFFT(Mpadded);
Mspectrum *= MFFT.scale_spectrum(this->Mdt);
TFXX_debug(this->Mdebug,
"FourierProcessor::padseries(const Tconsttimeseries& n)",
"carried out FFT "
<< TFXX_value(Mpadded.size()) << ", "
<< TFXX_value(MFFT.size()) << ", "
<< TFXX_value(Mspectrum.size()) << ", \n"
<< TFXX_value(MFFT.scale_spectrum(this->Mdt)) << ", "
<< TFXX_value((this->Mdt)));
Mspectrum=MFFT(Mpadded, this->Mdt);
Mspecavail=true;
}
} // void FourierProcessor::padseries(const unsigned int& n)
......@@ -590,8 +581,7 @@ int main(int iargc, char* argv[])
sresult=specconv(sreference, sdata);
TFXX_debug(opt.debug,
"main()", "returned: " << TFXX_value(sresult.size()));
result=FFT(sresult);
result *= FFT.scale_series(reference.header.wid2().dt);
result=FFT(sresult, reference.header.wid2().dt);
}
else
{
......@@ -624,8 +614,7 @@ int main(int iargc, char* argv[])
FourierProcessor::Tspectrum::Tcoc sreference=FFTreference(n);
FourierProcessor::Tspectrum
sresult=speccorr(sreference, sdata);
result=FFT(sresult);
result *= FFT.scale_series(reference.header.wid2().dt);
result=FFT(sresult, reference.header.wid2().dt);
}
else
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment