Skip to content

Commit

Permalink
Merge pull request #520 from neuropsychology/dev
Browse files Browse the repository at this point in the history
0.1.5
  • Loading branch information
DominiqueMakowski authored Nov 12, 2021
2 parents c110438 + 715cd01 commit d01111b
Show file tree
Hide file tree
Showing 193 changed files with 67,317 additions and 5,292 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: '3.7'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install https://github.com/DominiqueMakowski/popularipy/zipball/master
python -m pip install https://github.com/DominiqueMakowski/popularipy/zipball/master
cd $GITHUB_WORKSPACE && pip install .[test]
- name: Run README_examples.py
run: |
cd $GITHUB_WORKSPACE/docs/readme
python README_examples.py
- name: Build package and test with twine
run: |
python -m pip install --upgrade setuptools pip wheel twine
Expand Down
70 changes: 70 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "Security"

on:
push:
branches: [ dev ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ dev ]
schedule:
- cron: '24 2 * * 3'

jobs:
analyze:
name: CodeQL
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'python' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
12 changes: 6 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,28 @@ jobs:
- ubuntu-latest # ubuntu-18.04
# - macos-latest # macOS-10.14
# - windows-latest # windows-2019
python-version: [3.7, 3.8]
python-version: [3.7, 3.8, 3.9]
#exclude:
# - platform: windows-latest
# python-version: 3.8

steps:
- uses: actions/checkout@master

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade setuptools pip wheel
python -m pip install tox
- name: Test with tox
run: |
cd $GITHUB_WORKSPACE && python -m tox -e py
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1

51 changes: 51 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,54 @@ studies/hrv_structure/efa.csv
studies/hrv_structure/data_stability_1.csv
studies/hrv_structure/data2.csv
data/mit_nst/data2.csv
data/mit_long-term/download_mit_long-term.py
*.atr
*.dat
*.dat
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/14046.atr
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/14046.dat
data/mit_long-term/download_mit_long-term.py
*.atr
*.atr
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/14046.dat
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/14046.atr
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/14046.dat
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/14046.hea
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/14046.hea-
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/14046.xws
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/14134.atr
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/14134.dat
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/14134.hea
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/14134.hea-
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/14134.xws
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/14149.atr
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/14149.dat
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/14149.hea
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/14149.hea-
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/14149.xws
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/14157.atr
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/14157.dat
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/14157.hea
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/14157.hea-
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/14157.xws
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/14172.atr
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/14172.dat
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/14172.hea
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/14172.hea-
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/14172.xws
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/14184.atr
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/14184.dat
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/14184.hea
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/14184.hea-
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/14184.xws
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/15814.atr
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/15814.dat
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/15814.hea
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/15814.hea-
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/15814.xws
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/ANNOTATORS
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/RECORDS
data/mit_long-term/mit-bih-long-term-ecg-database-1.0.0/SHA256SUMS.txt
data/mit_long-term/ECGs.csv
data/mit_long-term/ECGs.csv

9 changes: 5 additions & 4 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,20 @@ Contributors
* `Hung Pham <https://github.com/hungpham2511>`_ *(Eureka Robotics, Singapore)*
* `Christopher Schölzel <https://github.com/CSchoel>`_ *(THM University of Applied Sciences, Germany)*
* `Duy Le <https://github.com/duylp>`_ *(Hubble, Singapore)*
* `Leonardo Rydin Gorjão <https://github.com/lrydin>`_ *(OsloMet, Norway)*
* `Alexander Wong <https://github.com/awwong1>`_ *(University of Alberta, Canada)*
* `Jukka Zitting <https://github.com/jukka>`_
* `Stavros Avramidis <https://github.com/purpl3F0x>`_
* `Tiago Rodrigues <https://github.com/TiagoTostas>`_ *(IST, Lisbon)*
* `Mitchell Bishop <https://github.com/Mitchellb16>`_ *(NINDS, USA)*
* `Robert Richer <https://github.com/richrobe>`_ *(FAU Erlangen-Nürnberg, Germany)*
* `Russell Anderson <https://github.com/rpanderson>`_ *(La Trobe Institute for Molecular Science, Australia)*
* `Alexander Wong <https://github.com/awwong1>`_ *(University of Alberta, Canada)*
* `Elaine Teo <https://github.com/elaineteo2000>`_ *(University College London)*
* `Raimon Padrós <https://github.com/raimonpv>`_ *(Universitat politècnica de Catalunya, Spain - Massachusetts General Hospital, USA)*
* `Minsoo Yeo <https://github.com/minsooyeo>`_ *(Taewoong Medical Co., Ltd., ROK)*
* `Celal Savur <https://github.com/csavur>`_ *(Rochester Institute of Technology, USA)*
* `Jacob Epifano <https://github.com/jrepifano>`_ *(Rowan University - Children's Hospital of Philadelphia, USA)*
* `Leonardo Rydin Gorjão <https://github.com/lrydin>`_ *(OsloMet, Norway)*
* `Jukka Zitting <https://github.com/jukka>`_
* `Patryk Wielopolski <https://github.com/pfilo8>`_ *(Wrocław University of Science and Technology, Poland)*


Thanks also to `Gansheng Tan <https://github.com/GanshengT>`_, `Chuan-Peng Hu <https://github.com/hcp4715>`_, `@ucohen <https://github.com/ucohen>`_, `Anthony Gatti <https://github.com/gattia>`_, `Julien Lamour <https://github.com/lamourj>`_, `@renatosc <https://github.com/renatosc>`_, `Nicolas Beaudoin-Gagnon <https://github.com/Fegalf>`_ and `@rubinovitz <https://github.com/rubinovitz>`_ for their contribution in `NeuroKit 1 <https://github.com/neuropsychology/NeuroKit.py>`_.
Expand Down Expand Up @@ -63,4 +64,4 @@ Full bibtex reference:
doi={10.3758/s13428-020-01516-y},
url={https://doi.org/10.3758/s13428-020-01516-y}
}
..
..
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ authors:
- family-names: "Brammer"
given-names: "Jan C."
title: "NeuroKit2: The Python Toolbox for Neurophysiological Signal Processing"
version: 0.1.4.1
version: 0.1.5
doi: 10.3758/s13428-020-01516-y
date-released: 2021-02-02
url: "https://github.com/neuropsychology/NeuroKit"
Expand Down
46 changes: 46 additions & 0 deletions NEWS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,52 @@ News
=====


0.1.5
-------------------

Breaking Changes
+++++++++++++++++

* Argument `r` changed to `radius` in `fractal_correlation()`
* Argument `r` changed to `tolerance` in entropy and complexity utility functions
* Argument `r_method` changed to `tolerance_method` in `complexity_optimize()`
* `complexity_lempelziv()`, `fractal_higuchi()`, `fractal_katz()`, `fractal_correlation()`, `fractal_dfa()`, `entropy_multiscale()`, `entropy_shannon()`, `entropy_approximate()`, `entropy_fuzzy()`, `entropy_sample()` now return a tuple consisting of the complexity index, and a dictionary comprising of the different parameters specific to the measure. For `fractal_katz()` and `entropy_shannon()`, the parameters dictionary is empty.
* Restructure `complexity` submodules with optimization files starting with `optim_*`, such as `optim_complexity_delay()`, `optim_complexity_dimension()`, `optim_complexity_k()`, `optim_complexity_optimize()`, and `optim_complexity_tolerance()`.
* `mutual_information()` moved from `stats` module to `complexity` module.

New Features
+++++++++++++

* Added various complexity indices: `complexity_hjorth()`, `complexity_hurst()`, `complexity_lyapunov()`, `complexity_rqa()`, `complexity_rr()`, `entropy_coalition()`, `entropy_permutation()`, `entropy_range()`, `entropy_spectral()`, `fractal_nld()`, `fractal_psdslope()`, `fractal_sda()`, `fractal_sevcik()`
* Added `mne_templateMRI()` as a helper to get MNE's template MRI.
* Added `eeg_source()` as a helper to perform source reconstruction.
* Added `eeg_source_extract()` to extract the activity from a brain region.
* Added `parallel_run()` in `misc` as a parallel processing utility function.
* Added `find_plateau()` in `misc` to find the point of plateau in an array of values.
* Added `write_csv()` in `data` to facilitate saving dataframes into multiple parts.
* Added more complexity-related functions, `entropy_cumulative_residual()`, `entropy_differential()`, `entropy_svd()`, `fractal_petrosian()`, and `information_fisher()`.
* Updates logic to find `kmax` in `fractal_higuchi()`
* Add RSP_Amplitude_Baseline in event-related analysis
* Add argument `add_firstsamples` in `mne_channel_extract()` to account for first sample attribute in mne raw objects
* Allow plotting of `mne.Epochs` in `epochs_plot()`
* Add `mne_crop()` to crop `mne` Raw objects with additional flexibility to specify first and last elements
* Plotting function in `eeg_badchannels()` to visualize overlay of individual EEG channels and highlighting of bad ones
* Add `eog_peaks()` as wrapper for `eog_findpeaks()`
* Allow `ecg_delineate()` to account for different heart rate


Fixes
+++++++++++++

* Ensure detected offset in `emg_activation()` is not beyond signal length
* Raise ValueError in `_hrv_sanitize_input()` if RRIs are detected instead of peaks
* Ensure that multifractal DFA indices returned by `fractal_mdfa()` is not Nan when array of slopes contains Nan (due to zero fluctuations)
* Documentation of respiration from peak/trough terminology to inhale/exhale onsets
* Change labelling in `rsp_plot()` from "inhalation peaks" and "exhalation troughs" to "peaks (exhalation onsets)" and "troughs (inhalation onsets)" respectively.
* Change RSP_Amplitude_Mean/Min/Max parameters to be corrected based on value closest to t=0 in event-related analysis, rather than using all pre-zero values.
* Have `rsp_rrv()` compute breath-to-breath intervals based on trough indices (inhalation onsets) rather than peak indices
* Compute `rsp_rate()` based on trough indices (rather than peak indices) in 'periods' method


0.1.4.1
-------------------
Expand Down
19 changes: 18 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ NeuroKit2 is the most `welcoming <https://github.com/neuropsychology/NeuroKit#po
- `Contributing guide <https://neurokit2.readthedocs.io/en/latest/contributing/contributing.html>`_
- `Ideas for first contributions <https://neurokit2.readthedocs.io/en/latest/contributing/first_contribution.html>`_

Also, if you have developped new signal processing methods or algorithms and you want to **increase its usage, popularity and citations**, get in touch with us to eventually add it to NeuroKit. A great opportunity for the users as well as the original developpers!
Also, if you have developed new signal processing methods or algorithms and you want to **increase its usage, popularity and citations**, get in touch with us to eventually add it to NeuroKit. A great opportunity for the users as well as the original developers!

You have spotted an **mistake**? An **error** in a formula or code? OR there is just a step that you seems strange and you don't understand? **Please let us know!** We are Human beings, and we'll appreciate any inquiry.

Documentation
----------------
Expand Down Expand Up @@ -609,6 +610,22 @@ NeuroKit2 is one of the most welcoming package for new contributors and users, a
:target: https://pypi.python.org/pypi/neurokit2


Used at
-------

|ntu| |univ_duke| |univ_paris| |ntu_taiwan| |univ_pittsburh|

.. |ntu| image:: https://cdn.freelogovectors.net/wp-content/uploads/2019/02/ntu_logo_nanyang_technological_university.png
:height: 70
.. |univ_duke| image:: https://www.tutelaprep.com/blog/wp-content/uploads/2019/12/duke.png
:height: 70
.. |univ_paris| image:: https://study-eu.s3.amazonaws.com/uploads/university/universit--de-paris-logo.svg
:height: 70
.. |ntu_taiwan| image:: https://cdn.freelogovectors.net/wp-content/uploads/2021/04/national-taiwan-university-logo-freelogovectors.net_.png
:height: 70
.. |univ_pittsburh| image:: https://upload.wikimedia.org/wikipedia/en/thumb/f/fb/University_of_Pittsburgh_seal.svg/1200px-University_of_Pittsburgh_seal.svg.png
:height: 70


Notes
-------
Expand Down
Loading

0 comments on commit d01111b

Please sign in to comment.