weldx.core.TimeSeries

class weldx.core.TimeSeries(data, time=None, interpolation='linear')

Describes the behaviour of a quantity in time.

Construct a TimSeries.

Parameters
  • data (Union[Quantity, MathematicalExpression]) – Either a pint.Quantity or a weldx.MathematicalExpression. If a mathematical expression is chosen, it is only allowed to have a single free variable, which represents time.

  • time (Union[None, TimedeltaIndex, Quantity]) – An instance of pandas.TimedeltaIndex if a quantity is passed and ‘None’ otherwise.

  • interpolation (str) – A string defining the desired interpolation method. This is only relevant if a quantity is passed as data. Currently supported interpolation methods are: ‘step’, ‘linear’.

Methods

interp_time

Interpolate the TimeSeries in time.

Attributes

data

Return the data of the TimeSeries.

data_array

Return the internal data as ‘xarray.DataArray’.

interpolation

Return the interpolation.

shape

Return the shape of the TimeSeries data.

time

Return the data’s timestamps.

units

Return the units of the TimeSeries Data.