Differentiating Functions

Delta

You can compute the deltas between the consecutive signal samples by calling the method delta().

A new Trace instance labeled with the performed transformation 'delta' is returned.

>>> Trace('Signal', [-1.5, -0.5, 0 , 0.5, -1.5]).delta()
Trace(label='Signal:delta', samples=[0.0, 1.0, 0.5, 0.5, -2.0])

Note

The first signal sample is used as the preset value (previous value) to compute the delta for the first signal sample.

(Source code, html)

Enter Positive

You can check when the signal samples enters the positive numbers by calling the method enter_positive().

A new Trace instance labeled with the performed transformation 'enter_positive' is returned.

>>> Trace('Signal', [0, 1, 1, 1, -1, 1, 1, 1, 0]).enter_positive()
Trace(label='Signal:enter_positive', samples=[0, 1, 0, 0, 0, 1, 0, 0, 0])

Note

The first signal sample is used as the preset value (previous value) to compute the delta for the first signal sample.

(Source code, html)

Left Positive

You can check when the signal samples left the positive numbers by calling the method left_positive().

A new Trace instance labeled with the performed transformation 'left_positive' is returned.

>>> Trace('Signal', [1, 1, -1, 0, 1, 1, 0, -1]).left_positive()
Trace(label='Signal:left_positive', samples=[0, 0, 1, 0, 0, 0, 1, 0])

Note

The first signal sample is used as the preset value (previous value) to compute the delta for the first signal sample.

(Source code, html)

Enter Negative

You can check when the signal samples enters the negative numbers by calling the method enter_negative().

A new Trace instance labeled with the performed transformation 'enter_negative' is returned.

>>> Trace('Signal', [0, -1, -1, -1, 1, -1, -1, -1, 0]).enter_negative()
Trace(label='Signal:enter_negative', samples=[0, 1, 0, 0, 0, 1, 0, 0, 0])

Note

The first signal sample is used as the preset value (previous value) to compute the delta for the first signal sample.

(Source code, html)

Left Negative

You can check when the signal samples left the negative numbers by calling the method left_negative().

A new Trace instance labeled with the performed transformation 'left_negative' is returned.

Note

The first signal sample is used as the preset value (previous value) to compute the delta for the first signal sample.

>>> Trace('Signal', [-1, -1, 1, 0, -1, -1, 0, 1]).left_negative()
Trace(label='Signal:left_negative', samples=[0, 0, 1, 0, 0, 0, 1, 0])

(Source code, html)