InterpolatorTimeSeries

This class resamples data of a times series to new poins in time.

Polynomial

Polynomial prediction using a moving polynomial of polynomialDegree. The optimal polynomial is chosen based on the centricity of the data points around the resampling point and the distance to all polynomial data points. All polynomial data points must be within maxDataPointRange. Resampling points within maxExtrapolationDistance of the polynomial will be extrapolated. The elements maxDataPointRange and maxExtrapolationDistance are given in the unit of seconds. If negative values are used, the unit is relative to the median input sampling.

instrumentResample_polynomial
Figure: Example of polynomial prediction when resampling from 5 to 1 minute sampling

NameTypeAnnotation
polynomialDegree
uintdegree of the moving polynomial
maxDataPointRange
double[seconds] all degree+1 data points must be within this range for a valid polynomial
maxExtrapolationDistance
double[seconds] resampling points within this range of the polynomial will be extrapolated

Least squares polynomial fit

A polynomial of polynomialDegree is estimated using all data points within maxDataPointDistance of the resampling point. This polynomial is then used to predict the resampling point. A resampling point will be extrapolated if there are only data points before/after as long as the closest one is within maxExtrapolationDistance. The elements maxDataPointDistance and maxExtrapolationDistance are given in the unit of seconds. If negative values are used, the unit is relative to the median input sampling.

instrumentResample_leastSquares
Figure: Example of least squares polynomial fit when resampling from 5 to 1 minute sampling

NameTypeAnnotation
polynomialDegree
uintdegree of the estimated polynomial
maxDataPointDistance
double[seconds] all data points within this distance around the resampling point will be used
maxExtrapolationDistance
double[seconds] resampling points within this range of the polynomial will be extrapolated

Fill gaps with least squares polynomial fit

NameTypeAnnotation
polynomialDegree
uintdegree of the estimated polynomial
maxDataGap
double[seconds] max data gap to interpolate
maxDataSpan
double[seconds] time span on each side used for least squares fit
margin
double[seconds] margin for identical times