TS++ library: time series library
|
ts::TDsfftimeseries ts::ipo::resample | ( | const Interpolator & | ip, |
const libtime::TAbsoluteTime & | first, | ||
const libtime::TRelativeTime & | dt, | ||
const int & | n, | ||
const bool & | shrink = false |
||
) |
resample a time series
function to resample data
This function provides resampling on the base of a reference to an instance of an interpolator class (containing the input time series) and a definition of sampling in terms of the time of the first sample, a sampling interval and the desired number of samples.
Optionally this function adjusts the time window for which resampling is done to a time span inside the time window for which input data is available. In this case the time of the first sample is adjusted such that it is offset from the originally requested time by an integer number of sampling intervals.
If the option shrink
is not used, exception ipo::ExceptionTimeWindowOutside will be thrown if not all of the requested sample values are within the time window of the original series.
ip | reference to a waveform interpolator |
first | time of first sample in new time series |
dt | sampling interval of new time series |
n | number of samples in new time series |
shrink | if true, shrink time window such, that input data is available for the whole window |
Definition at line 72 of file ipo.cc.
References ts::ipo::Interpolator::debug(), ts::seife::first(), ts::ipo::Interpolator::header(), TSXX_debug, and TSXX_Xassert.