Describe the bug
A colleague and I realized that the waveform_width function doesn't work well for recordings where the action potential is a upward deflection and then a downward one because the code looks for the trough first, then to the next peak.

Therefore, we would suggest having an extension of the function which is flexible to the 2 possible scenarios (trough to peak or peak to trough).
@rsankar9 feel free to expand on this explanation!
Environment
- OS (e.g., Linux): Windows and Mac
- How you installed elephant (
conda, pip, source): pip
- Python version: 3.9
neo python package version: 0.10.0
elephant python package version: 0.10.0
Describe the bug
A colleague and I realized that the waveform_width function doesn't work well for recordings where the action potential is a upward deflection and then a downward one because the code looks for the trough first, then to the next peak.
Therefore, we would suggest having an extension of the function which is flexible to the 2 possible scenarios (trough to peak or peak to trough).
@rsankar9 feel free to expand on this explanation!
Environment
conda,pip, source): pipneopython package version: 0.10.0elephantpython package version: 0.10.0