Set sampling Rate


#1

Hi everybody, I recently use muse to collect eeg and accelerometer data. I found that the sampling rate of two data is not the same, 220Hz for eeg and 50Hz for accelerometer. Can I set the sampling rate for both of them?

Thank you very much!


#2

Hi there,

You can’t set the sampling rate of the data as it comes from Muse. You can choose to resample the data in some way, if you want to, of course.

Why do you want to change the sampling rates, and what do you want to change them to?


#3

Hi Tom,

Actually I want to change the sampling rate of Muse device.
I want to plot EEG data with accelerometer data in the same plot. But they are sampled at different rates so it’s not convenient to plot them.

Best,
Yuming


#4

Hey Yuming,

I’m not sure I totally understand your concern about the plotting. How are you planning on implementing it?

Different sampling rates shouldn’t affect it. One line/signal will have fewer samples than the other, but that doesn’t mean they won’t be aligned just fine in time.

For instance, if you have two sets of x and y coordinates:

{ (0,1) (1,5) (2,3) (3,1) (4,2) } – “sampled” in increments of 1

{ (0,4) (5,3) (10,5) } – “sampled” in increments of 5

…what’s to stop us from plotting both of these sets on the same graph?

Also, have you tried using MuseLab? It can plot multiple signals at different sampling rates on the same plot.

You can up/downsample the data if you want to, but personally I think that would be more difficult than just plotting them together as they are.


#5

Hi Tom,

I can plot them in one figure, but when I want to find some specific time frame in the plot, the data of that frame for the low sampling may not be accurate.

Can I change the sampling rate by modifying the preset?


#6

Like I said, it’s not possible to change the sampling rate. The consumer firmware presets are for 220Hz EEG and 50Hz accelerometer only.

Can you explain what you mean by “the data of that frame for the low sampling may not be accurate”? I’m not sure I follow. The fact the sampling rates are different doesn’t affect the accuracy of the timing.

All the data is timestamped by MuseIO. The timestamps from MuseIO are not as accurate as they could be, that’s true. If that’s your concern then you can assume that the sampling rates are constant (they are, more or less, as long as the Bluetooth connection is solid) and ignore the timestamps. Then you just need to know your starting time and go from there. Take a look at this post for more info: http://forum.choosemuse.com/forum/developer-forum/3892-how-to-handle-varying-timestamp-deltas