integrate_weighted_signal

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

Integrate signal values and weights in-place using the trapezoid rule.

The integrated weights c(w) and integration signal c(x) are given by:

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

where w[-1] and x[-1] are taken to be zero.

Parameters:
valuesnumpy.ndarray (float)

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

weightsnumpy.ndarray (float)

The signal weights to integrate in-place of shape (n_signal,).

dtfloat, optional

The spacing between sample values.

Returns:
None