openyou / emokit

Open source driver for accessing raw data from the Emotiv EPOC EEG headset
http://www.openyou.org
Other
522 stars 236 forks source link

Export Data written to CSV as actual sensor values #183

Closed jemSquashness closed 7 years ago

jemSquashness commented 8 years ago

What data is written to the CSV and in what order? Is the bit stream converted to decimal and plugged into the CSV file, if so, do we need to convert to binary and concatenate different bytes? I've compared data from the Emokit library and the actual SDK research edition and there only seems to be minor correlations without editing the data from Emokit. Please can anyone who's managed to use this for actual EEG readings give me a hand. Thanks!

ghost commented 8 years ago

It is the data that constructs each individual packet in the order received, separated by commas.

It can be written before decryption or after, if the former a serial number is required when using the reader to decrypt the data.

jemSquashness commented 8 years ago

Is this data processed at all? Has it had the dc offset removed?

ghost commented 8 years ago

The data is unprocessed. Data is only processed once the EmotivPacket is constructed. The DC offset is still intact.

jemSquashness commented 8 years ago

Is it in decimal? Or some other number system?

ghost commented 8 years ago

I would recommend looking at the source for the EmotivPacket class to see how the actual values are obtained and correlated to specific sensor levels.

You can't use the data without some processing.

jemSquashness commented 8 years ago

I do understand that, the DSP isn't the problem. I'm just confused as to why the Emokit values don't correlate to the actual Sdk research values. It should be a similar process to write them to a csv file as the csv is generated from the .edf which is just a print out of packet data, right? By no correlation i mean that they're not even in similar number ranges.

ghost commented 8 years ago

I've never seen the research data output, I assume it is a file that has sensor values separated by commas for each packet separated by commas.

This is the raw data stream from the dongle and was meant more for debugging and further development of the library with new headsets than to be used as a representation of actual signal values without being processed as an emokit packet.

jemSquashness commented 8 years ago

Ok great, thank you for your time. Will try and work with the decrypted stream directly and see if i can get actual sensor values. Will post any progress.

ghost commented 8 years ago

That all being said I understand what you are trying to accomplish and have added it to my todo list.

ghost commented 8 years ago

I updated my fork with this functionality.

It may or may not work correctly on Windows. Linux or OS X should be fine though.

Still struggling to get my Windows VM to recognize my dongle.

Py2 support may also have been broken in the quest for Py3 compatibility. So if it doesn't work try using Py3.

jemSquashness commented 8 years ago

Ok great, thanks again. Will test it out tomorrow.