Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to v.0.4.0 #12

Merged
merged 9 commits into from
Nov 12, 2019
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
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,13 @@ venv.bak/
# mypy
.mypy_cache/
.DS_Store
docs/Icon
.idea/workspace.xml
.idea/vcs.xml
.idea/pyhrv.iml
.idea/modules.xml
.idea/misc.xml
.idea/markdown-navigator/profiles_settings.xml
.idea/markdown-navigator.xml
.idea/dictionaries/pedrogomes.xml
.idea/codeStyles/codeStyleConfig.xml
8 changes: 8 additions & 0 deletions .idea/markdown-exported-files.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file modified LICENSE.txt
100755 → 100644
Empty file.
245 changes: 125 additions & 120 deletions README.md
100755 → 100644

Large diffs are not rendered by default.

Empty file modified SampleFigures/SampleAR.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified SampleFigures/SampleDFA.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified SampleFigures/SampleECG.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SampleFigures/SampleHRHeatplot1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SampleFigures/SampleHRHeatplot2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SampleFigures/SampleHRHeatplot3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified SampleFigures/SampleHistogram.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified SampleFigures/SampleLomb.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified SampleFigures/SampleNonlinear.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SampleFigures/SamplePSDComparisonAR.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SampleFigures/SamplePSDComparisonLomb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SampleFigures/SamplePSDComparisonWelch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SampleFigures/SamplePSDWaterfallAR.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SampleFigures/SamplePSDWaterfallLomb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SampleFigures/SamplePSDWaterfallWelch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified SampleFigures/SamplePoincare.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SampleFigures/SampleRadarChart5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SampleFigures/SampleRadarChart8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified SampleFigures/SampleTachogram.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified SampleFigures/SampleWelch.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified SampleFigures/pyhrv.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
309,102 changes: 0 additions & 309,102 deletions TestData/bittest.csv

This file was deleted.

4,836 changes: 0 additions & 4,836 deletions TestData/series_1_hrv.txt

This file was deleted.

Binary file removed TestData/series_2.npy
Binary file not shown.
4,559 changes: 0 additions & 4,559 deletions TestData/series_2_hrv.txt

This file was deleted.

Binary file removed TestData/series_3.npy
Binary file not shown.
5,020 changes: 0 additions & 5,020 deletions TestData/series_3_hrv.txt

This file was deleted.

Binary file removed TestData/series_4.npy
Binary file not shown.
4,097 changes: 0 additions & 4,097 deletions TestData/series_4_hrv.txt

This file was deleted.

Binary file removed TestData/series_5.npy
Binary file not shown.
4,051 changes: 0 additions & 4,051 deletions TestData/series_5_hrv.txt

This file was deleted.

Binary file removed TestData/series_6.npy
Binary file not shown.
Binary file removed TestData/series_7.npy
Binary file not shown.
115 changes: 115 additions & 0 deletions _gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.DS_Store
docs/Icon
.idea/workspace.xml
.idea/vcs.xml
.idea/pyhrv.iml
.idea/modules.xml
.idea/misc.xml
.idea/markdown-navigator/profiles_settings.xml
.idea/markdown-navigator.xml
.idea/dictionaries/pedrogomes.xml
.idea/codeStyles/codeStyleConfig.xml
85 changes: 85 additions & 0 deletions changelog.md
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,3 +1,88 @@
Update Version 0.4.0
--------------------
#### Major Changes
- updated hrv_keys.json and fixed some typos
- added ``modes`` to the Frequency Domain functions ``welch_psd()``, ``ar_psd()``, and ``lomb_psd()`:
- ``normal``: Returns frequency domain parameters and PSD plot figure in a ReturnTuple object
- ``dev``: Returns frequency domain parameters, frequency and power arrays, no plot figure
- ``devplot``: Returns frequency domain parameters, frequency array, power array, and the plot figure
- Frequency Domain Comparison Features:
- added ``pyhrv.frequency_domain.psd_comparison()`` function to plot multiple PSDs (welch, ar, or lomb) from multiple
NNI segments in single plot figure

**Sample Plots:**
[Welch](./SampleFigures/SamplePSDComparisonWelch.png),
[Autoregressive](./SampleFigures/SamplePSDComparisonAR.png), and
[Lomb-Scargle](./SampleFigures/SamplePSDComparisonLomb.png)
**Docs:**
https://pyhrv.readthedocs.io/en/latest/_pages/api/frequency.html#d-psd-comparison-plot-psd-comparison
- added ``pyhrv.frequency_domain.psd_waterfall()`` function to plot multiple PSDs (welch, ar, or lomb) from multiple
NNi segments in a 3D Plot (Sample plots: [Welch](./SampleFigures/SamplePSDWaterfallWelch.png), [Autoregressive](
./SampleFigures/SamplePSDWaterfallAR.png), [Lomb](./SampleFigures/SamplePSDWaterfallLomb.png))
- Added ``pyhrv.tools.heart_rate_heatplot()`` function for graphical visualization & classification of HR performance
based on normal HR ranges by age and gender (Sample Plots: [plot 1](./SampleFigures/SampleHRHeatplot1.png), [plot 2](
./SampleFigures/SampleHRheatplot2), and [plot 3](./SampleFigures/SampleHRHeatplot3.png)).
- Added ``pyhrv.tools.radar_chart()`` function which plots a radar chart from a series of user-selected HRV parameters
based on a
- removed ``overlap`` input argument from the ``pyhrv.utils.segmentation()`` functions as it had now effect anymore due to the previous updates of this function.
- ``overlap`` input argument has also been removed from the ``pyhrv.utils.sdnn_index()`` and ``pyhrv.utils.sdann()`` functions for the same reason (both use the ``pyhrv.utils.segmentation()``)
- Moved, fixed, and improved ``hrv_report()``
- Overall improved stability of the pyhrv package
- restructured pyhrv package (see especially ``tools.py`` and the ``utils.py`` modules):

```
pyhrv # Toolbox
├── files # pyHRV support files
| ├── quickstart # Figures for the quickstart guide (see pyhrv module README.md)
| ├── hr_heatplot.json # HR reference normal values for the hr_heatplot() function
| ├── hrv_keys.json # HRV keys to access the parameter results stored in
| ├── references.txt # Publications references on which pyHRV functions are based
| ├── SampleECG.txt # Sample ECG signal (for testing purposes)
| ├── SampleExport.json # Sample HRV results export (for demonstration purposes)
| ├── SampleNNISeriesLong.npy # 60 minute sample NNI series (for testing purposes)
| ├── SampleNNISeriesShort.npy# 5 minute sample NNI series (for testing purposes)
| ├── SampleReport.csv # Sample report in .csv format
| ├── SampleReport.pdf # Sample report in .pdf format
| └── SampleReport.txt # Sample report in .txt format
|
├── report # Subpackage for PDF, TXT, and CSV report generation
| ├── build # Default path for generated PDF, TXT, and CSV reports
| ├── figure # Working directory where figures for the PDF report are temporarily stored
| ├── templates # LaTeX templates for the PDF reports (feel free to customize)
| ├── __init__.py # Report init file
| ├── main.tex # Main LaTeX file
| ├── parameters.tex # File containing all the variables in which the HRV parameters will be stored
| ├── pyhrv.png # pyHRV logo for the PDF header
| ├── README.md # Report README
| └── settings.tex # Settings file for the LaTeX-based project
|
├── __init__.py # pyHRV init file
├── __version__.py # pyHRV version
├── hrv.py # HRV function
├── frequency_domain_.py # Frequency Domain functions
├── nonlinear.py # Nonlinear Parameters functions
├── time_domain.py # Time Domain functions
├── tools.py # HRV tools functions (Tachogram, ECG, radar chart, HR heatplot, and other
| # Comparison functions
└── utils.py # General data verification, conversion, file handling, etc.

```

- the ``tools.py`` now only contains tools specifically designed for HRV analysis (support)
- the ``utils.py`` now only contains support functions required for the computation of the tools and computation of
HRV parameters

#### Minor Changes
- pyhrv.nonlinear.dfa(): added ``dfa_alpha1_beats`` return key with short term fluctuation and ``dfa_alpha2_beats` return key with long term fluctuation values
- updated hrv_keys.json file
- added ``complete`` as valid value for the ``interval`` input parameter of the ``tools.plot_ecg`` and ``tools
.tachogram``
functions
- pyhrv.time_domain.tinn() & pyhrv.time_domain.geometrical_parameters() functions no issue a warning due to the current issue of the TINN function of providing wrong results (see issue #5)
- removed 'overlap' input parameter from ``sdnn`` and ``sdnn_index`` functions
- updated main README
- Fixes #6, #7 and #9

Update Version 0.3.2
--------------------
- IMPORTANT: fixes installation issues under Python3 using pip install (full support must yet be tested)
Expand Down
Empty file modified docs/Makefile
100755 → 100644
Empty file.
Empty file modified docs/make.bat
100755 → 100644
Empty file.
Loading