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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ target/
# doc
_build/
auto_examples/
modules/

4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@ install:
- sudo apt-get update
- pip install -r requirements.txt
- pip install -e .
- pip install sphinx-gallery
- pip install numpydoc
- pip install sphinx_bootstrap_theme
- pip install git+https://github.com/pymanopt/pymanopt
script:
- mkdir docs
- cd doc
- pip install -r requirements.txt
# - sphinx-autogen *.rst
- make html
- touch _build/html/.nojekyll
Expand Down
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# MEEGkit

[![unit-tests](https://github.com/nbara/python-meegkit/workflows/unit-tests/badge.svg?style=flat)](https://github.com/nbara/python-meegkit/actions?workflow=unit-tests)
[![Travis](https://img.shields.io/travis/nbara/python-meegkit.svg?label=documentation&logo=travis)](https://travis-ci.org/nbara/python-meegkit)
[![documentation](https://img.shields.io/travis/nbara/python-meegkit.svg?label=documentation&logo=travis)](https://www.travis-ci.com/github/nbara/python-meegkit)
[![codecov](https://codecov.io/gh/nbara/python-meegkit/branch/master/graph/badge.svg)](https://codecov.io/gh/nbara/python-meegkit)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/nbara/python-meegkit/master)
[![twitter](https://img.shields.io/twitter/follow/lebababa?label=Twitter&style=flat&logo=Twitter)](https://twitter.com/intent/follow?screen_name=lebababa)
Expand Down Expand Up @@ -91,3 +91,22 @@ If you use this, you should cite the following article:
[1] Cohen, M. X., & Gulbinaite, R. (2017). Rhythmic entrainment source separation: Optimizing analyses
of neural responses to rhythmic sensory stimulation. Neuroimage, 147, 43-56.
```

### 4. Task-Related Component Analysis (TRCA)

This code is based on the [Matlab implementation from Masaki Nakanishi](https://github.com/mnakanishi/TRCA-SSVEP), and was adapted to python by [Giuseppe Ferraro](mailto:giuseppe.ferraro@isae-supaero.fr)

If you use this, you should cite the following articles:

```sql
[1] M. Nakanishi, Y. Wang, X. Chen, Y.-T. Wang, X. Gao, and T.-P. Jung,
"Enhancing detection of SSVEPs for a high-speed brain speller using
task-related component analysis", IEEE Trans. Biomed. Eng, 65(1): 104-112,
2018.
[2] X. Chen, Y. Wang, S. Gao, T. -P. Jung and X. Gao, "Filter bank
canonical correlation analysis for implementing a high-speed SSVEP-based
brain-computer interface", J. Neural Eng., 12: 046008, 2015.
[3] X. Chen, Y. Wang, M. Nakanishi, X. Gao, T. -P. Jung, S. Gao,
"High-speed spelling with a noninvasive brain-computer interface",
Proc. Int. Natl. Acad. Sci. U. S. A, 112(44): E6058-6067, 2015.
```
1 change: 0 additions & 1 deletion doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ clean:
-rm -rf _build/*
-rm -rf _source/*
-rm -rf generated
-rm -rf auto_examples/*
-rm -rf *.stc
-rm -rf *.fif
-rm -rf *.nii.gz
Expand Down
97 changes: 33 additions & 64 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
#
import os
import sys
from numpydoc import docscrape # noqa
import sphinx_gallery # noqa
import sphinx_bootstrap_theme # noqa

import matplotlib
matplotlib.use('agg')

Expand All @@ -27,9 +23,10 @@

# -- Project information -----------------------------------------------------

project = 'MEEGkit'
copyright = '2020, Nicolas Barascud'
project = f'MEEGkit v{meegkit.__version__}'
copyright = '2021, Nicolas Barascud'
author = 'Nicolas Barascud'
release = meegkit.__version__
version = meegkit.__version__

# -- General configuration ---------------------------------------------------
Expand All @@ -42,7 +39,9 @@
'sphinx.ext.autosummary',
'sphinx.ext.napoleon',
'numpydoc',
'jupyter_sphinx',
'sphinx_gallery.gen_gallery',
'sphinxemoji.sphinxemoji',
]

# Add any paths that contain templates here, relative to this directory.
Expand Down Expand Up @@ -75,10 +74,8 @@

# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'bootstrap'
# The theme to use for HTML and HTML Help pages
html_theme = 'pydata_sphinx_theme'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand All @@ -87,62 +84,33 @@


html_theme_options = {
# Tab name for entire site. (Default: "Site")
'navbar_site_name': "MEEGkit documentation",

# Render the next and previous page links in navbar. (Default: true)
'navbar_sidebarrel': False,

# Links in the navbar
'navbar_links': [
("Examples", "auto_examples/index"),
("GitHub", "https://github.com/nbara/python-meegkit", True)
"show_toc_level": 1,
"external_links": [
{
"name": "GitHub",
"url": "https://github.com/nbara/python-meegkit",
}
],
"icon_links": [
{
"name": "GitHub",
"url": "https://github.com/nbara/python-meegkit",
"icon": "fab fa-github-square",
},
{
"name": "Twitter",
"url": "https://twitter.com/lebababa",
"icon": "fab fa-twitter-square",
},
],
"use_edit_page_button": True,
}

# Render the current pages TOC in the navbar. (Default: true)
'navbar_pagenav': True,

# Tab name for the current pages TOC. (Default: "Page")
'navbar_pagenav_name': "Page",

# Global TOC depth for "site" navbar tab. (Default: 1)
# Switching to -1 shows all levels.
'globaltoc_depth': 2,

# Include hidden TOCs in Site navbar?
#
# Note: If this is "false", you cannot have mixed ``:hidden:`` and
# non-hidden ``toctree`` directives in the same page, or else the build
# will break.
#
# Values: "true" (default) or "false"
'globaltoc_includehidden': "true",

# HTML navbar class (Default: "navbar") to attach to <div> element.
# For black navbar, do "navbar navbar-inverse"
'navbar_class': "navbar navbar-inverse",

# Fix navigation bar to top of page?
# Values: "true" (default) or "false"
'navbar_fixed_top': "true",

# Location of link to source.
# Options are "nav" (default), "footer" or anything else to exclude.
'source_link_position': "nav",

# Bootswatch (http://bootswatch.com/) theme.
#
# Options are nothing (default) or the name of a valid theme
# such as "cosmo" or "sandstone".
#
# Currently, the supported themes are:
# - Bootstrap 2: https://bootswatch.com/2
# - Bootstrap 3: https://bootswatch.com/3
'bootswatch_theme': "united",

# Choose Bootstrap version.
# Values: "3" (default) or "2" (in quotes)
'bootstrap_version': "3",
html_context = {
"github_user": "nbara",
"github_repo": "python-meegkit",
"github_version": "master",
"doc_path": "doc",
}

# -- Options for Sphinx-gallery HTML ------------------------------------------
Expand All @@ -153,4 +121,5 @@
'gallery_dirs': 'auto_examples', # path to where to save gallery generated output
'filename_pattern': '/example_',
'ignore_pattern': 'config.py',
'run_stale_examples': False,
}
36 changes: 27 additions & 9 deletions doc/index.rst
Original file line number Diff line number Diff line change
@@ -1,23 +1,37 @@
.. MEEGkit documentation master file, created by
.. ``meegkit`` documentation master file, created by
sphinx-quickstart on Fri Jan 10 12:31:49 2020.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

Welcome to MEEGkit
==================
|:brain:| ``meegkit``: EEG and MEG denoising in Python
======================================================

The code of the project is on Github: `MEEGkit <https://github.com/nbara/python-meegkit>`_
Introduction
------------

``meegkit`` is a collection of EEG and MEG denoising techniques for
**Python 3.6+**. Please feel free to contribute, or suggest new analyses. Keep
in mind that this is mostly development code, and as such is likely to change
without any notice. Also, while most of the methods have been fairly robustly
tested, bugs can (and should!) be expected.

Contents
--------
The source code of the project is hosted on Github at the following address:
https://github.com/nbara/python-meegkit

:py:mod:`meegkit`:
To get started, follow the installation instructions `in the README <https://github.com/nbara/python-meegkit#installation>`_.

Available modules
-----------------

Here is a list of the methods and techniques available in ``meegkit``:

.. currentmodule:: meegkit

.. toctree::
:maxdepth: 1

.. autosummary::
:toctree: modules/
:caption: meegkit

~meegkit.asr
~meegkit.cca
Expand All @@ -26,19 +40,23 @@ Contents
~meegkit.ress
~meegkit.sns
~meegkit.star
~meegkit.trca
~meegkit.tspca
~meegkit.utils


Examples gallery
----------------

A gallery of examples is available at the following address:
A number of example scripts and notebooks are available:


.. toctree::
:maxdepth: 2

auto_examples/index


Indices and tables
------------------

Expand Down
30 changes: 30 additions & 0 deletions doc/modules/meegkit.trca.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
meegkit.trca
============

.. automodule:: meegkit.trca







.. rubric:: Functions

.. autosummary::

trca
TRCA













12 changes: 11 additions & 1 deletion doc/modules/meegkit.utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,19 @@ Signal

----


Statistics
----------
.. automodule:: meegkit.utils.stats

.. autosummary::


|

----

TRCA utilities
--------------
.. automodule:: meegkit.utils.trca

.. autosummary::
9 changes: 9 additions & 0 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
sphinx
sphinx-copybutton
sphinxemoji
pydata-sphinx-theme
numpydoc
matplotlib
pillow
sphinx-gallery
jupyter-sphinx
8 changes: 6 additions & 2 deletions examples/README.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
MEEGkit examples
Examples gallery
================

Below is a gallery of examples
Below is a list of example scripts showing basic usage for most methods in
MEEGkit.

The examples can be browsed directly on `Github <https://github.com/nbara/python-meegkit/tree/master/examples>`_.

1 change: 0 additions & 1 deletion examples/example_asr.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import matplotlib.pyplot as plt

from meegkit.asr import ASR
from meegkit.utils.asr import yulewalk_filter
from meegkit.utils.matrix import sliding_window

# THIS_FOLDER = os.path.dirname(os.path.abspath(__file__))
Expand Down
Loading