Skip to main content

Additional functionality for MNE-Python

Project description

MNExtend

This package provides additional functionality for working with MNE-Python, the most popular Python package for processing electrophysiological data (EEG, MEG, ...).

Features

Reading additional file formats

MNExtend provides readers for the following file formats that are not natively supported by MNE-Python:

  • XDF (Extensible Data Format)
  • MAT (MATLAB)
  • NPY (NumPy)

In addition, MNExtend adds the following readers from third-party packages:

Together with the native MNE-Python readers, read_raw() and read_epochs() provide a unified interface for reading electrophysiological data from a wide range of file formats, so all you have to do is:

from mnextend import read_raw, read_epochs

raw = read_raw("my_data-raw.xdf", stream_ids=[1, 2, 3])
epochs = read_epochs("my_data-epochs.fif.gz")

Writing raw data

Writing raw data is supported via write_raw(), which does not implement any new file formats, but provides a unified interface for writing raw data to the file formats that are natively supported by MNE-Python:

from mnextend import write_raw

write_raw("my_data-raw.fif.gz", raw)

ICLabel classification

MNExtend includes ICLabel, a pre-trained classifier that labels ICA components as one of seven types: brain, muscle, eye, heart, line noise, channel noise, or other. In contrast to MNE-ICALabel, the classifier is implemented in pure NumPy and does not depend on ONNX Runtime.

run_iclabel() takes a fitted ICA object and the corresponding Raw or Epochs instance (which must have a montage set), and returns an array of class probabilities:

from mnextend import plot_ica_components, run_iclabel

probs = run_iclabel(raw, ica)
figs = plot_ica_components(raw, ica, probs)

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

mnextend-0.2.0.tar.gz (10.8 MB view details)

Uploaded Source

Built Distribution

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

mnextend-0.2.0-py3-none-any.whl (10.8 MB view details)

Uploaded Python 3

File details

Details for the file mnextend-0.2.0.tar.gz.

File metadata

  • Download URL: mnextend-0.2.0.tar.gz
  • Upload date:
  • Size: 10.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mnextend-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e6f73b22a7fa253217b39072c5207368a0487ae1cc2b4f0bd75a4c6bfb044916
MD5 b3ab3518d8e3226e9370129b6db675e7
BLAKE2b-256 df4e618f9df51a8834c93bb432034d527fcb31d1b84a5f882c145f28910e87ed

See more details on using hashes here.

File details

Details for the file mnextend-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: mnextend-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 10.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mnextend-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9b88215de2e0b531bb31f865f9458b4ccb9171fbcd150b363f97ea99804eaaef
MD5 ac49b8f46b1e0b80100f2445e1d43351
BLAKE2b-256 dc7acb2d9240ac026b3c14322e257cdf451cb1e906a710948358b7b94db0334f

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