Skip to content

Julia interface to MNE-Python via PythonCall

License

Notifications You must be signed in to change notification settings

jschepers/PyMNE.jl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyMNE

Julia interface to MNE-Python via PythonCall

Build Status CodeCov

Installation

This package uses PythonCall to make MNE-Python available from within Julia. Unsurprisingly, MNE-Python and its dependencies need to be installed in order for this to work and PyMNE will attempt to install when the package is built: this should happen more or less automatically via CondaPkg. You can configure various options via CondaPkg. MNE-Python is installed via Conda, not via pip.

Usage

In the same philosophy as PythonCall, this allows for the transparent use of MNE-Python from within Julia. The major things the package does are wrap the installation of MNE in the package installation and load all the MNE functionality into the module namespace. After that, it's just a Python package accessible via using PyMNE in Julia. The usual conversion rules and behaviors from PythonCall apply. The tests test a few conversion gotchas, especially compared to prior versions of this package, which were based on PyCall.

Exposing MNE-Python in Julia

For example, in Python you can access the MNE docs like this:

import mne

mne.open_docs()

With PyMNE, you can do this from within Julia.

using PyMNE

PyMNE.open_docs()

The PythonCall infrastructure also means that Python docstrings are available in Julia:

help?> PyMNE.open_docs
  Python function open_docs.

  Launch a new web browser tab with the MNE documentation.

  Parameters
  ----------
  kind : str | None
      Can be "api" (default), "tutorials", or "examples".
      The default can be changed by setting the configuration value
      MNE_DOCS_KIND.
  version : str | None
      Can be "stable" (default) or "dev".
      The default can be changed by setting the configuration value
      MNE_DOCS_VERSION.

About

Julia interface to MNE-Python via PythonCall

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Julia 100.0%