0.9.0.rst 4.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. =======================
  2. Neo 0.9.0 release notes
  3. =======================
  4. 10th November 2020
  5. Group and ChannelView replace Unit and ChannelIndex
  6. ---------------------------------------------------
  7. Experience with :class:`ChannelIndex` and :class:`Unit` has shown that these classes are
  8. often confusing and difficult to understand.
  9. In particular, :class:`ChannelIndex` was trying to provide three different functionalities in a
  10. single object:
  11. - providing information about individual traces within :class:`AnalogSignals` like the channel id and the channel name (labelling)
  12. - grouping a subset of traces within an :class:`AnalogSignal` via the ``index`` attribute (masking)
  13. - linking between / grouping :class:`AnalogSignals` (grouping)
  14. while grouping :class:`SpikeTrains` required a different class, :class:`Unit`.
  15. For more pointers to the difficulties this created, and some of the limitations of this approach,
  16. see `this Github issue`_.
  17. With the aim of making the three functionalities of labelling, masking and grouping
  18. both easier to use and more flexible, we have replaced :class:`ChannelIndex` and :class:`Unit`
  19. with:
  20. - array annotations (*labelling*) - already available since Neo 0.8
  21. - :class:`~neo.core.ChannelView` (*masking*) - defines subsets of channels within an `AnalogSignal` using a mask
  22. - :class:`~neo.core.Group` (*grouping*) - allows any Neo object except :class`Segment` and :class:`Block` to be grouped
  23. For some guidance on migrating from :class:`ChannelIndex`/:class:`Unit`
  24. to :class:`Group` and :class:`ChannelView` see :doc:`../grouping`.
  25. Python 3 only
  26. -------------
  27. We have now dropped support for Python 2.7 and Python 3.5, and for versions of NumPy older than 1.13.
  28. In future, we plan to follow NEP29_ + one year, i.e. we will support Python and NumPy versions
  29. for one year longer than recommended in NEP29. This was `discussed here`_.
  30. Change in default behaviour for grouping channels in IO modules
  31. ---------------------------------------------------------------
  32. Previously, when reading multiple related signals (same length, same units) from a file,
  33. some IO classes would by default create a separate, single-channel :class:`AnalogSignal` per signal,
  34. others would combine all related signals into one multi-channel :class:`AnalogSignal`.
  35. From Neo 0.9.0, the default for all IO classes is to create a one multi-channel :class:`AnalogSignal`.
  36. To get the "multiple single-channel signals" behaviour, use::
  37. io.read(signal_group_mode="split-all")
  38. Other new or modified features
  39. ------------------------------
  40. * added methods :func:`rectify()`, :func:`downsample` and :func:`resample` to :class:`AnalogSignal`
  41. * :func:`SpikeTrain.merge()` can now merge multiple spiketrains
  42. * the utility function :func:`cut_block_by_epochs()` gives a new :class:`Block` now
  43. rather than modifying the block in place
  44. * some missing properties such as ``t_start`` were added to :class:`ImageSequence`,
  45. and ``sampling_period`` was renamed to ``frame_duration``
  46. * :func:`AnalogSignal.time_index()` now accepts arrays of times, not just a scalar.
  47. See all `pull requests`_ included in this release and the `list of closed issues`_.
  48. Bug fixes and improvements in IO modules
  49. ----------------------------------------
  50. * NeoMatlabIO (support for signal annotations)
  51. * NeuralynxIO (fix handling of empty .nev files)
  52. * AxonIO (support EDR3 header, fix channel events bug)
  53. * Spike2IO (fix rounding problem, fix for v9 SON files)
  54. * MicromedIO (fix label encoding)
  55. Acknowledgements
  56. ----------------
  57. Thanks to Julia Sprenger, Samuel Garcia, Andrew Davison, Alexander Kleinjohann, Hugo van Kemenade,
  58. Achilleas Koutsou, Jeffrey Gill, Corentin Fragnaud, Aitor Morales-Gregorio, Rémi Proville,
  59. Robin Gutzen, Marin Manuel, Simon Danner, Michael Denker, Peter N. Steinmetz, Diziet Asahi and
  60. Lucien Krapp for their contributions to this release.
  61. .. _`list of closed issues`: https://github.com/NeuralEnsemble/python-neo/issues?q=is%3Aissue+milestone%3A0.9.0+is%3Aclosed
  62. .. _`pull requests`: https://github.com/NeuralEnsemble/python-neo/pulls?q=is%3Apr+is%3Aclosed+merged%3A%3E2019-09-30+milestone%3A0.9.0
  63. .. _NEP29: https://numpy.org/neps/nep-0029-deprecation_policy.html
  64. .. _`discussed here`: https://github.com/NeuralEnsemble/python-neo/issues/788
  65. .. _`this Github issue`: https://github.com/NeuralEnsemble/python-neo/issues/456