Skip to content

Commit

Permalink
Merge pull request #33 from neuropsychology/0.2.0-Initial
Browse files Browse the repository at this point in the history
0.2.0 - Many breaking changes. Beware!
  • Loading branch information
DominiqueMakowski authored Sep 5, 2017
2 parents 79c163a + 3e70d8b commit 4abb24c
Show file tree
Hide file tree
Showing 74 changed files with 1,348 additions and 1,766,161 deletions.
7 changes: 7 additions & 0 deletions .cache/v/cache/lastfailed
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"tests/test_bio.py::test_bio_process": true,
"tests/test_bio.py::test_read_acqknowledge": true,
"tests/test_miscellaneous.py::test_get_creation_date": true,
"tests/test_statistics.py::test_compute_BMI": true,
"tests/test_statistics.py::test_compute_dprime": true
}
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ install:

script:
- python setup.py install
- coverage run tests/tests.py
- coverage run tests/test_statistics.py
- coverage run tests/test_miscellaneous.py
- coverage run tests/test_bio.py

after_success:
- codecov
22 changes: 19 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
## NEXT : 0.2
## CURRENT : 0.2

### Breaking changes
- Many!!!
- Append "complexity_" to all complexity function names (e.g., `entropy_shannon` -> `complexity_entropy_shannon`) (**since 0.2.0**) [#32](https://github.com/neuropsychology/NeuroKit.py/pull/32)
- `read_acqknowledge` new parameter, `return_sampling_rate`. Default to False to keep old behaviour, but default will be changed to True in the future (**since 0.2.0**) [#32](https://github.com/neuropsychology/NeuroKit.py/pull/32)


### New functions / parameters
- Many!!!
- `eeg_complexity`: First attempt to compute complexity features of epochs (**since 0.2.0**) [#32](https://github.com/neuropsychology/NeuroKit.py/pull/32)
- `emg_process`: Computes linear envelope and activation (**since 0.2.0**) [#32](https://github.com/neuropsychology/NeuroKit.py/pull/32)

### Major changes
- Many!!!

### Minor changes
- Many!!!

- Focus: EEG processing

---------

## CURRENT : 0.1
## 0.1

### Breaking changes
- EventRelated functions for biosignals: complete overhaul (**since 0.1.93**) [#30](https://github.com/neuropsychology/NeuroKit.py/pull/30)
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
## Code
- Authors of code contribution will be added within the [**contributor**](http://neurokit.readthedocs.io/en/latest/about.html#contributors) section within the documentation.
- Authors of code contribution are invited to follow the [PEP 8](https://www.python.org/dev/peps/pep-0008/) style sheet to write some nice (and readable) python.
- Contrary to Python recommandations, I prefer some nicely nested loops, rather than a one-liner ["that" for s if h in i for t in range("don't") if "understand" is False].
- Please document and comment your code, so that the purpose of each step (or code line) is stated in a clear and understandable way.
- Avoid unnecessary function splitting into smaller bits: it makes testing and reading of the code more difficult (as one must jump between functions and files to understand what's happening).
- Avoid unnecessary use of "magic" functions (preceded by underscores, `_foo()`). I don't know I don't find them elegant. But it's personal. I might be wrong.
32 changes: 22 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@


# NeuroKit.py
[![pypi](https://img.shields.io/pypi/pyversions/neurokit.svg)](https://pypi.python.org/pypi/neurokit) [![pypi](https://img.shields.io/pypi/v/neurokit.svg)](https://pypi.python.org/pypi/neurokit) [![travis](https://travis-ci.org/neuropsychology/NeuroKit.py.svg?branch=master)](https://travis-ci.org/neuropsychology/NeuroKit.py) [![codecov](https://codecov.io/gh/neuropsychology/NeuroKit.py/branch/master/graph/badge.svg)](https://codecov.io/gh/neuropsychology/NeuroKit.py) [![Dependency Status](https://dependencyci.com/github/neuropsychology/NeuroKit.py/badge)](https://dependencyci.com/github/neuropsychology/NeuroKit.py) [![License](https://img.shields.io/pypi/l/neurokit.svg)](https://github.com/neuropsychology/NeuroKit.py/blob/master/LICENSE) [![Build status](https://ci.appveyor.com/api/projects/status/9w4qw55143xu1gei?svg=true)](https://ci.appveyor.com/project/DominiqueMakowski/neurokit-py)
[![pypi](https://img.shields.io/pypi/pyversions/neurokit.svg)](https://pypi.python.org/pypi/neurokit)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/d5248bd8c8574e90b5c8fe0bf2030201)](https://www.codacy.com/app/DominiqueMakowski/NeuroKit.py?utm_source=github.com&utm_medium=referral&utm_content=neuropsychology/NeuroKit.py&utm_campaign=Badge_Grade)
[![pypi](https://img.shields.io/pypi/v/neurokit.svg)](https://pypi.python.org/pypi/neurokit)
[![travis](https://travis-ci.org/neuropsychology/NeuroKit.py.svg?branch=master)](https://travis-ci.org/neuropsychology/NeuroKit.py)
[![codecov](https://codecov.io/gh/neuropsychology/NeuroKit.py/branch/master/graph/badge.svg)](https://codecov.io/gh/neuropsychology/NeuroKit.py)
[![Dependency Status](https://dependencyci.com/github/neuropsychology/NeuroKit.py/badge)](https://dependencyci.com/github/neuropsychology/NeuroKit.py)
[![License](https://img.shields.io/pypi/l/neurokit.svg)](https://github.com/neuropsychology/NeuroKit.py/blob/master/LICENSE)
[![Build status](https://ci.appveyor.com/api/projects/status/9w4qw55143xu1gei?svg=true)](https://ci.appveyor.com/project/DominiqueMakowski/neurokit-py)
[![Code Health](https://landscape.io/github/neuropsychology/NeuroKit.py/master/landscape.svg?style=flat)](https://landscape.io/github/neuropsychology/NeuroKit.py/master)


A Python Toolbox for Statistics and Neurophysiological Signal Processing (EEG, EDA, ECG, EMG...).

Expand Down Expand Up @@ -32,6 +41,9 @@ Not working? [Check this out](http://neurokit.readthedocs.io/en/latest/tutorials


## Contribute

Want to get involved in the developpment of an open-source software and improve neuroscience practice? **Join us!**

- You need some help? You found a bug? You would like to request a new feature?
Just open an [issue](https://github.com/neuropsychology/NeuroKit.py/issues) :relaxed:
- Want to add a feature? Correct a bug? You're more than welcome to contribute!
Expand All @@ -49,12 +61,11 @@ Not working? [Check this out](http://neurokit.readthedocs.io/en/latest/tutorials

This package provides a high level integration of complex statistical routines for researchers and clinicians with not much experience in programming, statistics or signal theory.

- **M/EEG**
- **[`read_eeg()`](http://neurokit.readthedocs.io/en/latest/documentation.html#read-eeg)**: Read and convert many EEG and MEG files to an [`mne.io.Raw`](http://martinos.org/mne/stable/generated/mne.io.Raw.html#mne.io.Raw) object
- Preprocessing: Under development
- ERP: Under development
- Time/Frequency: Under development
- Microstates: Under development
- **[M/EEG](http://neurokit.readthedocs.io/en/latest/tutorials/EEG.html)** *(under developpment)*
- **[`eeg_erp()`](http://neurokit.readthedocs.io/en/latest/documentation.html#eeg_erp)**: Extract event-related potentials
- **[`eeg_complexity()`](http://neurokit.readthedocs.io/en/latest/documentation.html#eeg_complexity)**: Compute entropy, fractal dimension, and complexity indices
- Time/Frequency: **SOON™**
- Microstates: **SOON™**
- **[Biosignals](http://neurokit.readthedocs.io/en/latest/tutorials/Bio.html)**
- **[`read_acqknowledge()`](http://neurokit.readthedocs.io/en/latest/documentation.html#read-acqknowledge)**: Load and convert Biopac:copyright:'s AcqKnowledge files to a dataframe
- **[`ecg_process()`](http://neurokit.readthedocs.io/en/latest/documentation.html#ecg-process)**: Extract ECG features
Expand All @@ -74,15 +85,16 @@ This package provides a high level integration of complex statistical routines f
- *Skin Conductance Responses (SCR) onsets, peaks, amplitudes, latencies, recovery times, ...*
- **[`emg_process()`](http://neurokit.readthedocs.io/en/latest/documentation.html#emg-process)**: Extract EMG features
- *Pulse onsets*
- *Linear envelope, muscle activation*
- **Signal**
- **[`complexity()`](http://neurokit.readthedocs.io/en/latest/documentation.html#complexity)**: Extract complexity/chaos indices, such as values of entropy (Shannon's, Sample and Multiscale), fractal dimension, Hurst and Lyapunov exponents and more
- **Statistics**
- **[`z_score()`](http://neurokit.readthedocs.io/en/latest/documentation.html#z-score)**: Normalize (scale and reduce) variables
- **[`find_outliers()`](http://neurokit.readthedocs.io/en/latest/documentation.html#find_outliers)**: Identify outliers
- **[`dprime()`](http://neurokit.readthedocs.io/en/latest/documentation.html#dprime)**: Computes Signal Detection Theory (SDT) parameters (d', c, beta, a', b''d)
- **Miscellaneous**
- **[`BMI()`](http://neurokit.readthedocs.io/en/latest/documentation.html#bmi)**: Compute the traditional body mass index (BMI), the new BMI, the Body Fat Percentage (BFP) and their interpretation

- **[`compute_dprime()`](http://neurokit.readthedocs.io/en/latest/documentation.html#compute_dprime)**: Computes Signal Detection Theory (SDT) parameters (d', c, beta, a', b''d)
- **[`compute_BMI()`](http://neurokit.readthedocs.io/en/latest/documentation.html#compute_bmi)**: Compute the traditional body mass index (BMI), the new BMI, the Body Fat Percentage (BFP) and their interpretation
- **[`compute_interoceptive_accuracy()`](http://neurokit.readthedocs.io/en/latest/documentation.html#compute_interoceptive_accuracy)**: Compute interoception accuracy according to Garfinkel et al., (2015).


## Citation
Expand Down
7 changes: 7 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,11 @@ machine:

dependencies:
override:
- pip install codecov
- pip install -r requirements.txt

test:
override:
- coverage run tests/tests.py
post:
- codecov
6 changes: 3 additions & 3 deletions docs/about.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
About
#####

NeuroKit is looking for devs, support and pretty much everything. Join the team by `contributing <https://github.com/neuropsychology/NeuroKit.py/blob/master/CONTRIBUTING.md>`_ :)
NeuroKit is looking for developers, support and pretty much everything. Join the team by `contributing <https://github.com/neuropsychology/NeuroKit.py/blob/master/CONTRIBUTING.md>`_ :)

Core Team
==========
Expand All @@ -13,7 +13,7 @@ Contributors

- `Rhenan Bartels Ferreira <https://www.researchgate.net/profile/Rhenan_Ferreira>`_ (Brazil): HRV, Testing, RSP, RSA.
- `Nate Vack <https://github.com/njvack>`_ (USA): Acqknowledge files reading.
- `Vassilios Vonikakis <https://github.com/bbonik>`_ (USA): HRV preprocessing.
- `Vassilios Vonikakis <https://github.com/bbonik>`_ (USA): HRV.

Support
========
Expand All @@ -29,7 +29,7 @@ Credits

Credits go to the authors of NeuroKit's dependencies.

Publications using it
Featured in
=======================

NeuroKit has been used in the following publications:
Expand Down
147 changes: 114 additions & 33 deletions docs/documentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,9 @@ read_acqknowledge
.. autofunction:: neurokit.read_acqknowledge


EEG Processing
EEG
=====================

read_eeg
--------------------

.. autofunction:: neurokit.read_eeg


eeg_add_channel
Expand All @@ -81,42 +77,51 @@ eeg_add_channel
.. autofunction:: neurokit.eeg_add_channel



eeg_add_events
eeg_select_channels
--------------------

.. autofunction:: neurokit.eeg_add_events
.. autofunction:: neurokit.eeg_select_channels


eeg_select_electrodes
-----------------------

eeg_select_sensor_area
.. autofunction:: neurokit.eeg_select_electrodes


eeg_create_mne_events
-------------------------

.. autofunction:: neurokit.eeg_select_sensor_area
.. autofunction:: neurokit.eeg_create_mne_events

eeg_add_events
-------------------------

.. autofunction:: neurokit.eeg_add_events

eeg_filter
--------------------

.. autofunction:: neurokit.eeg_filter
eeg_complexity
-------------------------

eeg_ica
--------------------
.. autofunction:: neurokit.eeg_complexity

.. autofunction:: neurokit.eeg_ica

eeg_erp
-------------------------

eeg_name_frequencies
-----------------------
.. autofunction:: neurokit.eeg_erp

.. autofunction:: neurokit.eeg_name_frequencies

eeg_psd
---------------
plot_eeg_erp
-------------------------

.. autofunction:: neurokit.plot_eeg_erp

.. autofunction:: neurokit.eeg_psd

plot_eeg_erp_topo
-------------------------

.. autofunction:: neurokit.plot_eeg_erp_topo


Signal
Expand All @@ -128,10 +133,10 @@ find_events

.. autofunction:: neurokit.find_events

visually_check_events_in_signal
plot_events_in_signal
-----------------------------------

.. autofunction:: neurokit.visually_check_events_in_signal
.. autofunction:: neurokit.plot_events_in_signal

create_epochs
---------------
Expand All @@ -146,37 +151,59 @@ complexity








Statistics
=====================


mad
---------------

.. autofunction:: neurokit.mad


z_score
---------------

.. autofunction:: neurokit.z_score

dprime
---------------

.. autofunction:: neurokit.dprime

find_outliers
---------------

.. autofunction:: neurokit.find_outliers

Miscellaneous

normal_range
---------------

.. autofunction:: neurokit.normal_range








Routines
=====================

BMI
compute_dprime
---------------

.. autofunction:: neurokit.BMI
.. autofunction:: neurokit.compute_dprime


find_closest_in_list
---------------------
compute_BMI
---------------

.. autofunction:: neurokit.find_closest_in_list
.. autofunction:: neurokit.compute_BMI



Expand All @@ -186,3 +213,57 @@ compute_interoceptive_accuracy
.. autofunction:: neurokit.compute_interoceptive_accuracy






Plot
=====================

plot_polarbar
---------------

.. autofunction:: neurokit.plot_polarbar




Miscellaneous
=====================


find_following_duplicates
----------------------

.. autofunction:: neurokit.find_following_duplicates


find_closest_in_list
----------------------

.. autofunction:: neurokit.find_closest_in_list


Time
----------------------

.. autoclass:: neurokit.Time

Data
=====================


find_creation_date
----------------------

.. autofunction:: neurokit.find_creation_date

save_nk_object
----------------------

.. autofunction:: neurokit.save_nk_object

read_nk_object
----------------------

.. autofunction:: neurokit.read_nk_object
Loading

0 comments on commit 4abb24c

Please sign in to comment.