Open dommrichmond opened 11 months ago
Hi 👋 Thanks for reaching out and opening your first issue here! We'll try to come back to you as soon as possible. ❤️
This is not an error but just a warning that some indices will not be calculated due to the short recordings
Oops, my bad I forgot to paste everything. Following the warning, there is this error:
warn(
Traceback (most recent call last):
File "C:\Users\domin\Documents\Dom\Misc\HRV\HRV.py", line 109, in <module>
results = nk.ecg_analyze(epochs,sampling_rate=100)
File "C:\Users\domin\Documents\Dom\Misc\HRV\venv\lib\site-packages\neurokit2\ecg\ecg_analyze.py", line 116, in ecg_analyze
features = ecg_intervalrelated(data, sampling_rate=sampling_rate)
File "C:\Users\domin\Documents\Dom\Misc\HRV\venv\lib\site-packages\neurokit2\ecg\ecg_intervalrelated.py", line 83, in ecg_intervalrelated
intervals[index] = _ecg_intervalrelated_hrv(
File "C:\Users\domin\Documents\Dom\Misc\HRV\venv\lib\site-packages\neurokit2\ecg\ecg_intervalrelated.py", line 128, in _ecg_intervalrelated_hrv
results = hrv(rpeaks, sampling_rate=sampling_rate)
File "C:\Users\domin\Documents\Dom\Misc\HRV\venv\lib\site-packages\neurokit2\hrv\hrv.py", line 107, in hrv
out.append(hrv_nonlinear(peaks, sampling_rate=sampling_rate))
File "C:\Users\domin\Documents\Dom\Misc\HRV\venv\lib\site-packages\neurokit2\hrv\hrv_nonlinear.py", line 236, in hrv_nonlinear
out["ApEn"], _ = entropy_approximate(rri, delay=1, dimension=2, tolerance=tolerance)
File "C:\Users\domin\Documents\Dom\Misc\HRV\venv\lib\site-packages\neurokit2\complexity\entropy_approximate.py", line 100, in entropy_approximate
out, _ = _entropy_apen(signal, delay, dimension, info["Tolerance"], **kwargs)
File "C:\Users\domin\Documents\Dom\Misc\HRV\venv\lib\site-packages\neurokit2\complexity\optim_complexity_tolerance.py", line 363, in _entropy_apen
phi, info = _phi(
File "C:\Users\domin\Documents\Dom\Misc\HRV\venv\lib\site-packages\neurokit2\complexity\utils.py", line 29, in _phi
embedded1, count1, kdtree1 = _get_count(
File "C:\Users\domin\Documents\Dom\Misc\HRV\venv\lib\site-packages\neurokit2\complexity\utils.py", line 115, in _get_count
valid_metrics = sklearn.neighbors.KDTree.valid_metrics() + ["range"]
TypeError: 'list' object is not callable
Any ideas on the above?
Yes, please update neurokit to the dev version and it should be fixed!
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.
Creating an ecg signal and using ecg analyze results in an error in Neurokit2 (Version 0.2.6)