Commit e36efd67 authored by thomas.forbriger's avatar thomas.forbriger
Browse files

libtsxx [WP]: adjust debug output of linear interpolator

parent 7925ead4
......@@ -36,6 +36,7 @@
#include<iostream>
#include <tsxx/ipolin.h>
#include <tsxx/debug.h>
namespace ts {
......@@ -78,19 +79,19 @@ namespace ts {
"requested sample lies outside time series");
aff::Tsubscript iright= (ileft < s.l()) ? ileft+1 : ileft;
double f=libtime::time2double(t-sff::wid2isample(hd, ileft))/hd.dt;
if (this->debug())
{
std::cout << "DEBUG: LinearInterpolator::operator():" << std::endl;
std::cout << TF_IPOLIN_CC_VERSION << std::endl;
std::cout << " ileft: " << ileft << std::endl
<< " iright: " << iright << std::endl
<< " tleft: " << sff::wid2isample(hd, ileft).timestring()
<< std::endl
<< " tright: " << sff::wid2isample(hd, iright).timestring()
<< std::endl
<< " t: " << t.timestring() << std::endl
<< " f: " << f << std::endl;
}
TSXX_debug(this->debug(), "LinearInterpolator::operator():",
TSXX_value(ileft) << " " <<
TSXX_value(iright) << " " <<
TSXX_value(f) << " " <<
TSXX_value(hd.dt) << std::endl <<
" " << TSXX_value(Mdt.timestring())
<< std::endl <<
" " << TSXX_value(sff::wid2isample(hd, ileft).timestring())
<< std::endl <<
" " << TSXX_value(t.timestring())
<< std::endl <<
" " << TSXX_value(sff::wid2isample(hd, iright).timestring())
);
Tvalue retval=((1.-f)*s(ileft)+f*s(iright));
return(retval);
}
......
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