transplant_error_kalman#
- pypillometry.signal.transplant_error_kalman(transplants, margin, fs, window, per_blink=False)[source]#
Error of the Kalman interpolation of transplanted blinks.
The core of each transplanted blink with margin around it (see
blink_stretches()) is interpolated withinterpolate_blinks_kalman()and compared to the signal without the blinks, as intransplant_error_mahot().- Parameters:
transplants (BlinkTransplant or list of BlinkTransplant) – signal(s) with transplanted blinks
margin (tuple of int) – samples (before, after) the core that are replaced too
fs (float) – sampling rate (Hz)
window (int) – samples before and after each stretch that the Kalman smoother uses
per_blink (bool) – return the errors of all blinks instead of their mean
- Return type:
- Returns:
the mean error per blink, or the error of each blink