Hello everyone,
An odd one today, I have an iEEG system which pumps out a 30 kHz signal for some reason. A bit high for our needs. The signal is retrieved in bytes package send by TCP, which I will call chunks. those chunks of shape (n_channels, n_samples)
don’t always have the same number of samples. How should I down-sample the chunks by a factor of e.g. 30?
Option 1: Simple decimation
Not great, but at least I retain control on the boundary between chunk. If chunk A has 62 samples, and chunk B 84 samples, I can decimate by selecting sample 0, 30 and 60 from chunk A and sample 28 and 58 from chunk B; shifting the decimation depending on the previous chunk.
Option 2: scipy.signal.resample
or mne.filter.resample
Seems like a better idea, but what happens at the chunk boundary?
Any guideline, ideas or code snippet I could refer to? Thanks!
Mathieu