-
-
Notifications
You must be signed in to change notification settings - Fork 422
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #749 from neuropsychology/dev
0.2.3
- Loading branch information
Showing
33 changed files
with
1,055 additions
and
294 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Save Preprocessing Reports" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"This example can be referenced by [citing the package](https://neuropsychology.github.io/NeuroKit/cite_us.html).\n", | ||
"\n", | ||
"Reports are currently a **beta** feature (help us improve it!) only available for PPG signals. \n", | ||
"\n", | ||
"You can generate a report via the `report` argument in the processing function." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"tags": [ | ||
"remove-input" | ||
] | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"# Note: this cell is hidden using the \"remove-input\" tag\n", | ||
"import matplotlib.pyplot as plt\n", | ||
"# Make bigger images\n", | ||
"plt.rcParams['figure.figsize'] = [15, 5] \n", | ||
"plt.rcParams['font.size']= 14" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"tags": [ | ||
"skip-execution" | ||
] | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"# import neurokit2 as nk\n", | ||
"\n", | ||
"# Simulate PPG signal\n", | ||
"# signal = nk.ppg_simulate(duration=30, sampling_rate=200, heart_rate=60)\n", | ||
"\n", | ||
"# Process signal and save report\n", | ||
"# df, info = nk.ppg_process(ppg_signal = signal, report = \"ppg_report.html\")" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 6, | ||
"metadata": { | ||
"tags": [ | ||
"remove-input" | ||
] | ||
}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"The raw signal, sampled at 1000 Hz, was preprocessed using a bandpass filter ([0.5 - 8 Hz], Butterworth 3rd order; following Elgendi et al., 2013).\n", | ||
"\n", | ||
"The peak detection was carried out using the method described in Elgendi et al. (2013).\n", | ||
"\n", | ||
"| PPG_Rate_Mean | PPG_Rate_SD |\n", | ||
"|----------------:|--------------:|\n", | ||
"| 93.7041 | 23.5124 |\n", | ||
"\n", | ||
"References\n", | ||
"- Elgendi M, Norton I, Brearley M, Abbott D, Schuurmans D (2013) Systolic Peak Detection in Acceleration Photoplethysmograms Measured from Emergency Responders in Tropical Conditions. PLoS ONE 8(10): e76585. doi:10.1371/journal.pone.0076585.\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"# Note: this cell is hidden using the \"remove-input\" tag\n", | ||
"# import neurokit2 as nk\n", | ||
"\n", | ||
"# Simulate PPG signal\n", | ||
"# signal = nk.ppg_simulate(duration=30, sampling_rate=200, heart_rate=60)\n", | ||
"\n", | ||
"# Process signal and save report\n", | ||
"# df, info = nk.ppg_process(ppg_signal = signal, report = \"text\")" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"It also saves a `html` file (see example here) with interactive plots.\n", | ||
"\n", | ||
"![](ppg_report.png)" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3.9.7 64-bit", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.9.7" | ||
}, | ||
"vscode": { | ||
"interpreter": { | ||
"hash": "11938c6bc6919ae2720b4d5011047913343b08a43b18698fd82dedb0d4417594" | ||
} | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ | |
from .video import * | ||
|
||
# Info | ||
__version__ = "0.2.2" | ||
__version__ = "0.2.3" | ||
|
||
|
||
# Maintainer info | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.