questions on Cyton data stream, index, samples per second, ...
Hello All,
I have collected data (Saved Data folder) generated from 8 channel OpenBCI Ultracortex "Mark IV" EEG Headset. I have few questions regarding the data. It would be great if someone could help me.
1) The first column is sample index. Question is - should the values of the index increase continuously? I have the following data and I feel there is an error. The index values are 110, 213 and 112. The channel values also are not close to its previous or next values for 213 index row. (I have excluded the Aux columns)
110,-23038.52,-61899.51,-4410.25,-19818.35,26366.92,-7118.29,-57483.84,-20941.17,2020-01-01 16:45:23.667
213,178991.25,-45908.29,80566.41,1102.21,163972.19,77394.59,4377.54,-85038.62,2020-01-01 16:45:23.667
112,-23360.41,-62231.46,-4444.11,-20112.86,28193.64,-5988.81,-55367.68,-21161.11,2020-01-01 16:45:23.667
What should we do if we have an index that is out of sequence?
2) The experiment had sub tasks with different stimulus but the data was stored in a single file to avoid delay. The time of each task was noted. But the data has random time (experiment was conducted in noon but random time value like night) is present in the data. When do we get such errors??
3) We had set the frequency to 250Hz. But the number of samples per second varies significantly. When should be do the re-balancing??
Thanks in advance.
Comments
Prasi, hi.
(1) sample index increases continuously from 0 to 255, then back to 0. It is just a packet counter. Occasionally / rarely the increases will not be contiguous if there is radio interference or poor reception. If this is the case you may want to position your mainboard closer to the dongle. A usb extension cord can help. Also you can change the radio channel. Another helpful strategy is to get the Cyton away from other sources of wifi, bluetooth, etc. An occasional missing index number is fine, the GUI will interpolate.
(2&3) the time values shown cannot be used for precise sample per second calculation. They are attached when the samples reach the GUI. Thus include CPU scheduler delays, buffering delays, etc. Sample rate is a constant 250 Hz.
Regards, William
Hello William,
Thanks for your quick reply. I was about to delete the data that had time values outside the range(thinking them to be erroneous data). But you say to include them?? I am a little confused.
Please ignore the time stamps entirely. Unless you need the date or approximate start time of the session. These time values do not reflect real-time clock values. They are recorded by the GUI after considerable buffering and scheduling delays.
Thanks a lot William.
I need the data for start time and end time of sub tasks. But you ask to ignore the in between values right??
Work on Open BCI data here
https://www.slavanesterov.com/2018/10/hacking-brain-with-neural-network.html
says that due to equipment specifics some data is lost while transmission causing unequal number of impulses per second. This needs to be balanced by sample rebalancing.
Could you please share your thoughts on this?
The link you mention (Slava Nesterov) was using the Wifi Shield to sample at 1000 Hz. You are using Cyton at 250 Hz. It's possible that Slava's Shield setup was losing significant numbers of packets. This can happen if it is not carefully configured.
In your case with the Cyton, you have the actual packet (index) numbers to monitor. They should increase monotonically, one at a time. If this is happening you are not losing packets / samples. I already mentioned ways you can reduce packet loss. Losing say one packet per minute is no big deal. In such cases you could 'interpolate' and insert a corrective sample if desired, the GUI does this.
Slava decided to 're-sample' his data from 1000 Hz down to 990 Hz (I think that is what he is saying.) I don't believe you need to do any resampling. If you want to read about resampling:
https://www.google.com/search?q=eeg+resample
The Cyton sample rate is CONSTANT at 250 Hz. It does not have qualities of 'jitter', but because the sample clock is not crystal controlled, could be slightly different than 250.00000. For example it might be 250.01 Hz or 249.98 Hz, etc. That rate is constant, and does not 'jitter' around.
Thanks a lot William for such detailed explanation.
[previous thread title: Reading the data question - what is he first raw that called sample]
It goes from 1,3, until 255 and start over. Do these numbers mean anything?
@elizabeth, hi.
I merged your new thread into this existing thread. If possible before posting, use the Google Advanced Search box in upper right corner, to search for previous threads that might apply.
Regards, William