Integrating Functions#

Accumulate#

You can accumulate the signal samples by calling the method accumulate().

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

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

(Source code, html)

Sums Positive#

You can integrate the signal samples limited to positive sums by calling the method sums_positive().

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

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

(Source code, html)

Sums Negative#

You can integrate the signal samples limited to negative sums by calling the method sums_negative().

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

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

(Source code, html)