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

Add HRV to statistics panel #28

Open
JanCBrammer opened this issue Jul 29, 2024 · 1 comment
Open

Add HRV to statistics panel #28

JanCBrammer opened this issue Jul 29, 2024 · 1 comment
Labels

Comments

@JanCBrammer
Copy link
Owner

No description provided.

@chandlermassey4
Copy link

chandlermassey4 commented Jul 29, 2024

It would be useful to add an option to generate a list of HRV features under the statistics tab, or create a new features tab. An option could be added to export this list of features as a '.csv' file.

It is very easy to generate these features from the peaks file which is already included in the GUI by using neurokit2.

# Read the peaks file
df = pd.read_csv(input_file)
rpeaks = df['peaks'].values

# Convert R peak times to sample indices
sampling_rate =250
rpeaks_indices = (rpeaks * sampling_rate).astype(int)

# Generate HRV values
hrv = nk.hrv(rpeaks_indices, sampling_rate=sampling_rate, show=True)

The main goal for many users is often to use the peak intervals to generate HRV features, so this would make the process more efficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants