1

I have a numpy 2dim array that represents a multi channel Bio-Signal. This array has dimension 20 x n_samples where the columns represent : Sample number - 16 channels data - time.

Given to bluetooth connection i have some package drops so i have gaps in signal. The array has to be imported into MNE-Python for further analysis. This library assumes that the sampling rate is constant (it's not able to able to handle gaps assuming that we MUST have a sample every 4 ms) so i have tried 3 different approaches:

  1. Don't fill the gaps and let the signal to be spliced together (MNE Python create a structure with data equally spaced)
  2. Fill the gaps with np.nan
  3. Fill the gaps with 0s

My question is regarding the filtering that i need to apply on the data. I have used scipy.welch in order to get the PSD of the signal. It seems that the signal with nan as filler performs better than the original one and the one filled with 0s but the behavior is strange once i try to get the psd of a low passed and high pass filtered version of the signal.

Does anyone know what is the best approach?

Here are 3 images for the different filling strategies. (The top ones are the psd obtained with MNE library, the bottom ones with scipy.welch). The filter used is a FIR.

Filled with NAN

Filled with 0s

Spliced

Andrea A.
  • 33
  • 5
  • How many package dropouts do you have and how long are those dropouts (in seconds) on average? Do you absolutely need continuous data or could it be possible to epoch your data and just drop any epoch that happens to contain a "data dropout"? – S.A. Apr 14 '18 at 20:59

0 Answers0