elephant icon indicating copy to clipboard operation
elephant copied to clipboard

[Fix] #613 spike_train_generation module to handle multichannel AnalogSignal inputs

Open Moritz-Alexander-Kern opened this issue 1 year ago • 1 comments

This PR closes #613.

This PR changes the handling of neo.AnalogSignals in elephant.spike_train_generation module.

  1. Type Annotations: Improved code readability with type annotations.

  2. Multichannel Support: handling of analog signals with multiple channels in spike_extraction, threshold_detection, and peak_detection.

  3. New Parameter: always_as_list: Ensures a consistent list output of SpikeTrains, even with single-channel input.

  4. Unit Tests: testing for various input types and values to validate reliability, and multichannel AnalogSignals

  5. Input Checks: Enhanced to catch errors related to incorrect input types.

todo:

  • [x] return SpikeTrainList instead of List [SpikeTrain]
  • [x] handle empty AnalogSignal

Moritz-Alexander-Kern avatar Jan 19 '24 21:01 Moritz-Alexander-Kern

Coverage Status

coverage: 88.391% (+0.1%) from 88.264% when pulling 51c9da3b19c38705ea0df0fd211c74251428a90b on INM-6:fix/#613_spike_train_generation_peak_detection into fe5053a52a3aaa5c86d9a9c61f72de14b364df1a on NeuralEnsemble:master.

coveralls avatar Jan 19 '24 21:01 coveralls