integrate_signal

sofia_redux.scan.signal.signal_numba_functions.integrate_signal(values, dt=1.0)[source]

Integrate signal values in-place using the trapezoid rule.

The integrated value for signal x (c(x)) at point i is calculated using the trapezoid rule:

c(x)[i] = sum_{j=0}^{i}((x[j-1] + x[j]) * dt/2)

where x[-1] is taken to be zero.

The integrated signal is stored in the input values array (updated in-place).

Parameters:
valuesnumpy.ndarray of float

1-D array containing values to integrate. Updated in-place.

dtfloat, optional

Spacing between samples.

Returns:
None