Reduces the number of values in a data set through delta compression.
Syntax
DeltaCompress(DataSet, DeltaY, [ Predecessors = 0 ], [ Operation = EVENT_EXTRACT ] [ , RemoveVoidValues = TRUE ])
The syntax of the DeltaCompress function consists of the following parts:
Part |
Description |
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DataSet |
The data set to be compressed. Permitted data structures are Data series, Data matrix, Signal und Signal series. All numeric data types are permitted. For complex data types the absolute value is formed. If the argument is a list, then the function is executed for each element of the list and the result is also a list. |
||||||||||||
DeltaY |
Specifies the minimum Y interval by which the amplitude is to rise or fall so that a value can be copied. Permitted data structures are Scalar value. All numeric data types are permitted. The unit has to be compatible with that of parameter DataSet . If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. |
||||||||||||
Predecessors |
Specifies the number of predecessors to be copied for each value accepted. Improves the reproduction of slopes in a compressed data set. Permitted data structures are Scalar value. All numeric data types are permitted. If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. If this argument is omitted, it will be set to the default value 0 . |
||||||||||||
Operation |
Defines the function's mode of operation. The argument Operation can have the following values:
If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. If this argument is omitted, it will be set to the default value EVENT_EXTRACT . |
||||||||||||
RemoveVoidValues |
TRUE removes all void values. FALSE considers changes from void to valid and vice versa as changes that are retained in the compressed data set. Permitted data structures are Scalar value. Supported data types are Boolean value. If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. If this argument is omitted, it will be set to the default value TRUE . |
Remarks
The delta compression reduces the data of a data set by removing all values for which the absolute deviation from the preceding value is smaller than a given threshold value. For signals that show a constant value over long distances, this can lead to a considerable reduction in data without losing a large amount of information. The algorithm first uses the first value in DataSet that is not a void floating point value as the first sampling point of the compressed data set. For subsequent values, the absolute value of the difference is compared to the specified DeltaY. If this is greater than DeltaY, then this value is the next reference value and it as well as the specified number of predecessor values become part of the compressed data set. A slope is always assumed after the end of the data set. If the value Predecessors is equal to one, for example, the last value in the data set is transferred to the result as the predecessor of this slope.
Available in
FlexPro Basic, Professional, Developer Suite
Examples
DeltaCompress({3, 5, 4, 2, 7, 6, 8, 1}, 1.5) |
Results in {3, 5, 2, 7, 1}. |
DeltaCompress({3, 5, 4, 2, 7, 6, 8, 1}, 1.5, 1) |
Results in {3, 5, 4, 2, 7, 8, 1}. |
DeltaCompress({?, 2, 3, ?, 3, 3, 3, ?, ?, 3, 4, 1, ?}, 0.5, 0, EVENT_INDEX) |
Results in {1, 2, 10, 11}. |
DeltaCompress({?, 2, 3, ?, 3, 3, 3, ?, ?, 3, 4, 1, ?}, 0.5, 0, EVENT_INDEX, FALSE) |
Results in {0, 1, 2, 3, 4, 7, 9, 10, 11, 12}. |