NegativePeaks (FPScript)
Searches in a data set for negative peaks.
Syntax
NegativePeaks(DataSet, Level, [ Orientation = EVENT_BOTH ], [ Operation = EVENT_DEFAULT ], [ DeltaXmin ] [ , DeltaXmax ])
The syntax of the NegativePeaks function consists of the following parts:
Part |
Description |
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DataSet |
The data set to be searched. Permitted data structures are data series, data matrix, signal und signal series. All numeric data types are permitted. For the X component additional restrictions do apply.The values must be monotonously increasing. 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. |
||||||||||||
Level |
Specifies the level below which the values must lie. Permitted data structures are scalar value. All numeric data types are permitted. The unit has to be compatible with that of parameter DataSet. 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. |
||||||||||||
Orientation |
Specifies the orientation of the peaks to be found. The argument Orientation 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_BOTH. |
||||||||||||
Operation |
Specifies the way the function operates. 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_DEFAULT. |
||||||||||||
DeltaXmin |
Optionally determines the minimum duration or number of values that an event must endure to be valid. If you search within a signal, this is the X range from the first value of the event to the last value of the event. If you search within a data series, this is the minimum number of data points that the event must have. Permitted data structures are scalar value. All numeric data types are permitted. The unit has to be compatible with that of parameter DataSet. For complex data types the absolute value is formed. 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. |
||||||||||||
DeltaXmax |
Optionally determines the maximum duration or number of values that an event can endure to be valid. If you search within a signal, this is the X range from the first value of the event to the last value of the event. If you search within a data series, this is the maximum number of data points that the event can have. Permitted data structures are scalar value. All numeric data types are permitted. The unit has to be compatible with that of parameter DataSet. For complex data types the absolute value is formed. 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. |
Remarks
A peak beginning is found when the value is less than or equal to the level and the previous value is greater than the level. A peak end is found when the value is less than or equal to the level and the subsequent value is greater than the level. Peaks that lie at the beginning or end of the data set are also found.
Available in
FlexPro Basic, Professional, Developer Suite
Examples
NegativePeaks({2,2,3,4,2,2,4,2}, 2, EVENT_POSITIVE) |
Results in {0L, 4L, 7L}. Searches within the data set for negative peaks whose level crossing is at 2. The indices where the peaks begin are returned. |
NegativePeaks(Signal({2,2,2,3,4,2,2,4,2},1), 2, EVENT_BOTH, EVENT_INDEX, , 1) |
Results in {5L, 6L, 8L, 8L}. Searches within the signal for negative peaks whose level crossing is at 2. The indices where the peaks begin and end are returned. A peak may have at most the width of 1. |