Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't load .eeg files ! convert .eeg to .edf format? #6

Open
Surya-Teja-Menta opened this issue Jul 7, 2022 · 2 comments
Open

can't load .eeg files ! convert .eeg to .edf format? #6

Surya-Teja-Menta opened this issue Jul 7, 2022 · 2 comments

Comments

@Surya-Teja-Menta
Copy link

How to load .eeg files in python instead of .edf files. or else any function to convert .eeg to .edf format

@melissafasol
Copy link

Hi @Surya-Teja-Menta, have you managed to figure this out? I have converted my data into numpy arrays to run it through my preprocessing pipeline and would like to create a modelate instance without creating a load_data instance, otherwise I will have to convert the numpy files back into edf files. Thanks!

@christiangoelz
Copy link
Contributor

Hi, @Surya-Teja-Menta if the .eeg file corresponds to a brain vision file then simply provide the .vhdr file. Otherwise, you can convert to .edf and import the data.

@melissafasol importing from numpy could easily be done as data is handled with mne under the hood. Have a look at this tutorial if you are not sure how to do that.

###########
Exemplary step by step example (you would need to adjust to your needs!):

  1. Create a mne raw data structure from your numpy
    raw = mne.io.RawArray(numpy_data, info)

  2. Initialize a eegraph object:
    G = eegraph.Graph()

  3. Hand over the mne object to eegraph:
    G.data = raw

  4. Set a montage:
    e.g.: G.data.set_montage("standard_1020")

  5. Hand over the channel names to eegraph:
    G.ch_names = raw.info['ch_names']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants