RelativeTime, RelativeTimeStrict
Converts time data to relative time.
Syntax
RelativeTime[<Y|X|Z>] Data Object
or
RelativeTimeStrict[<Y|X|Z>] Data Object
The syntax of the RelativeTime operator consists of the following elements:
Element |
Description |
---|---|
Expression |
A data object or expression that provides data with header information. |
Remarks
The conversion to relative time is done by subtracting the timestamp of the data object on the General tab of the Properties dialog box for the data component that is to be converted.
The RelativeTimeStrict variant of the operator returns an error when compiling the formula if Expression is an FPScript expression that does not supply a data object. When executing the formula, this variant issues an error if the relevant data object component does not have a timestamp. The RelativeTime variant ignores both errors and does not change the argument.
The operator can process all data structures and real data types. Lists are processed element by element. If a component is appended to the operator, such as in RelativeTime<X>, only the relevant component is processed in aggregate data structures and the data of the other components remain unchanged in the result. If no component is appended, all components are processed. For non-aggregate data structures, RelativeTime<Y> is equivalent to RelativeTime and RelativeTime<X> as well as RelativeTime<Z> have no effect.
If the relevant data component is already in relative time, i.e. it is not of the calendar time data type, it will be copied without modification. If Expression does not have a timestamp for the component to be converted, the first value in the data set will be subtracted from all the data instead, i.e. the first value will be assigned the relative time of t = 0. If the operator is used for a particular component, Expression does not have a timestamp for the component to be converted, and the first value in the data set is also void, an error will be output. If Unit Manager is activated, it will check whether the data component unit has time as the dimension. If it does not, no conversion will take place and it will be copied to the result unchanged.
Since the operator has to extract the timestamp from the expression, not just any expression is permitted as the argument. Only expressions that represent a data object or have header information assigned are allowed.
Available in
FlexPro View, Basic, Professional, Developer Suite
Examples
RelativeTime<X> Signal |
Converts the X component of the signal to relative time. |
RelativeTime Signal |
Converts all components of the signal with a time unit to relative time. |
RelativeTime<X> Signal(Amplitude, Time) |
Generates an error message, since the operator argument does not represent a data object. |