elephant
elephant copied to clipboard
[Fix] #613 spike_train_generation module to handle multichannel AnalogSignal inputs
This PR closes #613.
This PR changes the handling of neo.AnalogSignals
in elephant.spike_train_generation
module.
-
Type Annotations: Improved code readability with type annotations.
-
Multichannel Support: handling of analog signals with multiple channels in
spike_extraction
,threshold_detection
, andpeak_detection
. -
New Parameter:
always_as_list
: Ensures a consistent list output of SpikeTrains, even with single-channel input. -
Unit Tests: testing for various input types and values to validate reliability, and multichannel AnalogSignals
-
Input Checks: Enhanced to catch errors related to incorrect input types.
todo:
- [x] return SpikeTrainList instead of List [SpikeTrain]
- [x] handle empty AnalogSignal