Skip to content

Commit

Permalink
Added **kwargs to individual.data_analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
Aminsinichi committed Oct 17, 2024
1 parent 3e376df commit fdb4f00
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
8 changes: 2 additions & 6 deletions ChANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,11 @@ All notable changes to wearablehrv will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [0.2.1] - 2024-10-17

### Added

-

### Fixed

-
- Added **kwargs to `individual.data_analysis()` function, so more inputs can be passed in to it.

## [0.1.13] - 2024-03-19

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="wearablehrv",
version="0.2.0",
version="0.2.1",
author="Amin Sinichi",
author_email="[email protected]",
description="Wearablehrv: A Python package for the validation of heart rate and heart rate variability in wearables.",
Expand Down
2 changes: 1 addition & 1 deletion wearablehrv/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#### A Python package designed for data preparation, pre-processing, feature exctraction, comparison, visualization, and statistical individual/group analysis of heart rate and heart rate variability outcome variables recorded from wearable devices that transmit raw interbeat intervals to a host device via Bluetooth.
############################ Wearablehrv ############################

__version__ = "0.2.0"
__version__ = "0.2.1"

from . import individual
from . import group
Expand Down
5 changes: 3 additions & 2 deletions wearablehrv/individual.py
Original file line number Diff line number Diff line change
Expand Up @@ -1476,7 +1476,7 @@ def update_plot(*args):
###########################################################################


def data_analysis(data_pp, devices, conditions):
def data_analysis(data_pp, devices, conditions, **kwargs):
"""
Calculates time domain and frequency domain HRV (Heart Rate Variability) features for pre-processed RR interval data
using the hrvanalysis package.
Expand All @@ -1495,6 +1495,7 @@ def data_analysis(data_pp, devices, conditions):
A list of strings representing the different devices used to collect the RR interval data.
conditions : list of str
A list of strings representing the different conditions under which the RR interval data was collected.
**kwargs : Additional keyword arguments to be passed to the HRV analysis functions, such as 'hf_band'.
Returns
-------
Expand Down Expand Up @@ -1529,7 +1530,7 @@ def data_analysis(data_pp, devices, conditions):
data_pp[device][condition]
)
frequency_domain_features[device][condition] = (
get_frequency_domain_features(data_pp[device][condition])
get_frequency_domain_features(data_pp[device][condition],**kwargs)
)
except:
print(
Expand Down

0 comments on commit fdb4f00

Please sign in to comment.