NextSlopeAtLevel (FPScript)

21.09.2021

Searches for the next slope of a specified minimum steepness through a level from a certain position onwards.

Syntax

NextSlopeAtLevel(DataSet, [ Position ], Level, DeltaY, DeltaX, Hysteresis, [ Orientation = EVENT_BOTH ] [ , Direction = EVENT_RIGHT ])

 

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

Part

Description

DataSet

The data set to be searched.

Permitted data structures are data series und signal. 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.

Position

If you are searching in a signal, this is the X value where the search is to start. If you are searching a data series, this is the index of the value where the search is to start. Here, a negative index determines a position relative to the end of the data set. If you omit the argument or pass the value Empty, the search starts at the beginning or end of the data set, depending on the direction of the search. The first or last value of the data set is only taken into account if you omit the argument or pass the Empty value.

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.

Level

Specifies the level the slopes have to pass through.

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.

DeltaY

Specifies the minimum Y interval by which the amplitude is to rise or fall so that a slope can be recognized.

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.

DeltaX

Specifies the X interval within which the amplitude must rise or fall by at least the amount of DeltaY .

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.

Hysteresis

Specifies the maximum amount by which the signal amplitude is allowed to swing within a slope in the opposite direction.

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 whether to search for falling and/or rising slopes.

The argument Orientation can have the following values:

Constant

Meaning

EVENT_POSITIVE

Search for rising slopes only.

EVENT_NEGATIVE

Search for falling slopes only.

EVENT_BOTH

Search for falling and rising slopes.

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.

Direction

Specifies the direction of the search in the function.

The argument Direction can have the following values:

Constant

Meaning

EVENT_RIGHT

Search to the right.

EVENT_LEFT

Search to the left.

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

Remarks

The result always has the data structure scalar value.

The slope can be characterized by the fact that it passes through the specified level and that neighboring values rise above or fall below the steepness specified. If DataSet is a data series, the result is the index of the slope found. If DataSet is a signal, the result is the X value of the slope. If no slope could be found, the value Empty is output as the result.

Available in

FlexPro Basic, Professional, Developer Suite

Examples

NextSlopeAtLevel(Signal, 5.5 s, 0 V, 1.2 V, 0.1 s, EVENT_POSITIVE,EVENT_LEFT)

Searches in a signal from the position X = 5.5 s heading to the left for the next rising slope at level 0 V, which rises in 0.1 s by at least 1.2 V. The result is the X value of the slope found.

Signal[[NextSlopeAtLevel(Signal, 4.5 s, 0 V, 1.2 V, 0.1 s)]]

Searches in a signal from the position X = 4.5 s heading to the right for the next rising slope at level 0 V. The result is the Y value of the slope found.

See Also

SlopesAtLevel Function

Slopes Function

NextSlope Function

Event Isolation Analysis Object

Share article or send as email:

You might be interested in these articles