Skip to main content

A simplified MNE-Python wrapper for teaching EEG analysis

Project description

mini-mne

A simplified wrapper around MNE-Python for teaching EEG data analysis. mini-mne exposes only the essential classes and methods, reducing the cognitive load for learners who are new to EEG preprocessing and analysis.

Installation

pip install --upgrade mini-mne

Requires Python ≥ 3.11.

Usage

mini-mne follows the standard EEG analysis pipeline: load continuous data → epoch around events → compute ERPs.

from mini_mne import SimpleRaw, SimpleEpoch, SimpleEvoked, plot_evokeds

# Load data (downloads the MNE ERP-CORE example dataset if no path is given)
raw = SimpleRaw()

# Inspect the data
print(raw)
print(raw.sampling_frequency)  # Hz
print(raw.channel_names)
print(raw.duration)            # seconds

# Preprocess
raw = raw.filter(l_freq=0.1, h_freq=40.0)
raw = raw.re_reference()

# Extract events from annotations
events, event_id = raw.get_events()

# Epoch the data
epochs = SimpleEpoch(raw, events, event_id,
                     tmin=-0.2, tmax=0.8,
                     baseline=(-0.2, 0),
                     reject={"eeg": 100e-6})

print(epochs)
print(epochs.event_types)
print(epochs.dropped_epochs)

# Compute ERPs
evokeds = epochs.average(by_event_type=True)

# Plot
plot_evokeds(evokeds)

Classes

Class Wraps Purpose
SimpleRaw mne.io.Raw Continuous EEG data
SimpleEpoch mne.Epochs Segmented data around events
SimpleEvoked mne.Evoked Averaged ERP

Licence

mini-mne is licenced under the BSD-3-Clause licence.

Acknowledgements

mini-mne is built on top of MNE-Python. The default example dataset is from the ERP-CORE dataset (Kappenman et al., 2021).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mini_mne-0.1.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mini_mne-0.1.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file mini_mne-0.1.0.tar.gz.

File metadata

  • Download URL: mini_mne-0.1.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mini_mne-0.1.0.tar.gz
Algorithm Hash digest
SHA256 db310e5aee2f23cfea846f8ebf81c2f9a78f75f9000b847b2cd8e27fdac08ab3
MD5 425e470785da0e476dd4ae18f26dac77
BLAKE2b-256 3a2c6ad6b421e85ba32c2ac72c0341c60dd9e2f986df8a5f7fc0de0ef3679721

See more details on using hashes here.

File details

Details for the file mini_mne-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mini_mne-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mini_mne-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2929adcaa42ebcc8b20a5aaf9321aeddf090d9d97cd65e3f5bac04db823d7ac0
MD5 01fa2952797f2abf30d34ee021357437
BLAKE2b-256 c187529a2a0ad67d61f25eb4fdf05f0dee2acb3bf9340a2d012663cfc9af7412

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page