how to import openbci (comma delimited data) to bcilab

mizanur36mizanur36 Dallas, TX
How to import the openbci data (8 channel + marker channel) to bcilab

Comments

  • wjcroftwjcroft Mount Shasta, CA
    BCILAB shares code with EEGLAB. Irene did this tutorial,


  • I seen that tutorial. But challenges I am having is how I load that data to BCILAB? 
  • wjcroftwjcroft Mount Shasta, CA
    You might find more BCILAB experts on their email list. For example,


  • I was going through Irene's document. Not understanding how she generated event file and extracted data from event file. I see below code she mentioned. What is Trials? What below code does? can someone explain. I am bit confused.

    %% FINDING EVENTS

    % Trials Events
    RF_Re = find(Trials == 1); % Move Right Finger
    LF_Re = find(Trials == 2); % Move Left Finger
    RF_Im = find(Trials == 3); % Imagine Moving Right Finger
    LF_Im = find(Trials == 4); % Imagine Moving Left Finger
    Events_row = [RF_Re; LF_Re; RF_Im; LF_Im]; % List of events (based on counts)
    E = sort(Events_row); % List of events (based on counts) sorted

    % Two External Buttons
    RightButton = find(Right == 25120); % RightButton is pressed
    Events_RB = RightButton*4-4; % Translate the row to time
    for RB_Char = {'RightButton'}; % Create 'Right Button' column
    RB = repmat (RB_Char, length(Events_RB),1);
    end
    R = table(Events_RB,RB); % Create a table with Right Button events

    LeftButton = find(Left == 25120); % LeftButton is pressed
    Events_LB = LeftButton*4-4; % Translate the row to time
    for LB_Char = {'LeftButton'}; % Create 'Left Button' column
    LB = repmat (LB_Char, length(Events_LB),1);
    end
    L = table(Events_LB,LB); % Create a table with Left Button events

    % OBSERVATION: Some events are not saved. There is a difference of 2506ms
    % between two different type of events (RF_Re and LF_Re, for example).
    % This means that between two values of the same event there is difference
    % of 10000ms. Currently, you must add this new values manually.

    MoveRF = RF_Re(1,:); % Find 1st Move RF Event
    MoveLF = LF_Re(1,:); % Find 1st Move LF Event
    ImagineRF = RF_Im(1,:); % Find 1st Imagine RF Event
    ImagineLF = LF_Im(1,:); % Find 1st Imagine RF Event

    Move_RF = (MoveRF:10000:(MoveRF+100000-1000))'; % Create Move RF Event Variable
    Move_LF = (MoveLF:10000:(MoveLF+100000-1000))'; % Create Move LF Event Variable
    Imagine_RF = (ImagineRF:10000:(ImagineRF+100000-1000))'; % Create Imagine RF Event Variable
    Imagine_LF = (ImagineLF:10000:(ImagineLF+100000-1000))'; % Create Imagine LF Event Variable

    % Conversion of variables (From counts to time)
    Events_RFRe = Move_RF*4-4; % Translate MoveRF counts into time
    Events_LFRe = Move_LF*4-4; % Translate MoveLF counts into time
    Events_RFIm = Imagine_RF*4-4; % Translate ImagineRF counts into time
    Events_LFIm = Imagine_LF*4-4; % Translate ImagineLF counts into time

    Events = [Events_RFRe; Events_LFRe; Events_RFIm; Events_LFIm]; % List of events (based on time)
    Events_Time = sort(Events); % Sort of the 2nd List of Events
  • wjcroftwjcroft Mount Shasta, CA
    Re: events / trials

    https://sccn.ucsd.edu/wiki/Chapter_03:_Event_Processing

    The full set of tutorials is here,


    You are referencing Irene's tutorial on "Import Events", which differs from the "Import Data" tutorial. I pointed you to the Import Data because I assumed there was some way to get from EEGLAB data format to BCILAB format.

    Your best bet is to ask questions on the forum devoted to EEGLAB / BCILAB. Or possibly email Irene directly, But her tutorials are on EEGLAB only, not BCILAB. Her email on her resume,


Sign In or Register to comment.