Transform Time Series to
Irregular Interval
transformTimeSeries(TimeSeriesMath
tsData,
string
functionTypeString )
Generate a new time series data set from the current regular or irregular time series. The times for the new data set are defined by the times in tsData, which may be a regular or irregular time series data set.
Values for the new time series are computed from the original time series data set using one of seven available functions. The function is selected by setting functionTypeString to one of the following types:
"INT" - Interpolate at end of interval
"MAX" - Maximum over interval
"MIN" - Minimum over interval
"AVE" - Average over interval
"ACC" - Accumulation over interval
"ITG" - Integration over interval
"NUM" - Number of valid data over interval
where “interval” is the interval between time points in the new time series.
The data type of the original time series data governs how values are interpolated. Data type “INST-VAL” (or “INST-CUM”) considers the value to change linearly over the interval from the previous data value to the current value. Data type “PER-AVER” considers the value to be constant at the current value over the interval. Data type “PER-CUM” considers the value to increase from 0.0 (at the start of the interval) up to the current value over the interval. Interpolation of the three data types is illustrated in the figure below.
How interpolation is performed for a specific data type influences the computation of new time series values for the selected function. For example, if the data type is “INST-VAL”, the function “Maximum over interval” is evaluated by: Finding the maximum value of the data points from the original time series that are inclusive in the new time interval. Linearly interpolate values at beginning and ending of the new time interval, and determine if these values represent the maximum over the interval.
Interpolation of “INST-VAL”, “PER-AVER” and “PER-CUM” data
Referring to the plots in the figure above, the “Average over interval” function is applied to a time series by integrating the area under the curve between interpolated points and dividing the result by the interval time.
See also: transformTimeSeries( string timeIntervalString,
string timeOffsetString, string functionTypeString )
Parameters:
tsMath – A TimeSeriesMath object used to define the times for the new data
set.
functionTypeString – A String specifying the method for computing values
for the new time series data set.
Example:
newTsData = tsValues.transformTimeSeries(
tsTimeTemplate,
“MAX”)
Returns: A new TimeSeriesMath object