weldx.core.TimeSeries.interp_time

TimeSeries.interp_time(time, time_unit='s')

Interpolate the TimeSeries in time.

If the internal data consists of discrete values, an interpolation with the prescribed interpolation method is performed. In case of mathematical expression, the expression is evaluated for the given timestamps.

Parameters
  • time (Union[TimedeltaIndex, Quantity]) – A set of timestamps.

  • time_unit (str) – Only important if the time series is described by an expression and a ‘pandas.TimedeltaIndex’ is passed to this function. In this case, time is converted to a quantity with the provided unit. Even though pint handles unit prefixes automatically, the accuracy of the results can be heavily influenced if the provided unit results in extreme large or small values when compared to the parameters of the expression.

Returns

A data array containing the interpolated data.

Return type

xarray.DataArray