This repository provides a collection of example codes and tutorials for EEG data analysis using MNE-Python. The scripts are designed to assist researchers and students in understanding and applying MNE-Python for various EEG data processing tasks.
- Data Importation: Scripts for importing EEG data from MATLAB
.matfiles into MNE-Python format. - Preprocessing: Examples demonstrating EEG data preprocessing steps, including filtering and epoching.
- Event-Related Potential (ERP) Analysis: Tutorials on analyzing ERPs, such as the P300 component.
- Visualization: Guides on visualizing EEG data and analysis results using MNE-Python's plotting functions.
-
Clone the repository:
git clone https://github.com/berdakh/mne-codes.git cd mne-codes -
Create a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install required packages:
pip install mne numpy scipy matplotlib
Note: Ensure that MNE-Python is installed, as it's central to the functionalities provided.
The repository contains several Jupyter Notebooks and Python scripts, each serving specific purposes:
-
Data Importation:
import_matlab2MNE.ipynb: Demonstrates how to import EEG data from MATLAB.matfiles into MNE-Python.
-
Preprocessing and Epoching:
MNE-EEG-epochs.ipynb: Provides an example of preprocessing EEG data and creating epochs for analysis.
-
ERP Analysis:
BCIcompetitionIV2MNE.ipynb: Focuses on analyzing P300 components from BCI Competition IV dataset.(youtube.com)
-
Imagined Movement Analysis:
imagined_movement.py: Script for analyzing EEG data related to imagined movements.([github.com][3])
To execute a notebook:
-
Launch Jupyter Notebook:
jupyter notebook
-
Open the desired
.ipynbfile and follow the cells sequentially.
Contributions are welcome! If you have suggestions, bug reports, or enhancements, please open an issue or submit a pull request.
This project is open-source and available under the MIT License.
This repository was developed by Berdakh Abibullaev, focusing on providing practical examples for EEG data analysis using MNE-Python.
For detailed explanations and methodologies, refer to the Jupyter Notebooks included in the repository.
If you need further assistance or have specific questions about any script or functionality, feel free to ask!