Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
- Improve dark mode theme for the Artifact Detection preview dialog ([#585](https://github.com/cbrnr/mnelab/pull/585) by [Fabian Schellander](https://github.com/SchellanderF))
- Improve settings dialog layout and include the splitter position when resetting to defaults ([#590](https://github.com/cbrnr/mnelab/pull/590) by [Clemens Brunner](https://github.com/cbrnr))
- Data traces are not clipped in the raw plot anymore ([#594](https://github.com/cbrnr/mnelab/pull/594) by [Clemens Brunner](https://github.com/cbrnr))
- Work around an issue where "Plot IC properties..." (inside the "Label ICs..." dialog) would not work ([#596](https://github.com/cbrnr/mnelab/pull/596) by [Clemens Brunner](https://github.com/cbrnr))
- Work around an issue where "Plot IC properties" (inside the "Label ICs" dialog) would not work ([#596](https://github.com/cbrnr/mnelab/pull/596) by [Clemens Brunner](https://github.com/cbrnr))

### 🌀 Changed
- Consistently focus the OK button in all dialogs ([#586](https://github.com/cbrnr/mnelab/pull/586) by [Clemens Brunner](https://github.com/cbrnr))
Expand Down Expand Up @@ -296,29 +296,29 @@
### ✨ Added
- Add support to select and load multiple files at once ([#257](https://github.com/cbrnr/mnelab/pull/257) by [Florian Hofer](https://github.com/hofaflo))
- Add drag and drop reordering to sidebar ([#261](https://github.com/cbrnr/mnelab/pull/261) by [Florian Hofer](https://github.com/hofaflo))
- Add support for plotting evoked potentials averaged over channels (Plot – Evoked comparison...) ([#256](https://github.com/cbrnr/mnelab/pull/256) by [Florian Hofer](https://github.com/hofaflo))
- Add support for plotting evoked potentials averaged over channels (Plot – Evoked comparison) ([#256](https://github.com/cbrnr/mnelab/pull/256) by [Florian Hofer](https://github.com/hofaflo))
- Exceptions are now shown in an error message box instead of being silently caught ([#268](https://github.com/cbrnr/mnelab/pull/268) by [Florian Hofer](https://github.com/hofaflo))
- Add "Details" button to "Select XDF Stream" dialog ([#266](https://github.com/cbrnr/mnelab/pull/266) by [Florian Hofer](https://github.com/hofaflo))
- Add support for plotting evoked potentials for individual channels including topomaps (Plot – Evoked...) ([#63](https://github.com/cbrnr/mnelab/pull/263) by [Florian Hofer](https://github.com/hofaflo))
- Add support for plotting topomaps of evoked potentials (Plot – Evoked topomaps...) ([#277](https://github.com/cbrnr/mnelab/pull/277) by [Florian Hofer](https://github.com/hofaflo))
- Add support for plotting evoked potentials for individual channels including topomaps (Plot – Evoked) ([#63](https://github.com/cbrnr/mnelab/pull/263) by [Florian Hofer](https://github.com/hofaflo))
- Add support for plotting topomaps of evoked potentials (Plot – Evoked topomaps) ([#277](https://github.com/cbrnr/mnelab/pull/277) by [Florian Hofer](https://github.com/hofaflo))
- Add montage name and location count to infowidget ([#271](https://github.com/cbrnr/mnelab/pull/271) by [Florian Hofer](https://github.com/hofaflo))
- Add possibility to specify `match_case`, `match_alias`, and `on_missing` to "Set montage..." ([#271](https://github.com/cbrnr/mnelab/pull/271) by [Florian Hofer](https://github.com/hofaflo))
- Add possibility to specify `match_case`, `match_alias`, and `on_missing` to "Set montage" ([#271](https://github.com/cbrnr/mnelab/pull/271) by [Florian Hofer](https://github.com/hofaflo))
- Add "Clear montage" to "Edit" menu ([#271](https://github.com/cbrnr/mnelab/pull/271) by [Florian Hofer](https://github.com/hofaflo))
- Add ability to pick channels by channel type ([#285](https://github.com/cbrnr/mnelab/pull/285) by [Florian Hofer](https://github.com/hofaflo))
- Add a settings menu (File – Settings...) ([#289](https://github.com/cbrnr/mnelab/pull/289) by [Florian Hofer](https://github.com/hofaflo))
- Add a settings menu (File – Settings) ([#289](https://github.com/cbrnr/mnelab/pull/289) by [Florian Hofer](https://github.com/hofaflo))
- Add ability to import events from FIF files ([#284](https://github.com/cbrnr/mnelab/pull/284) by [Florian Hofer](https://github.com/hofaflo))
- Add support for plotting ERDS topomaps (Plot – ERDS topomaps...) ([#278](https://github.com/cbrnr/mnelab/pull/278) by [Florian Hofer](https://github.com/hofaflo))
- Add support for plotting ERDS topomaps (Plot – ERDS topomaps) ([#278](https://github.com/cbrnr/mnelab/pull/278) by [Florian Hofer](https://github.com/hofaflo))
- Add possibility to apply significance masks to ERDS plots ([#279](https://github.com/cbrnr/mnelab/pull/279) by [Florian Hofer](https://github.com/hofaflo))
- Add basic batch renaming of channels "Edit – Rename channels...") ([#303](https://github.com/cbrnr/mnelab/pull/303) by [Florian Hofer](https://github.com/hofaflo))
- Add basic batch renaming of channels "Edit – Rename channels") ([#303](https://github.com/cbrnr/mnelab/pull/303) by [Florian Hofer](https://github.com/hofaflo))
- Add support for loading data from .MAT files ([#314](https://github.com/cbrnr/mnelab/pull/314) by [Clemens Brunner](https://github.com/cbrnr))
- Add support for reading multiple XDF streams (via resampling) ([#312](https://github.com/cbrnr/mnelab/pull/312) by [Florian Hofer](https://github.com/hofaflo))
- Add app icon ([#319](https://github.com/cbrnr/mnelab/pull/319) by [Clemens Brunner](https://github.com/cbrnr))
- Add dialog to modify mapping between event IDs and labels (Edit – Events...) ([#302](https://github.com/cbrnr/mnelab/pull/302) by [Florian Hofer](https://github.com/hofaflo) and [Clemens Brunner](https://github.com/cbrnr))
- Add dialog to modify mapping between event IDs and labels (Edit – Events) ([#302](https://github.com/cbrnr/mnelab/pull/302) by [Florian Hofer](https://github.com/hofaflo) and [Clemens Brunner](https://github.com/cbrnr))
- Add complete history for Find Events dialog ([#333](https://github.com/cbrnr/mnelab/pull/333) by [Clemens Brunner](https://github.com/cbrnr))

### 🌀 Changed
- Simplify rereferencing workflow ([#258](https://github.com/cbrnr/mnelab/pull/258) by [Florian Hofer](https://github.com/hofaflo))
- Move "Show information..." from toolbar to "File" menu and rename to "Show XDF metadata" ([#266](https://github.com/cbrnr/mnelab/pull/266) by [Florian Hofer](https://github.com/hofaflo) and [#318](https://github.com/cbrnr/mnelab/pull/318) by [Clemens Brunner](https://github.com/cbrnr))
- Move "Show information" from toolbar to "File" menu and rename to "Show XDF metadata" ([#266](https://github.com/cbrnr/mnelab/pull/266) by [Florian Hofer](https://github.com/hofaflo) and [#318](https://github.com/cbrnr/mnelab/pull/318) by [Clemens Brunner](https://github.com/cbrnr))
- Replace `utils.has_location` with `utils.count_locations`, which returns the number of locations instead of a boolean ([#271](https://github.com/cbrnr/mnelab/pull/271) by [Florian Hofer](https://github.com/hofaflo))
- Stop requiring existing annotations or events to enable editing them ([#283](https://github.com/cbrnr/mnelab/pull/283) by [Florian Hofer](https://github.com/hofaflo))
- Replace "(channels dropped)" suffix with "(channels picked)" and use `pick_channels` instead of `drop_channels` ([#285](https://github.com/cbrnr/mnelab/pull/285) by [Florian Hofer](https://github.com/hofaflo))
Expand All @@ -337,7 +337,7 @@
### ✨ Added
- Switch to [PySide6](https://www.qt.io/qt-for-python) ([#237](https://github.com/cbrnr/mnelab/pull/237) by [Clemens Brunner](https://github.com/cbrnr))
- Add button in Append dialog that simplifies moving data between source and destination lists ([#242](https://github.com/cbrnr/mnelab/pull/242) by [Clemens Brunner](https://github.com/cbrnr))
- Add dialog (File – Show XDF chunks...) which displays chunk information for (possibly corrupted) XDF files ([#245](https://github.com/cbrnr/mnelab/pull/245) by [Clemens Brunner](https://github.com/cbrnr))
- Add dialog (File – Show XDF chunks) which displays chunk information for (possibly corrupted) XDF files ([#245](https://github.com/cbrnr/mnelab/pull/245) by [Clemens Brunner](https://github.com/cbrnr))

### 🔧 Fixed
- Fix loading of XDF files that contained additional dots in their file names ([#244](https://github.com/cbrnr/mnelab/pull/244) and [#246](https://github.com/cbrnr/mnelab/pull/246) by [Clemens Brunner](https://github.com/cbrnr))
Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,54 +9,54 @@

![](https://raw.githubusercontent.com/cbrnr/mnelab/main/mnelab/images/mnelab_logo.png)

MNELAB provides a graphical user interface for [MNE-Python](https://mne.tools/stable/index.html) (the most popular Python package for EEG/MEG analysis) and ensures full transparency by recording the underlying commands for each action in its command history.
MNELAB is a graphical user interface for [MNE-Python](https://mne.tools/stable/index.html) (the most popular Python package for EEG/MEG analysis).

![](https://raw.githubusercontent.com/cbrnr/mnelab/main/mnelab.png)

Key features include:

- Cross-platform support (Linux, macOS, Windows).
- A command history that records the underlying MNE-Python commands for each action, allowing users to learn how to use MNE-Python and to reproduce their analyses in code.
- Import data from various formats supported by MNE-Python, and some additional formats like [XDF](https://github.com/sccn/xdf/wiki/Specifications) (`.xdf`, `.xdfz`, `.xdf.gz`), MATLAB (`.mat`), NumPy (`.npy`), and [BVRF](https://www.brainproducts.com/download/bvrf-reference-specification/) (`.bvrh`, `.bvrd`, `.bvrm`, `.bvri`).
- Import data from various formats supported by MNE-Python, and some additional formats like [XDF](https://github.com/sccn/xdf/wiki/Specifications), MATLAB, NumPy, and [BVRF](https://www.brainproducts.com/download/bvrf-reference-specification/).
- Export to EDF, BDF, BrainVision, EEGLAB, and FIFF formats.
- XDF-specific features such as chunk inspection (useful for debugging corrupted XDF files), stream selection, metadata inspection, resampling, gap detection and filling, and more.
- Support for various ICA algorithms, including [FastICA](https://en.wikipedia.org/wiki/FastICA), [Infomax ICA](https://arnauddelorme.com/ica_for_dummies/), and [PICARD](https://mind-inria.github.io/picard/).
- Automatic classification of independent components using [ICLabel](https://github.com/sccn/ICLabel).
- Comprehensive tools for managing events and annotations.
- Support for channel locations (montages), rereferencing, cropping, filtering, epoching, and more.
- Plotting capabilities for raw data, epochs, evoked responses, independent components, ERD/ERS maps, and more.
- Support for channel locations (montages), re-referencing, cropping, filtering, epoching, and more.
- Plotting functions for raw data, epochs, evoked responses, independent components, ERD/ERS maps, and more.


## Documentation

The [documentation](https://mnelab.readthedocs.io/) contains hands-on examples and tutorials for different use cases. Check out the [changelog](https://github.com/cbrnr/mnelab/blob/main/CHANGELOG.md) to learn what we added, changed, or fixed.


## Quick start
## Quick Start

We recommend our standalone installers currently available for macOS and Windows:
We recommend using the standalone installers for macOS and Windows:

- [MNELAB 1.5.1 (macOS)](https://github.com/cbrnr/mnelab/releases/download/v1.5.1/MNELAB-1.5.1.dmg)
- [MNELAB 1.5.1 (Windows)](https://github.com/cbrnr/mnelab/releases/download/v1.5.1/MNELAB-1.5.1.exe)

If you use Arch Linux, you can install MNELAB from the [AUR](https://aur.archlinux.org/packages/python-mnelab) (e.g., `yay -S python-mnelab`).
If you use [Arch Linux](https://archlinux.org/), you can install MNELAB from the [AUR](https://aur.archlinux.org/packages/python-mnelab) (e.g., `yay -S python-mnelab`).

Alternatively, you can use [uv](https://docs.astral.sh/uv/) to run MNELAB on all platforms:
Alternatively, you can use [uv](https://docs.astral.sh/uv/) to run MNELAB directly without installing it (this works on all platforms, but for the best experience we recommend using the standalone installers when available):

```
uvx mnelab
```


## Advanced usage
## Advanced Usage

If you want to run the latest development version, you can use the following command:
To run the latest development version:

```
uvx --from https://github.com/cbrnr/mnelab/archive/refs/heads/main.zip mnelab
```

On Linux, running MNELAB via `uvx mnelab` uses the [Fusion](https://doc.qt.io/qt-6/gallery.html) style shipped with PySide6, which may not fit well with the rest of the system. However, if you use KDE, you can set the `QT_PLUGIN_PATH` environment variable to force the use of the native KDE theme instead, for example:
On Linux, running MNELAB via `uvx mnelab` uses the [Fusion](https://doc.qt.io/qt-6/gallery.html) style shipped with [PySide6](https://doc.qt.io/qtforpython-6/index.html), which may not fit well with the rest of the system. However, if you use [KDE](https://kde.org/), you can set the `QT_PLUGIN_PATH` environment variable to force the use of the native KDE theme instead, for example:

```
QT_PLUGIN_PATH=/usr/lib/qt6/plugins uvx mnelab
Expand All @@ -65,4 +65,4 @@ QT_PLUGIN_PATH=/usr/lib/qt6/plugins uvx mnelab

## Contributing

The [contributing guide](https://github.com/cbrnr/mnelab/blob/main/CONTRIBUTING.md) contains detailed instructions on how to contribute to MNELAB.
The [contributing guide](https://github.com/cbrnr/mnelab/blob/main/CONTRIBUTING.md) provides detailed instructions for contributing to MNELAB.
10 changes: 5 additions & 5 deletions docs/examples/erds_maps.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ Download data files for runs 6, 10, and 14 of subject 1 from the [EEG Motor Move
- [S001R14.edf](https://physionet.org/files/eegmmidb/1.0.0/S001/S001R14.edf?download)

## Load data sets
In MNELAB, select _File – Open..._, pick the three downloaded files and click _Open_.
In MNELAB, select _File – Open_, pick the three downloaded files and click _Open_.
The three data sets appear in the sidebar. The data set loaded last ("S001R14") is highlighted, indicating that it is currently active.
The info panel on the right shows information about the active data set.

![](./images/erds_maps/data_sets_loaded.png)

## Concatenate data
We want to concatenate the three data sets, starting with _S001R06_.
In the sidebar, select _S001R06_, then go to _Edit – Append data..._ to open the corresponding dialog.
In the sidebar, select _S001R06_, then go to _Edit – Append data_ to open the corresponding dialog.
Select _S001R10_ and _S001R14_ in the _Source_ panel; to select multiple items, hold <kbd>Ctrl</kbd> (<kbd>⌘</kbd> on macOS) while clicking.
Drag the selected data sets to the _Destination_ panel (or click on the arrow button in the middle) and confirm with _OK_.
A new entry appears in the sidebar: "S001R06 (appended)".
Expand All @@ -37,7 +37,7 @@ The _Events_ entry in the info panel now updates to "90 (1, 2, 3)", indicating t
- 3 (annotation T2): onset of feet motor imagery

## Split into epochs
Go to _Tools – Create Epochs..._ (or click on the corresponding icon in the toolbar).
Go to _Tools – Create Epochs_ (or click on the corresponding icon in the toolbar).
In the dialog, select events "2" and "3" (the two task onsets).
You can click and drag to select multiple items in this dialog.
For _Interval around events_ enter "-1.5" and "4.5" as start and end times relative to the selected events, respectively.
Expand All @@ -51,13 +51,13 @@ ERDS maps can only be calculated from Epochs.

## Pick channels
Considering the motor imagery tasks, electrodes C3, Cz, and C4 should show the strongest activity.
Go to _Edit – Pick channels..._ and select the desired channels.
Go to _Edit – Pick channels_ and select the desired channels.
Don't worry about the channel names containing trailing dots, that's how they are stored in the original data files.

![](./images/erds_maps/pick_channels.png)

## Plot ERDS maps
Select _Plot – Plot ERDS maps..._ and enter the following values:
Select _Plot – Plot ERDS maps_ and enter the following values:
- Frequency range: "2" to "36"
- Step size: "0.5"
- Time range: "-1" to "4"
Expand Down
Loading
Loading