sccn / lsl_archived

Multi-modal time-synched data transmission over local network
242 stars 134 forks source link

problem with mapping channels - matlab, biosemi #282

Open johansonik opened 6 years ago

johansonik commented 6 years ago

I don't know how to handle with channels from eeg with biosemi and using matlab. I want to receive data only from electrodes A7, A8 and A9 which I want to map with C3, C4 and Cz for motor imaginary, but I don't know how to do that and I met some problems: 1) In matlab example to receive data, there is code : [vec,ts] = inlet.pull_sample(); Data from eeg are in vec, but does each column from vec relates to each channel from eeg data? 2) I run code HandleMetaData.m to see how my data looks like but once I get channels named Cz, C3, O2.. and once I get 57 channels names : Trig1, A1, A2, .... as output 3) Using 32 channels biosemi which channels should I set as reference?

Any help will be very appreciate.

dmedine commented 6 years ago

Hope this helps somewhat:

On 3/30/2018 11:41 AM, johansonik wrote:

I don't know how to handle with channels from eeg with biosemi and using matlab. I want to receive data only from electrodes A7, A8 and A9 which I want to map with C3, C4 and Cz for motor imaginary, but I don't know how to do that and I met some problems:

  1. In matlab example to receive data, there is code : [vec,ts] = inlet.pull_sample(); Data from eeg are in vec, but does each column from vec relates to each channel from eeg data?

When you pull a sample you get a datum from the channels (stored in vec, in this case). I can never remember whether this results in a 1xchannel_count or a channel_countx1 vector (i.e. a row or a column), but if memory serves it is  column. You can check with size. It is up to your code on the Matlab side to pick out the ones you are interested in for your MI task.

  1. I run code HandleMetaData.m to see how my data looks like but once I get channels named Cz, C3, O2.. and once I get 57 channels names : Trig1, A1, A2, .... as output

HandleMetaData.m is an example explaining how to (well) handle meta data in the LSL Matlab interface. The top part of the script creates an outlet stream with various meta-data (e.g. channel labels Cz, C3, etc.) and the bottom part. It doesn't actually do anything, but it does sit on the network, so, the bottom half of the code finds this stream and prints out its meta-data. If there is also a (for example) biosemi stream on the network, it may find that stream first and output that metadata. Comment out the top part of the code to avoid this confusion.

  1. Using 32 channels biosemi which channels should I set as reference?

Whichever one you like. Consult BioSemi's help pages for device specific recommendations.

Any help will be very appreciate.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sccn/labstreaminglayer/issues/282, or mute the thread https://github.com/notifications/unsubscribe-auth/ADch7qlnbWn2mszuH7l6jvSaIHn6RpgKks5tjf3TgaJpZM4TBgmq.