NeuroKit
NeuroKit copied to clipboard
`eda_plot` throws ValueError when the number of onsets is not the same as the number of peaks
Describe the bug
eda_plot
throws ValueError
when the number of onsets is not the same as the number of peaks because of the sentence
https://github.com/neuropsychology/NeuroKit/blob/c1104386655724a5c624e740abf651c939fc5e48/neurokit2/eda/eda_plot.py#L114
To Reproduce
- Get a signal with a peak without an onset, like
[0.0,
0.180624,
0.217774,
0.25108,
0.228022,
0.226741,
0.226741,
0.219055,
0.217774,
0.21265]
- Process it without cleaning like in #554 (I'm also using an Empatica E4)
- Try to plot the resulting signals with
eda_plot()
- See error
Expected behaviour I would expect one of the following:
- that in this case, eda_plot would simply not plot the first onset.
- that it warns that the specific fact that there is a peak without an onset is a problem.
System Specifications
-
OS: Linux (ELF 64bit)
-
Python: 3.10.2
-
NeuroKit2: 0.1.7
-
NumPy: 1.22.3
-
Pandas: 1.4.1
-
SciPy: 1.8.0
-
sklearn: 1.0.2
-
matplotlib: 3.5.1
Hi 👋 Thanks for reaching out and opening your first issue here! We'll try to come back to you as soon as possible. ❤️
that in this case, eda_plot would simply not plot the first onset.
Yes we should go ahead with this option, I don't think there is a need for a warning.
Would you mind opening another PR with a fix? Thanks a lot!
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.
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.