errors importing GUI BDF file into FieldTrip and CSV file into EEGLAB

nushaabnushaab Toronto, ON
edited March 2022 in OpenBCI_GUI

Hello,

I am looking to import 8-channel EEG OpenBCI data saved in BDF format into FieldTrip, and in the default CSV txt format into EEGLAB, via MATLAB.

I followed the instructions outlined in the following link when importing into EEGLAB:
https://docs.openbci.com/Software/CompatibleThirdPartySoftware/Matlab/#eeglab

After preparing the dataset array by following 'Preparing OpenBCI Datasets for EEGLAB Use', I imported the data as outlined in 'Using EEGLAB', the dataset was not automatically loaded onto the EEGLAB window. I also could not locate the dataset to load to EEGLAB. No errors were visible during the attempted import process, so I am not sure what could be going wrong here. Are there any known issues regarding importing files from the CSV txt file format to a MATLAB array, and then into EEGLAB?

I also attempted to import some data recorded with OpenBCI into FieldTrip in BDF format. Running the attached code had fetched the following error:

cfg = [];
cfg.dataset = 'OpenBCI-BDF-2022-03-10_15-41-15.bdf';
data_eeg    = ft_preprocessing(cfg)
Error using read_biosemi_bdf (line 213)
channels with different sampling rate not supported

Do channels on the Cyton board have different sampling rates? Is there something I can do to edit the sampling rates to make them alike? I would like to note that all 8 EEG channels and all 3 accelerometer channels are included in this dataset.

Please let me know if I can clarify anything, or provide the files I have used, as I would be more than happy to do so. Thank you in advance for the help.

Comments

  • wjcroftwjcroft Mount Shasta, CA
    edited March 2022

    Mentioning Richard @retiutut.

    Hi Nushaab,

    I'm just guessing on the BDF question, but it's possible FieldTrip is balking at the sample rate of the default Aux channel data, which is the Accelerometer (3 channels, x, y, z). It's sample rate is 25 Hz I think. The Cyton 8 channels of ExG data are all running at the same 250 Hz. Can you tell Fieldtrip to ignore the Accel channels?

    Alternately you could read the BDF (or even CSV) files into EDFBrowser and export only the 8 EEG channels,

    https://www.teuniz.net/edfbrowser/

    There are a number of EEGLAB tutorials online, have you tried a Google search?

    Regards, William

  • wjcroftwjcroft Mount Shasta, CA

    OK, accelerometer sample rate is actually 25 Hz, so it shows up every 10 samples in the serial port (radio packet) data stream, and that likely is reflected in the BDF output.

    https://docs.openbci.com/Cyton/CytonDataFormat/

    If you turn on the other mode(s) of Aux data (analog read mode, or digital read mode), those sample at the same 250 Hz rate, so in that case all the samples are then at the same 250 Hz.

    https://docs.openbci.com/Cyton/CytonExternal/#using-the-openbci-gui
    [paragraph starting: "Once you have connected, you may selected the "Digital Read" for one of your widgets..."]

Sign In or Register to comment.