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

Setting fbands without ulf crashes the welch method #42

Open
GGChe opened this issue Sep 7, 2023 · 0 comments
Open

Setting fbands without ulf crashes the welch method #42

GGChe opened this issue Sep 7, 2023 · 0 comments

Comments

@GGChe
Copy link

GGChe commented Sep 7, 2023

I am using python 3.10.2 under windows 10. I am trying to change the frequency bands of the pyhrv welch method and I am getting an UnbondLocalError.

import pyhrv
rr = [1,2,3,4,5,6,7,8,9,10]
pyhrv.frequency_domain.welch_psd(rr, fbands={'vlf': (0.003, 0.04), 'lf': (0.04, 0.15), 'hf': (0.15, 0.4)})

Error obtained:

>>> pyhrv.frequency_domain.welch_psd(rr, fbands={'vlf': (0.003, 0.04), 'lf': (0.04, 0.15), 'hf': (0.15, 0.4)})
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\ggaleote\Documents\git\sinus-rhythms-pathologies\.venv\lib\site-packages\pyhrv\frequency_domain.py", line 159, in welch_psd
    fbands = _check_freq_bands(fbands)
  File "C:\Users\ggaleote\Documents\git\sinus-rhythms-pathologies\.venv\lib\site-packages\pyhrv\frequency_domain.py", line 700, in _check_freq_bands
    args_.append(ulf)
UnboundLocalError: local variable 'ulf' referenced before assignment
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

1 participant