elephant icon indicating copy to clipboard operation
elephant copied to clipboard

[Bug] Spike-width computation

Open E4-IMN opened this issue 2 years ago • 1 comments

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.

image

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

E4-IMN avatar Sep 14 '22 16:09 E4-IMN

Hello @E4-IMN ,

thanks a lot for reporting this.

Looking at the provided plot I agree with you. Are you already working on an extension ?

In any case, the development of an extension to this function could benefit from some examples to reproduce the behavior shown above. In case you have some more examples, please do not hesitate to share.

Moritz-Alexander-Kern avatar Sep 16 '22 15:09 Moritz-Alexander-Kern