|
| 1 | +======================== |
| 2 | +Neo 0.13.0 release notes |
| 3 | +======================== |
| 4 | + |
| 5 | +??? February 2024 |
| 6 | + |
| 7 | + |
| 8 | +This release of Neo sees a lot of changes and improvements, with a documentation rewrite, |
| 9 | +final tweaks and refinements to the object model (in anticipation of a 1.0 release in the next few months), |
| 10 | +a new approach to filtering objects of interest from complex datasets, |
| 11 | +and a large number of bug fixes and performance improvements in IO modules. |
| 12 | +23 people contributed to this release, which is a new record for Neo! |
| 13 | + |
| 14 | +See all `pull requests`_ included in this release and the `list of closed issues`_. |
| 15 | + |
| 16 | + |
| 17 | +Refinements to the Neo object model |
| 18 | +----------------------------------- |
| 19 | + |
| 20 | +In order to simplify the structure of Neo datasets, and make a clearer distinction between the Block-Segment-data |
| 21 | +hierarchy and the more flexible data-grouping functionality, we no longer allow Groups to contain Segments. |
| 22 | + |
| 23 | +We have made the handling of RegionOfInterest subclasses consistent with :class:`ChannelView`, |
| 24 | +i.e., just as a :class:`ChannelView` gives a view of a subset of the channels in a multi-channel :class:`AnalogSignal`, |
| 25 | +so the :class:`RegionOfInterest`` subclasses give views of a subset of the pixels in an :class:`ImageSequence`. |
| 26 | + |
| 27 | +Neo now has automatic handling of relationships between objects. |
| 28 | +In previous versions, the child-parent relationships between objects had to be handled manually, |
| 29 | +for example when you added a :class:`SpikeTrain` to a :class:`Segment`, this created a parent-child relationship, |
| 30 | +but the reverse child-parent relationship was not automatically created, leading to potential inconsistencies. |
| 31 | +Now these relationships are created automatically, as the various child lists |
| 32 | +(``Segment.spiketrains``, ``Segment.analogsignals``, ``Block.segments``, etc.) |
| 33 | +are now represented by pseudo-list objects which take care of the book-keeping behind the scenes. |
| 34 | + |
| 35 | +As a convenience, all Neo containers (:class:`Block`, :class:`Segment`, :class:`Group`) |
| 36 | +now have an :meth:`add()` method that automatically puts the object in the correct list, for example:: |
| 37 | + |
| 38 | + segment.add(signal1, event2, spiketrain3) |
| 39 | + |
| 40 | +instead of:: |
| 41 | + |
| 42 | + segment.analogsignals.append(signal1) |
| 43 | + segment.events.append(event2) |
| 44 | + segment.spiketrains.append(spiketrain3) |
| 45 | + |
| 46 | + |
| 47 | +Documentation rewrite and new theme |
| 48 | +----------------------------------- |
| 49 | + |
| 50 | +The Neo documentation has had a complete overhaul, |
| 51 | +with a rewrite aimed at providing different entry points to the documentation for different_ user_ needs_, |
| 52 | +using the Sphinx IPython extension to ensure code snippets are always up-to-date, |
| 53 | +and a switch to the `PyData Sphinx theme`_. |
| 54 | + |
| 55 | +Improved filtering |
| 56 | +------------------ |
| 57 | + |
| 58 | +For complex datasets, it is often necessary to extract subsets of the data from a Neo object tree by filtering |
| 59 | +based on object types, names, and annotations. |
| 60 | +Neo's filtering capabilities have been improved, with the addition of a new :mod:`filters` module. |
| 61 | + |
| 62 | +For example, suppose we have a dataset from an animal performing a behavioural task. |
| 63 | +Our objective is to retain only the trials where the animal performed correctly, |
| 64 | +for one of the four trial types in the experiment, and where the recordings met certain quality criteria. |
| 65 | +Based on an annotated Neo dataset, we can extract the spike trains of interest in a single step, |
| 66 | +without for loops or complex list comprehensions, as follows: |
| 67 | + |
| 68 | +.. code-block:: python |
| 69 | +
|
| 70 | + import neo.core.filters as nf |
| 71 | +
|
| 72 | + # ... load data, `trial` is a Segment object ... |
| 73 | +
|
| 74 | + sua_spiketrains = trial.filter( |
| 75 | + objects=neo.SpikeTrain, |
| 76 | + targdict=[ |
| 77 | + {"sua": True}, # only single-unit activity |
| 78 | + {"electrode_reject_HFC": False}, # } exclude different types |
| 79 | + {"electrode_reject_LFC": False}, # } of artefacts |
| 80 | + {"electrode_reject_IFC": False}, # } or markers of poor-quality |
| 81 | + {"noise": False}, # } recordings |
| 82 | + {"spike_count": nf.FilterGreaterThan(10000)} # only use neurons with a sufficiently high firing rate |
| 83 | + ] |
| 84 | + ) |
| 85 | +
|
| 86 | +New IO modules |
| 87 | +-------------- |
| 88 | + |
| 89 | +Neo now supports MED_ format, with the new :class`MedIO` and :class:`MedRawIO` classes. |
| 90 | + |
| 91 | + |
| 92 | +Bug fixes and improvements in IO modules |
| 93 | +---------------------------------------- |
| 94 | + |
| 95 | +Bug fixes and/or improvements have been made to :class:`AsciiSignalIO`, :class:`BCI2000IO`, :class:`BiocamIO`, |
| 96 | +:class:`BlackrockIO`, :class:`IgorIO`, :class:`IntanIO`, :class:`KlustaKwikIO`, :class:`MaxwellIO`, :class:`MEArecIO`, |
| 97 | +:class:`NeoMatlabIO`, :class:`NeuralynxIO`, :class:`NixIO`, :class:`NWBIO`, :class:`OpenEphysIO`, :class:`PlexonIO`, |
| 98 | +:class:`Plexon2IO`, :class:`SpikeGLXIO`, and :class:`TdtIO`. |
| 99 | + |
| 100 | +Other changes |
| 101 | +------------- |
| 102 | + |
| 103 | +- RawIO classes have a method :meth:`parse_header` that extracts all the information from the formats |
| 104 | + and therefore is usually a computational heavy process. |
| 105 | + A flag ``is_header_parsed`` has now been added, to avoid re-extracting the header information |
| 106 | + if it is already available. This can produce significant speed ups. |
| 107 | + |
| 108 | +- Type hints have been added to the :mod:`baseio`, :mod:`baserawio`, and :mod:`exampleio` modules, |
| 109 | + with the aim of helping developers who wish to add a new IO module. |
| 110 | + |
| 111 | +- All of the code is now formatted with black_. |
| 112 | + |
| 113 | +- The continuous integration (CI) pipeline has been speeded up. |
| 114 | + |
| 115 | + |
| 116 | +Updated dependencies |
| 117 | +-------------------- |
| 118 | + |
| 119 | +Neo now requires NumPy version >=1.20.3. |
| 120 | + |
| 121 | + |
| 122 | +Acknowledgements |
| 123 | +---------------- |
| 124 | + |
| 125 | +Thanks to Julia Sprenger, Andrew Davison, Zach McKenzie, Alessio Buccino, Moritz Alexander Kern, |
| 126 | +Samuel Garcia, Heberto Mayorquin, Joscha Schmiedt, Daniel Crepeau, Divyansh Gupta, Nate Dolensek, |
| 127 | +Peter N. Steinmetz, @hornauerp, Robert Wolff, Jules Lebert, Kyle Johnsen, Benjamin Heasly, |
| 128 | +Baptiste Grimaud, Cody Baker, Daniel P. Crepeau, Fernando J. Chaure, @Filipe, and Matthias Klumpp |
| 129 | +for their contributions to this release. |
| 130 | + |
| 131 | +.. generated with git shortlog --since=2023-02-17 -sne then checking Github for PRs merged since the last release but with commits before then |
| 132 | +
|
| 133 | +.. _`list of closed issues`: https://github.com/NeuralEnsemble/python-neo/issues?q=is%3Aissue+milestone%3A0.13.0+is%3Aclosed |
| 134 | +.. _`pull requests`: https://github.com/NeuralEnsemble/python-neo/pulls?q=is%3Apr+is%3Aclosed+merged%3A%3E2023-02-17+milestone%3A0.13.0 |
| 135 | +.. _`latest recommendations`: https://packaging.python.org/en/latest/ |
| 136 | +.. _black: https://black.readthedocs.io |
| 137 | +.. _`PyData Sphinx theme`: https://pydata-sphinx-theme.readthedocs.io |
| 138 | +.. _MED: https://medformat.org |
| 139 | +.. _different: https://neo.readthedocs.io/en/latest/read_and_analyze.html |
| 140 | +.. _user: https://neo.readthedocs.io/en/latest/share_data.html |
| 141 | +.. _needs: https://neo.readthedocs.io/en/latest/use_neo_as_dependency.html |
0 commit comments