NegativePeaks (FPScript)

07.02.2018
 Analyzing Data Mathematically > Reference > FPScript Functions > Event Isolation > NegativePeaks

NegativePeaks (FPScript)

<< Klicken, um Inhaltsverzeichnis anzuzeigen >>

  Analyzing Data Mathematically > Reference > FPScript Functions > Event Isolation >

NegativePeaks (FPScript)

Searches in a data set for negative peaks.

Syntax

NegativePeaks(DataSet, Level, [ Orientation = EVENT_BOTH ], [ Operation = EVENT_INDEX ], [ DeltaXmin ] [ , DeltaXmax ])

 

The syntax of the NegativePeaks function consists of the following parts:

Teil

Beschreibung

DataSet

The data set to be searched.

Permitted data structures are data series, data matrix, signal and 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. 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.

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.

Orientation

Specifies the orientation of the peaks to be found.

The argument Orientation can have the following values:

Constant

Meaning

EVENT_POSITIVE

Search only for beginnings of peaks.

EVENT_NEGATIVE

Search only for ends of peaks.

EVENT_BOTH

Search for peak beginnings and ends.

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:

Constant

Meaning

EVENT_INDEX

The indices of the values or points meeting the condition are placed in the result data set.

EVENT_EXTRACT

Only the points or values meeting the condition are transferred into the result data set.

EVENT_SETVOID

The points or values that do not meet the condition are also included in the result data set, but there they are marked as void.

+ EVENT_COMPLEMENT

This constant can be optionally added and then reverses the selected operation. Then, for example, for EVENT_EXTRACT, the points that do not meet the condition are copied.

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_INDEX.

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 equals 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 equals 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

The operations EVENT_EXTRACT and EVENT_INDEX are not permitted for data matrices and signal series.

Available in

FlexPro Standard, 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.

See Also

PositivePeaks Function

NextNegativePeak Function

LevelCrossings Function

ValuesAboveLevel Function

ValuesBelowLevel Function

ValuesInInterval Function

Event Isolation Analysis Object

Share article or send as email:

You might be interested in these articles