35 #define TF_IPOLIN_CC_VERSION \ 51 Mlast(sff::wid2lastsample(Mts.header)),
52 Mdt(libtime::double2time(Mts.header.dt)),
53 Madjustedfirst(Mts.header.date+(Mdt/2)),
54 Minputwindow(Mts.header.date,Mlast)
57 "LinearInterpolator::LinearInterpolatorperator(...):",
81 using libtime::TAbsoluteTime;
82 using libtime::TRelativeTime;
94 "requested sample lies outside time series");
95 aff::Tsubscript iright= (ileft < s.last()) ? ileft+1 : ileft;
96 double f=libtime::time2double(t-sff::wid2isample(hd, ileft-s.f()))/hd.dt;
107 " " <<
TSXX_value(sff::wid2isample(hd, ileft-s.f()).timestring())
111 " " <<
TSXX_value(sff::wid2isample(hd, iright-s.f()).timestring())
117 Tvalue retval=((1.-f)*s(ileft)+f*s(iright));
Tconst_timeseries Mts
here we hold a copy
Tconst_timeseries::Theader Theader
linear interpolation (prototypes)
LinearInterpolator(const Tconst_timeseries &ts, const bool &debug=false)
initialize the linear interpolator
#define TSXX_value(V)
report value
libtime::TAbsoluteTime Madjustedfirst
Ttimeseries::Tvalue Tvalue
#define TSXX_debug(C, N, M)
produce debug output
libtime::TAbsoluteTime Mlast
libtime::TRelativeTime Mdt
Interface to time series interpolator.
Structure to hold the data samples of a series together with header information to form a time series...
Tvalue operator()(const libtime::TAbsoluteTime &t) const
calculate interpolated value
All stuff in this library will be placed within namespace ts.
libtime::TRange Minputwindow
Theader header
data header fields
bool debug() const
indicate whether interpolator is in debug mode
#define TSXX_assert(C, M)
Check an assertion and report by throwing an exception.
Ttimeseries::Tvalue Tvalue
Tconst_timeseries::Tseries Tconst_series