differentiate_signal

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

Differentiate the signal values in-place.

The differentiated value for the first and last value (i = 0 or n-1) are given by:

dv[i]/dt = (v[i + 1] - v[i]) / dt

All the intermediate values (0 < i < n-1) are given by:

dv[i]/dt = (v[i + 1] - v[i - 1]) / 2dt

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

Parameters:
valuesnumpy.ndarray (float)

The signal values of shape (n_signal,). Updated in-place.

dtfloat, optional

The interval between signal samples.

Returns:
None