autoreject


Nameautoreject JSON
Version 0.4.3 PyPI version JSON
download
home_pagehttp://autoreject.github.io/
SummaryAutomated rejection and repair of epochs in M/EEG.
upload_time2023-11-14 16:48:15
maintainerMainak Jas
docs_urlNone
author
requires_python~=3.8
licenseBSD-3-Clause
keywords electroencephalography eeg magnetoencephalography meg preprocessing analysis
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            autoreject
==========

|CircleCI|_ |GitHub Actions|_ |Codecov|_ |PyPI|_ |Conda-Forge|_

.. |CircleCI| image:: https://circleci.com/gh/autoreject/autoreject/tree/master.svg?style=shield&circle-token=:circle-token
.. _CircleCI: https://circleci.com/gh/autoreject/autoreject

.. |GitHub Actions| image:: https://github.com/autoreject/autoreject/actions/workflows/test.yml/badge.svg
.. _GitHub Actions: https://github.com/autoreject/autoreject/actions/workflows/test.yml

.. |Codecov| image:: http://codecov.io/github/autoreject/autoreject/coverage.svg?branch=master
.. _Codecov: http://codecov.io/github/autoreject/autoreject?branch=master

.. |PyPI| image:: https://badge.fury.io/py/autoreject.svg
.. _PyPI: https://badge.fury.io/py/autoreject

.. |Conda-Forge| image:: https://img.shields.io/conda/vn/conda-forge/autoreject.svg
.. _Conda-Forge: https://anaconda.org/conda-forge/autoreject/

This is a library to automatically reject bad trials and repair bad sensors in magneto-/electroencephalography (M/EEG) data.

.. image:: https://autoreject.github.io/stable/_images/sphx_glr_plot_auto_repair_001.png
   :width: 400


The documentation can be found under the following links:

- for the `stable release <https://autoreject.github.io/stable/index.html>`_
- for the `latest (development) version <https://autoreject.github.io/dev/index.html>`_

.. docs_readme_include_label

Installation
------------

We recommend the `Anaconda Python distribution <https://www.anaconda.com/>`_
and a **Python version >= 3.8**.
To obtain the stable release of ``autoreject``, you can use ``pip``::

    pip install -U autoreject

Or ``conda``::

    conda install -c conda-forge autoreject

If you want the latest (development) version of ``autoreject``, use::

    pip install https://api.github.com/repos/autoreject/autoreject/zipball/master

If you do not have admin privileges on the computer, use the ``--user`` flag
with `pip`.

To check if everything worked fine, you can do::

    python -c 'import autoreject'

and it should not give any error messages.

Below, we list the dependencies for ``autoreject``.
All required dependencies are installed automatically when you install ``autoreject``.

* ``mne`` (>=1.0)
* ``numpy`` (>=1.20.2)
* ``scipy`` (>=1.6.3)
* ``scikit-learn`` (>=0.24.2)
* ``joblib``
* ``matplotlib`` (>=3.4.0)

Optional dependencies are:

* ``openneuro-py`` (>= 2021.10.1, for fetching data from `OpenNeuro.org <https://openneuro.org>`_)

Quickstart
==========

The easiest way to get started is to copy the following three lines of code
in your script:

.. code:: python

	>>> from autoreject import AutoReject
	>>> ar = AutoReject()
	>>> epochs_clean = ar.fit_transform(epochs)  # doctest: +SKIP

This will automatically clean an `epochs` object read in using MNE-Python. To get the
rejection dictionary, simply do:

.. code:: python

	>>> from autoreject import get_rejection_threshold
	>>> reject = get_rejection_threshold(epochs)  # doctest: +SKIP

We also implement RANSAC from the `PREP pipeline <https://doi.org/10.3389/fninf.2015.00016>`_
(see `PyPREP <https://github.com/sappelhoff/pyprep>`_ for a full implementation of the PREP pipeline).
The API is the same:

.. code:: python

	>>> from autoreject import Ransac
	>>> rsc = Ransac()
	>>> epochs_clean = rsc.fit_transform(epochs)  # doctest: +SKIP

For more details check out the example to
`automatically detect and repair bad epochs <https://autoreject.github.io/stable/_images/sphx_glr_plot_auto_repair_001.png>`_.

Bug reports
===========

Please use the `GitHub issue tracker <https://github.com/autoreject/autoreject/issues>`_ to report bugs.

Cite
====

[1] Mainak Jas, Denis Engemann, Federico Raimondo, Yousra Bekhti, and Alexandre Gramfort, "`Automated rejection and repair of bad trials in MEG/EEG <https://hal.archives-ouvertes.fr/hal-01313458/document>`_."
In 6th International Workshop on Pattern Recognition in Neuroimaging (PRNI), 2016.

[2] Mainak Jas, Denis Engemann, Yousra Bekhti, Federico Raimondo, and Alexandre Gramfort. 2017.
"`Autoreject: Automated artifact rejection for MEG and EEG data <http://www.sciencedirect.com/science/article/pii/S1053811917305013>`_".
NeuroImage, 159, 417-429.

            

Raw data

            {
    "_id": null,
    "home_page": "http://autoreject.github.io/",
    "name": "autoreject",
    "maintainer": "Mainak Jas",
    "docs_url": null,
    "requires_python": "~=3.8",
    "maintainer_email": "mainakjas@gmail.com",
    "keywords": "electroencephalography eeg magnetoencephalography meg preprocessing analysis",
    "author": "",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/e0/84/0471a888cb198b109dbc8c73fee04bb505600d4ee7f7bca50a4b76f4b94e/autoreject-0.4.3.tar.gz",
    "platform": "any",
    "description": "autoreject\n==========\n\n|CircleCI|_ |GitHub Actions|_ |Codecov|_ |PyPI|_ |Conda-Forge|_\n\n.. |CircleCI| image:: https://circleci.com/gh/autoreject/autoreject/tree/master.svg?style=shield&circle-token=:circle-token\n.. _CircleCI: https://circleci.com/gh/autoreject/autoreject\n\n.. |GitHub Actions| image:: https://github.com/autoreject/autoreject/actions/workflows/test.yml/badge.svg\n.. _GitHub Actions: https://github.com/autoreject/autoreject/actions/workflows/test.yml\n\n.. |Codecov| image:: http://codecov.io/github/autoreject/autoreject/coverage.svg?branch=master\n.. _Codecov: http://codecov.io/github/autoreject/autoreject?branch=master\n\n.. |PyPI| image:: https://badge.fury.io/py/autoreject.svg\n.. _PyPI: https://badge.fury.io/py/autoreject\n\n.. |Conda-Forge| image:: https://img.shields.io/conda/vn/conda-forge/autoreject.svg\n.. _Conda-Forge: https://anaconda.org/conda-forge/autoreject/\n\nThis is a library to automatically reject bad trials and repair bad sensors in magneto-/electroencephalography (M/EEG) data.\n\n.. image:: https://autoreject.github.io/stable/_images/sphx_glr_plot_auto_repair_001.png\n   :width: 400\n\n\nThe documentation can be found under the following links:\n\n- for the `stable release <https://autoreject.github.io/stable/index.html>`_\n- for the `latest (development) version <https://autoreject.github.io/dev/index.html>`_\n\n.. docs_readme_include_label\n\nInstallation\n------------\n\nWe recommend the `Anaconda Python distribution <https://www.anaconda.com/>`_\nand a **Python version >= 3.8**.\nTo obtain the stable release of ``autoreject``, you can use ``pip``::\n\n    pip install -U autoreject\n\nOr ``conda``::\n\n    conda install -c conda-forge autoreject\n\nIf you want the latest (development) version of ``autoreject``, use::\n\n    pip install https://api.github.com/repos/autoreject/autoreject/zipball/master\n\nIf you do not have admin privileges on the computer, use the ``--user`` flag\nwith `pip`.\n\nTo check if everything worked fine, you can do::\n\n    python -c 'import autoreject'\n\nand it should not give any error messages.\n\nBelow, we list the dependencies for ``autoreject``.\nAll required dependencies are installed automatically when you install ``autoreject``.\n\n* ``mne`` (>=1.0)\n* ``numpy`` (>=1.20.2)\n* ``scipy`` (>=1.6.3)\n* ``scikit-learn`` (>=0.24.2)\n* ``joblib``\n* ``matplotlib`` (>=3.4.0)\n\nOptional dependencies are:\n\n* ``openneuro-py`` (>= 2021.10.1, for fetching data from `OpenNeuro.org <https://openneuro.org>`_)\n\nQuickstart\n==========\n\nThe easiest way to get started is to copy the following three lines of code\nin your script:\n\n.. code:: python\n\n\t>>> from autoreject import AutoReject\n\t>>> ar = AutoReject()\n\t>>> epochs_clean = ar.fit_transform(epochs)  # doctest: +SKIP\n\nThis will automatically clean an `epochs` object read in using MNE-Python. To get the\nrejection dictionary, simply do:\n\n.. code:: python\n\n\t>>> from autoreject import get_rejection_threshold\n\t>>> reject = get_rejection_threshold(epochs)  # doctest: +SKIP\n\nWe also implement RANSAC from the `PREP pipeline <https://doi.org/10.3389/fninf.2015.00016>`_\n(see `PyPREP <https://github.com/sappelhoff/pyprep>`_ for a full implementation of the PREP pipeline).\nThe API is the same:\n\n.. code:: python\n\n\t>>> from autoreject import Ransac\n\t>>> rsc = Ransac()\n\t>>> epochs_clean = rsc.fit_transform(epochs)  # doctest: +SKIP\n\nFor more details check out the example to\n`automatically detect and repair bad epochs <https://autoreject.github.io/stable/_images/sphx_glr_plot_auto_repair_001.png>`_.\n\nBug reports\n===========\n\nPlease use the `GitHub issue tracker <https://github.com/autoreject/autoreject/issues>`_ to report bugs.\n\nCite\n====\n\n[1] Mainak Jas, Denis Engemann, Federico Raimondo, Yousra Bekhti, and Alexandre Gramfort, \"`Automated rejection and repair of bad trials in MEG/EEG <https://hal.archives-ouvertes.fr/hal-01313458/document>`_.\"\nIn 6th International Workshop on Pattern Recognition in Neuroimaging (PRNI), 2016.\n\n[2] Mainak Jas, Denis Engemann, Yousra Bekhti, Federico Raimondo, and Alexandre Gramfort. 2017.\n\"`Autoreject: Automated artifact rejection for MEG and EEG data <http://www.sciencedirect.com/science/article/pii/S1053811917305013>`_\".\nNeuroImage, 159, 417-429.\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "Automated rejection and repair of epochs in M/EEG.",
    "version": "0.4.3",
    "project_urls": {
        "Bug Reports": "https://github.com/autoreject/autoreject/issues",
        "Documentation": "http://autoreject.github.io/",
        "Download": "https://github.com/autoreject/autoreject.git",
        "Homepage": "http://autoreject.github.io/",
        "Source": "https://github.com/autoreject/autoreject"
    },
    "split_keywords": [
        "electroencephalography",
        "eeg",
        "magnetoencephalography",
        "meg",
        "preprocessing",
        "analysis"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "45cff34035d2de261064090cb46491b1b999f0b9711bc57da189ffe1b50df146",
                "md5": "fc4032e098c1f9150a1fb6c5e1321454",
                "sha256": "a094bebeaea40572f479b2b489c14c54a0be4d57ae7f51ea269c754d2433f9c1"
            },
            "downloads": -1,
            "filename": "autoreject-0.4.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fc4032e098c1f9150a1fb6c5e1321454",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "~=3.8",
            "size": 29855,
            "upload_time": "2023-11-14T16:48:12",
            "upload_time_iso_8601": "2023-11-14T16:48:12.348773Z",
            "url": "https://files.pythonhosted.org/packages/45/cf/f34035d2de261064090cb46491b1b999f0b9711bc57da189ffe1b50df146/autoreject-0.4.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e0840471a888cb198b109dbc8c73fee04bb505600d4ee7f7bca50a4b76f4b94e",
                "md5": "af0b78be2fc4af62cc3c4cb0eee11d1e",
                "sha256": "bd977ea3c88dc68550fbd5dbb98515b3b811907ba78afe8e412632edde6c8fc5"
            },
            "downloads": -1,
            "filename": "autoreject-0.4.3.tar.gz",
            "has_sig": false,
            "md5_digest": "af0b78be2fc4af62cc3c4cb0eee11d1e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "~=3.8",
            "size": 47139,
            "upload_time": "2023-11-14T16:48:15",
            "upload_time_iso_8601": "2023-11-14T16:48:15.879137Z",
            "url": "https://files.pythonhosted.org/packages/e0/84/0471a888cb198b109dbc8c73fee04bb505600d4ee7f7bca50a4b76f4b94e/autoreject-0.4.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-14 16:48:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "autoreject",
    "github_project": "autoreject",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "circle": true,
    "lcname": "autoreject"
}
        
Elapsed time: 0.19773s