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.1.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.1-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mini_mne-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 758f1432614fd94daf808fe906010d48967e054ac4701d7f2b8cb6ed6242265d
MD5 1cb414316033ccbcb3a9c9f64fb24e86
BLAKE2b-256 4b9cabecae1d38f7de47f1e6466ef4373a888f579959dd49e91423b8030d99ea

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mini_mne-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8c9ec4e248662010f2b6f1297cc81c524c66ba039cfa45ea5d8df662294707a6
MD5 a494a2ad7132fbf07c16412348cd00e2
BLAKE2b-256 50a71a6fd668136b5d49ae27f495fe4578b9d382e158162c7fd9397f8f523eed

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