Skip to content

Load data from EEG

Pedro Chazarra Grande edited this page Jun 17, 2021 · 9 revisions

The different supported EEG file formats by EEGraph. The importing methods used are from MNE library.

File format | Extension
  • Brainvision | .vhdr
  • Neuroscan CNT | .cnt
  • European data format | .edf
  • Biosemi data format | .bdf
  • General data format | .gdf
  • EGI simple binary | .egi
  • EGI MFF format | .mff
  • eXimia | .nxe

Electrode Montage Set

Channel labels can now be imported from an electrode montage file. Sometimes EEG files don´t have the electrode name set as the channel label.

e.g. channel names ['Channel 1', 'Channel 2', 'Channel 3', 'Channel 4'...etc]

A path can be specified to a electrode montage set, where at least two columns are needed.

  • Column with the channel names or numbers in the original EEG.
  • Column with the electrode names for the corresponding channel.

Once its loaded the channel labels will be updated.

e.g. channel names ['Fp1', 'Fp2', 'AF7', 'AF3'...etc]


   G.load_data(path, exclude = [None], electrode_montage_path = None)

Parameters:

  • path: Required | str

    Path to the EEG file.

  • exclude: Optional - Default = [None] | list of str

    Channel names from the EGG to be excluded from the analysis.

  • electrode_montage_path: Optional - Default = None | str

    Path to the electrode montage file.


Example:

   G = eegraph.Graph()
   G.load_data(path= "eeg_sample_1.edf", exclude = ['EEG TAntI1-TAntI', 'EEG TAntD1-TAntD', 'EEG EKG1-EKG2'], electrode_montage_path = 'electrodemontage.set.ced')
Clone this wiki locally