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

Inconsistency RRV_DFA_alpha1/alpha2 definitions and implementation? #1038

Open
michielmeys opened this issue Oct 4, 2024 · 3 comments
Open

Comments

@michielmeys
Copy link

The implementation of when RRV_DFA_alpha1 and RRV_DFA_alpha2 are computed (within neurokit2/rsp/rsp_rrv.py; lines 224 to 241) appears inconsistent with their definitions within the documentation/this function's docstring. Currently, the long-term fluctuation value is computed before even the threshold of the short-term value is reached, for more than 65 cycles, rather than 640.

Could this be verified?

Copy link

welcome bot commented Oct 4, 2024

Hi 👋 Thanks for reaching out and opening your first issue here! We'll try to come back to you as soon as possible. ❤️ kenobi

@DominiqueMakowski
Copy link
Member

Could you clarify what you mean? And could you help letting us know what you would change (in the docs or the code)

@michielmeys
Copy link
Author

Sorry for the lack of clarity. It just appears that DFA_alpha2 can currently be computed for breathing recordings that are too short (too few breathing cycles) according to this measure's definition (there should be at least 640).
To be consistent with the docs, I think it would suffice to change line 234 from if len(bbi) > 65: to if len(bbi) > 640: (or to if len(bbi) / 10 > 64:, similar to how it is written for DFA_alpha1 in line 225, for a reason I don't really understand).

I was hesitant to suggest a concrete change since I'm not really familiar with these measures and I am just raising this point based on what I noticed. Apologies for that, and please let me know if I'm still not clear.

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

No branches or pull requests

2 participants