Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
cdb8451
docs: migrate to Furo and refine theme styling
rafaelscsilva Jun 1, 2026
bf3aae2
docs: add sphinx_copybutton extension and update requirements
rafaelscsilva Jun 1, 2026
87c212c
docs: update logo paths for light and dark themes
rafaelscsilva Jun 1, 2026
b0ca5f1
docs: update documentation to use autosummary for module listings
rafaelscsilva Jun 3, 2026
8214972
Update docs/images for ECG
rafaelscsilva Jun 3, 2026
9177753
docs: add ReturnTuple documentation to explain its usage and benefits
rafaelscsilva Jun 3, 2026
9bedd8c
docs: rename tutorial.rst to gettingstarted.rst and enhance content f…
rafaelscsilva Jun 3, 2026
71f97d9
docs: rename tutorial.rst to gettingstarted.rst and enhance content f…
rafaelscsilva Jun 3, 2026
9b0cb0a
docs: enhance index.rst with detailed BioSPPy features and quick ECG …
rafaelscsilva Jun 4, 2026
8443a06
docs: add support images and plots of biosignals
rafaelscsilva Jun 4, 2026
e81a734
docs: migrate to Furo and refine theme styling
rafaelscsilva Jun 1, 2026
7eb6889
docs: add sphinx_copybutton extension and update requirements
rafaelscsilva Jun 1, 2026
ee6e22f
docs: update logo paths for light and dark themes
rafaelscsilva Jun 1, 2026
a13669c
docs: update documentation to use autosummary for module listings
rafaelscsilva Jun 3, 2026
e24ab0d
Update docs/images for ECG
rafaelscsilva Jun 3, 2026
b71364e
docs: add ReturnTuple documentation to explain its usage and benefits
rafaelscsilva Jun 3, 2026
c65d3b6
docs: rename tutorial.rst to gettingstarted.rst and enhance content f…
rafaelscsilva Jun 3, 2026
f1e40dc
docs: rename tutorial.rst to gettingstarted.rst and enhance content f…
rafaelscsilva Jun 3, 2026
07bd8bc
docs: enhance index.rst with detailed BioSPPy features and quick ECG …
rafaelscsilva Jun 4, 2026
af72681
docs: add support images and plots of biosignals
rafaelscsilva Jun 4, 2026
72e0d27
Merge remote-tracking branch 'origin/doc_upgrade' into doc_upgrade
rafaelscsilva Jun 9, 2026
f587ca0
docs: add how to cite BioSPPy in howtocite.rst and update index.rst
rafaelscsilva Jun 9, 2026
9d25608
docs: add contributing guidelines and update index.rst
rafaelscsilva Jun 9, 2026
0978e82
update ecg.png in plots
rafaelscsilva Jun 9, 2026
02fe988
docs: update MOCK_MODULES to include 'scipy.fft' and 'pyvista'
rafaelscsilva Jun 9, 2026
51f31cc
docs: add biosppy.signals.egm to the signals documentation
rafaelscsilva Jun 9, 2026
7d9b29a
docs: add biosppy.spatial documentation and include in biosppy.rst
rafaelscsilva Jun 9, 2026
e4a5751
docs: improve docstring formatting in bvp
rafaelscsilva Jun 9, 2026
f09ebce
docs: improve docstring formatting in ecg
rafaelscsilva Jun 9, 2026
7ba3f63
docs: improve docstring formatting in synthesizers.ecg
rafaelscsilva Jun 9, 2026
9390810
docs: improve docstring formatting in signals.ecg
rafaelscsilva Jun 9, 2026
7a66c3a
docs: improve docstring formatting in signals.eeg
rafaelscsilva Jun 9, 2026
7a1251d
docs: improve docstring formatting in signals.egm
rafaelscsilva Jun 9, 2026
2ab36cd
docs: improve docstring formatting in synthesizers.emg
rafaelscsilva Jun 9, 2026
fabbbbc
docs: improve docstring formatting in signals.ppg
rafaelscsilva Jun 9, 2026
6a2e8a4
docs: improve docstring formatting in quality
rafaelscsilva Jun 9, 2026
c96dbe2
docs: improve docstring formatting in storage
rafaelscsilva Jun 9, 2026
6cbb33a
docs: improve docstring formatting in features.time
rafaelscsilva Jun 9, 2026
d0809de
docs: remove BCG entry from index.rst
rafaelscsilva Jun 9, 2026
cb3162a
docs: remove BCG plot
rafaelscsilva Jun 9, 2026
f3ed007
docs: add documentation for biosignal types ACC, ECG, EDA, EEG, EGM, …
rafaelscsilva Jun 9, 2026
a2e518b
docs: add new documentation for biosppy modules and functions
rafaelscsilva Jun 9, 2026
832fdb3
docs: migrate to Furo and refine theme styling
rafaelscsilva Jun 1, 2026
beb206c
docs: add sphinx_copybutton extension and update requirements
rafaelscsilva Jun 1, 2026
2fd3c4f
docs: update logo paths for light and dark themes
rafaelscsilva Jun 1, 2026
ae12214
docs: update documentation to use autosummary for module listings
rafaelscsilva Jun 3, 2026
bc88e34
Update docs/images for ECG
rafaelscsilva Jun 3, 2026
56e1087
docs: add ReturnTuple documentation to explain its usage and benefits
rafaelscsilva Jun 3, 2026
f211eee
docs: rename tutorial.rst to gettingstarted.rst and enhance content f…
rafaelscsilva Jun 3, 2026
b0bb402
docs: rename tutorial.rst to gettingstarted.rst and enhance content f…
rafaelscsilva Jun 3, 2026
e701305
docs: enhance index.rst with detailed BioSPPy features and quick ECG …
rafaelscsilva Jun 4, 2026
22e9f71
docs: add support images and plots of biosignals
rafaelscsilva Jun 4, 2026
5eb3581
docs: migrate to Furo and refine theme styling
rafaelscsilva Jun 1, 2026
c3b3365
docs: update logo paths for light and dark themes
rafaelscsilva Jun 1, 2026
688b092
docs: update documentation to use autosummary for module listings
rafaelscsilva Jun 3, 2026
0470375
docs: rename tutorial.rst to gettingstarted.rst and enhance content f…
rafaelscsilva Jun 3, 2026
c47d45c
docs: enhance index.rst with detailed BioSPPy features and quick ECG …
rafaelscsilva Jun 4, 2026
5700501
docs: add how to cite BioSPPy in howtocite.rst and update index.rst
rafaelscsilva Jun 9, 2026
fccf068
docs: add contributing guidelines and update index.rst
rafaelscsilva Jun 9, 2026
15009d3
update ecg.png in plots
rafaelscsilva Jun 9, 2026
8d32267
docs: update MOCK_MODULES to include 'scipy.fft' and 'pyvista'
rafaelscsilva Jun 9, 2026
4ce97fe
docs: add biosppy.signals.egm to the signals documentation
rafaelscsilva Jun 9, 2026
972500c
docs: add biosppy.spatial documentation and include in biosppy.rst
rafaelscsilva Jun 9, 2026
4959414
docs: improve docstring formatting in bvp
rafaelscsilva Jun 9, 2026
844f8e8
docs: improve docstring formatting in ecg
rafaelscsilva Jun 9, 2026
1f95a5d
docs: improve docstring formatting in synthesizers.ecg
rafaelscsilva Jun 9, 2026
01918b5
docs: improve docstring formatting in signals.ecg
rafaelscsilva Jun 9, 2026
d34493d
docs: improve docstring formatting in signals.eeg
rafaelscsilva Jun 9, 2026
6211d86
docs: improve docstring formatting in signals.egm
rafaelscsilva Jun 9, 2026
bd47cc9
docs: improve docstring formatting in synthesizers.emg
rafaelscsilva Jun 9, 2026
2cabc89
docs: improve docstring formatting in signals.ppg
rafaelscsilva Jun 9, 2026
ce51f37
docs: improve docstring formatting in quality
rafaelscsilva Jun 9, 2026
969e2c1
docs: improve docstring formatting in storage
rafaelscsilva Jun 9, 2026
46009bf
docs: improve docstring formatting in features.time
rafaelscsilva Jun 9, 2026
f8a2140
docs: remove BCG entry from index.rst
rafaelscsilva Jun 9, 2026
03874c0
docs: remove BCG plot
rafaelscsilva Jun 9, 2026
aa877a2
docs: add documentation for biosignal types ACC, ECG, EDA, EEG, EGM, …
rafaelscsilva Jun 9, 2026
f307df9
docs: add new documentation for biosppy modules and functions
rafaelscsilva Jun 9, 2026
995b90e
Merge remote-tracking branch 'origin/doc_upgrade' into doc_upgrade
rafaelscsilva Jun 9, 2026
c42240e
docs: add machine learning documentation and update index references
rafaelscsilva Jun 9, 2026
5be4931
docs: add machine learning documentation and update index references
rafaelscsilva Jun 9, 2026
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
46 changes: 23 additions & 23 deletions biosppy/features/time.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,29 @@
def time(signal=None, sampling_rate=1000., include_diff=True):
"""Compute various time metrics describing the signal.

Parameters
----------
signal : array
Input signal.
sampling_rate : int, float, optional
Sampling Rate (Hz).
include_diff : bool, optional
Whether to include the features of the signal's differences (first, second and absolute).

Returns
-------
feats : ReturnTuple object
Time features of the signal.

Notes
-----
Besides the features directly extracted in this function, it also calls:
- biosppy.signals.tools.signal_stats
- biosppy.stats.quartiles
- biosppy.stats.histogram
- biosppy.features.time.hjorth_features

"""
Parameters
----------
signal : array
Input signal.
sampling_rate : int, float, optional
Sampling Rate (Hz).
include_diff : bool, optional
Whether to include the features of the signal's differences (first, second and absolute).

Returns
-------
feats : ReturnTuple object
Time features of the signal.

Notes
-----
Besides the features directly extracted in this function, it also calls:
- biosppy.signals.tools.signal_stats
- biosppy.stats.quartiles
- biosppy.stats.histogram
- biosppy.features.time.hjorth_features

"""

# check inputs
if signal is None:
Expand Down
47 changes: 24 additions & 23 deletions biosppy/quality.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,24 @@
def quality_eda(x=None, methods=['bottcher'], sampling_rate=None, verbose=1):
"""Compute the quality index for one EDA segment.

Parameters
----------
x : array
Input signal to test.
methods : list
Method to assess quality. One or more of the following: 'bottcher'.
sampling_rate : int
Sampling frequency (Hz).
verbose : int
If 1, a commentary is printed regarding the quality of the signal and details of the function. Default is 1.

Returns
-------
args : tuple
Tuple containing the quality index for each method.
names : tuple
Tuple containing the name of each method.
"""
Parameters
----------
x : array
Input signal to test.
methods : list
Method to assess quality. One or more of the following: 'bottcher'.
sampling_rate : int
Sampling frequency (Hz).
verbose : int
If 1, a commentary is printed regarding the quality of the signal and details of the function. Default is 1.

Returns
-------
args : tuple
Tuple containing the quality index for each method.
names : tuple
Tuple containing the name of each method.
"""
# check inputs
if x is None:
raise TypeError("Please specify the input signal.")
Expand Down Expand Up @@ -71,7 +71,6 @@ def quality_ecg(segment, methods=['Level3'], sampling_rate=None,
fisher=True, f_thr=0.01, threshold=0.9, bit=0,
nseg=1024, num_spectrum=[5, 20], dem_spectrum=None,
mode_fsqi='simple', verbose=1):

"""Compute the quality index for one ECG segment.

Parameters
Expand Down Expand Up @@ -130,10 +129,8 @@ def quality_ecg(segment, methods=['Level3'], sampling_rate=None,


def ecg_sqi_level3(segment, sampling_rate, threshold, bit):

"""Compute the quality index for one ECG segment. The segment should have 10 seconds.


Parameters
----------
segment : array
Expand Down Expand Up @@ -223,24 +220,27 @@ def eda_sqi_bottcher(x=None, sampling_rate=None, verbose=1): # -> Timeline


def cSQI(rpeaks=None, verbose=1):
"""For the ECG signal
Calculate the Coefficient of Variation of RR Intervals (cSQI).
"""For the ECG signal, calculate the Coefficient of Variation of RR Intervals (cSQI).

Parameters
----------
rpeaks : array-like
Array containing R-peak locations. Should be filtered? How many seconds are adequate?
verbose : int
If 1, a commentary is printed regarding the quality of the signal and details of the function. Default is 1.

Returns
-------
cSQI : float
Coefficient of Variation of RR Intervals. cSQI - best near 0

References
----------
.. [Zhao18] Zhao, Z., & Zhang, Y. (2018).
SQI quality evaluation mechanism of single-lead ECG signal based on simple heuristic fusion and fuzzy comprehensive evaluation.
Frontiers in Physiology, 9, 727.
"""

if rpeaks is None:
raise TypeError("Please specify the R-peak locations.")

Expand Down Expand Up @@ -269,6 +269,7 @@ def cSQI(rpeaks=None, verbose=1):
def hosSQI(signal=None, quantitative=False, verbose=1):
"""For the ECG signal.
Calculate the Higher-order-statistics-SQI (hosSQI).

Parameters
----------
signal : array-like
Expand Down
2 changes: 2 additions & 0 deletions biosppy/signals/bvp.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
def bvp(signal=None, sampling_rate=1000., path=None, show=True):
"""Process a raw BVP signal and extract relevant signal features using
default parameters.

Parameters
----------
signal : array
Expand All @@ -41,6 +42,7 @@ def bvp(signal=None, sampling_rate=1000., path=None, show=True):
If provided, the plot will be saved to the specified file.
show : bool, optional
If True, show a summary plot.

Returns
-------
ts : array
Expand Down
Loading