Closed RichardBJ closed 1 year ago
Hi @RichardBJ thanks for this! I submitted a PR (https://github.com/neuropsychology/NeuroKit/pull/800) and tested the new version of the code with your data: https://gist.github.com/danibene/abbc76fdf6d3b447a216b1d69f791325
Running HRV analysis (frequency) with the Lomb method, including unevenly spaced data. I fully appreciate it could be my inputs, but in that case perhaps the doc string could be spelt out more.
Yes, to have the RRI intervals and their timestamps as input, the first argument needed to be a dictionary containing both the R-R intervals and their timestamps with the keys RRI
and RRI_Time
, rather than using t
as a separate argument
Any suggestions for how to improve would be appreciated :) thanks again!
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Describe the bug Running HRV analysis (frequency) with the Lomb method, including unevenly spaced data. I fully appreciate it could be my inputs, but in that case perhaps the doc string could be spelt out more.
error log (the message related to the error). I've tried many different attempts and so different errors, but for example:
ValueError: NeuroKit error: _hrv_sanitize_input(): The peak indices passed were detected as non-consecutive. You might have passed RR intervals instead of peaks. If so, convert RRIs into peaks using nk.intervals_to_peaks().
To Reproduce Some data: rrs.xlsx So this works:BUT this does not:
Expected behaviour would expect a periodograph produced, as with astropy, but prettier. So to confirm; works with a Welch and with astropy's lomb, but not my unevenly spaced lomb. Could be the way I am calling the function, but I have tried several different methods.
System Specifications iMac: Python 3.9?