Neo 0.9.0 release notes

10th November 2020

Group and ChannelView replace Unit and ChannelIndex

Experience with ChannelIndex and Unit has shown that these classes are often confusing and difficult to understand. In particular, ChannelIndex was trying to provide three different functionalities in a single object:

  • providing information about individual traces within AnalogSignals like the channel id and the channel name (labelling)

  • grouping a subset of traces within an AnalogSignal via the index attribute (masking)

  • linking between / grouping AnalogSignals (grouping)

while grouping SpikeTrains required a different class, Unit. For more pointers to the difficulties this created, and some of the limitations of this approach, see this Github issue.

With the aim of making the three functionalities of labelling, masking and grouping both easier to use and more flexible, we have replaced ChannelIndex and Unit with:

  • array annotations (labelling) - already available since Neo 0.8

  • ChannelView (masking) - defines subsets of channels within an AnalogSignal using a mask

  • Group (grouping) - allows any Neo object except :class`Segment` and Block to be grouped

For some guidance on migrating from ChannelIndex/Unit to Group and ChannelView see Grouping and linking data.

Python 3 only

We have now dropped support for Python 2.7 and Python 3.5, and for versions of NumPy older than 1.13. In future, we plan to follow NEP29 + one year, i.e. we will support Python and NumPy versions for one year longer than recommended in NEP29. This was discussed here.

Change in default behaviour for grouping channels in IO modules

Previously, when reading multiple related signals (same length, same units) from a file, some IO classes would by default create a separate, single-channel AnalogSignal per signal, others would combine all related signals into one multi-channel AnalogSignal.

From Neo 0.9.0, the default for all IO classes is to create a one multi-channel AnalogSignal. To get the “multiple single-channel signals” behaviour, use:

io.read(signal_group_mode="split-all")

Other new or modified features

  • added methods rectify(), downsample() and resample() to AnalogSignal

  • SpikeTrain.merge() can now merge multiple spiketrains

  • the utility function cut_block_by_epochs() gives a new Block now rather than modifying the block in place

  • some missing properties such as t_start were added to ImageSequence, and sampling_period was renamed to frame_duration

  • AnalogSignal.time_index() now accepts arrays of times, not just a scalar.

See all pull requests included in this release and the list of closed issues.

Bug fixes and improvements in IO modules

  • NeoMatlabIO (support for signal annotations)

  • NeuralynxIO (fix handling of empty .nev files)

  • AxonIO (support EDR3 header, fix channel events bug)

  • Spike2IO (fix rounding problem, fix for v9 SON files)

  • MicromedIO (fix label encoding)

Acknowledgements

Thanks to Julia Sprenger, Samuel Garcia, Andrew Davison, Alexander Kleinjohann, Hugo van Kemenade, Achilleas Koutsou, Jeffrey Gill, Corentin Fragnaud, Aitor Morales-Gregorio, Rémi Proville, Robin Gutzen, Marin Manuel, Simon Danner, Michael Denker, Peter N. Steinmetz, Diziet Asahi and Lucien Krapp for their contributions to this release.