Debian Codegraph @

docs_sphinx/introduction/release_notes.rst

raw
1 Release notes
2 =============
3
4 Brian 2.10.1
5 ------------
6 This release fixes a bug, where the names of clocks in `~.Group.run_regularly` and
7 `~.Group.run_at` where not necessarily unique, leading to build failures in C++ standalone mode
8 (:issue:`1742`).
9
10 Contributions
11 ~~~~~~~~~~~~~
12 GitHub code, documentation, and issue contributions (ordered by the number of
13 contributions):
14
15 * Marcel Stimberg (`@mstimberg <https://github.com/mstimberg>`_)
16
17
18 Brian 2.10.0
19 ------------
20 New features
21 ~~~~~~~~~~~~
22 - `PopulationRateMonitor` and `SpikeMonitor` now have a unified interface where both can provide
23 smoothed and binned firing rates with `~.RateMonitor.smooth_rate` and
24 `~.RateMonitor.binned_rate` (:issue:`1657`). Thanks to Mrigesh Thakur for implementing this
25 feature.
26 - Supplementing `Group.run_regularly` (which runs code at regular intervals), there is now a
27 `Group.run_at` method to run code at specific time points. Under the hood, it uses a new
28 `EventClock`, which can also be used directly, e.g. in a `StateMonitor` to record values
29 at specific times (:issue:`1602`). Thanks to Samuele De Cristofaro for implementing this
30 feature.
31
32 Selected improvements and bug fixes
33 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34 - The ``run_args`` feature could lead to a `ReferenceError` in some situations (:issue:`1673`).
35 Thanks to Lucas Binder for making us aware of this issue.
36 - The support for the GNU Scientific Library (GSL) was broken in C++ standalone mode
37 (:issue:`1687`), and another bug in our test suite meant that this problem stayed undetected.
38 Thanks to Maurizio De Pitta for making us aware of this issue.
39 - Time measurements (for profiling and for the progress report) were adding significant overhead
40 in C++ standalone mode, and measured processor instead of wall time (:issue:`1718`).
41 Thanks to Mathias Cauwet for contributing to the understanding of this issue.
42 - The ``.device.build(...clean=True)`` functionality was broken on Windows (:issue:`1721`).
43 Thanks to Daniel Müller-Komorowska for making us aware of the issue.
44 - The `~.Network.store`/`~.Network.restore` mechanism did not take into account synaptic delays
45 (:issue:`1726`).
46 - In C++ standalone mode, the default argument for ``make`` on Linux/macOS is no longer ``make -j``,
47 but instead uses the number of CPUs. This avoids using all system resources for big simulations,
48 trying to compile too many files in parallel (:issue:`1727`).
49 - Fewer spurious "unused object" warnings (:issue:`1724`).
50 - Restoring from disk now works regardless of whether the simulation used the Python or Cython
51 version of the spike queue (:issue:`1688`). Thanks to Mrigesh Thakur for contributing this fix.
52
53 Infrastructure and documentation improvements
54 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55 - We've switched our code-formatting and liniting used for pre-commit hooks to
56 `ruff <https://docs.astral.sh/ruff/>`_, which reduces the number of dependencies and makes
57 the pre-commit checks faster (:issue:`1712`).
58 - To be in line with the major packages in the scientific Python ecosystem, we now also follow the
59 `SPEC-0 <https://scientific-python.org/specs/spec-0000/>`_ policy for minimum dependencies
60 (:issue:`1700`).
61 - Various updates to out GitHub actions for testing and package building, making them more secure,
62 robust and faster due to better use of caches.
63 - The Python fallback for the spike queue has been removed, the Cython version is now mandatory.
64 The underlying C++ implementation is now used directly from within the Cython code
65 (:issue:`1649`, :issue:`1643`). Thanks to Mrigesh Thakur for his work on this, as
66 part of this year's Google Summer of Code.
67 - Dynamic arrays are now always using a C++ implementation, instead of having separate
68 implementations in runtime and standalone mode (:issue:`1650`). Thanks to Mrigesh Thakur for this
69 contribution.
70 - Random number and SpikeQueue state are now written to disk at the end of a standalone simulation,
71 preparing a feature to continue previous simulations (:issue:`1720`).
72
73 Backwards-incompatible changes
74 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
75 Due to the removal of the Python fallback for the spike queue, and the use of a compiled
76 dynamic array in runtime mode, Brian can no longer run directly from its source directory without
77 installation. If you downloaded the source code (or cloned the git repository), you will therefore
78 have to install the package before using it; having the ``PYTHONPATH`` point to the source directory
79 is no longer sufficient. During development, you can use an
80 `editable install <https://setuptools.pypa.io/en/latest/userguide/development_mode.html>`_ to avoid
81 having to repeat the installation after each change. Note that this does not affect users that
82 install Brian in the usual way (e.g. with ``pip`` or ``conda``). This change only concerns
83 developers working on the source code directly.
84
85 Contributions
86 ~~~~~~~~~~~~~
87 GitHub code, documentation, and issue contributions (ordered by the number of
88 contributions):
89
90 * Marcel Stimberg (`@mstimberg <https://github.com/mstimberg>`_)
91 * Mrigesh Thakur (`@Legend101Zz <https://github.com/Legend101Zz>`_)
92 * Ayush (`@ayush4874 <https://github.com/ayush4874>`_)
93 * Samuele De Cristofaro (`@De-Cri <https://github.com/De-Cri>`_)
94 * Dan Goodman (`@thesamovar <https://github.com/thesamovar>`_)
95 * `@itu-itis21-nguyen21 <https://github.com/itu-itis21-nguyen21>`_
96 * Mohamed Abidalrekab (`@abidalrekab <https://github.com/abidalrekab>`_)
97 * Silviya (`@silviyahasana <https://github.com/silviyahasana>`_)
98 * Guy Singer (`@guy-singer <https://github.com/guy-singer>`_)
99 * Liam Keegan (`@lkeegan <https://github.com/lkeegan>`_)
100 * `@Peace-png <https://github.com/Peace-png>`_
101 * Maurizio DE PITTA (`@mdepitta <https://github.com/mdepitta>`_)
102 * Sagar Shahari (`@maverick4code <https://github.com/maverick4code>`_)
103 * Simo Vanni (`@sivanni <https://github.com/sivanni>`_)
104 * hillsberg (`@hillsberg3008 <https://github.com/hillsberg3008>`_)
105 * Hong Zhu (`@Jasmine969 <https://github.com/Jasmine969>`_)
106 * `@mahipalimkar <https://github.com/mahipalimkar>`_
107 * `@wcx12306 <https://github.com/wcx12306>`_
108
109 Other contributions outside of GitHub (ordered alphabetically, apologies to
110 anyone we forgot...):
111
112 * Mathias Cauwet (`@macauwet <https://github.com/macauwet>`_)
113 * Chaitanya Chintaluri
114
115 Brian 2.9.0
116 -----------
117
118 New features
119 ~~~~~~~~~~~~
120 - Simulations now stop "gracefully" if you interrupt them with Ctrl+C (or e.g. the interrupt button in a Jupyter notebook). This means that the simulation finishes the current time step and stops, making it possible to access the results for inspection (:issue:`1621`).
121 - The :ref:`linked_variables` mechanism is now more powerful and supports linked variables that use another variable for indexing, and linked variables in `Synapses` (:issue:`1584`).
122
123 Selected improvements and bug fixes
124 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
125 - Improve C99 check on UNIX to avoid spurious errors when a non-standard compiler is used (e.g. via Anaconda) (:issue:`1618`).
126 - Raise an error when `~Network.run` is called with a negative duration (:issue:`1608`). Thanks to Palash Chitnavis for contributing this fix.
127 - Fix compatibility with recent setuptools versions (:issue:`1590`, :issue:`1622`)
128 - Raise an AttributeError instead of a KeyError, when accessing non-existing attributes of the preferences object (:issue:`1629`). This prevents an error on Google Collab when the Debugger is active. Thanks to forum user ``@SaeedF36`` for making us aware of this issue.
129
130 Infrastructure and documentation improvements
131 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
132 - A new example :doc:`../examples/synapses.homeostatic_stdp_at_inhibitory_synapes`, demonstrating a homoestatic modulation of STDP, based on a population firing rate.
133 Thanks to Paul Brodersen for contributing this example (:issue:`1581`).
134 - A new example :doc:`../examples/network_operation_stop`, demonstrating the use of `NetworkOperation` to stop a simulation when a certain condition is met. Thanks to Sagar Shahari for
135 contributing this example (:issue:`1604`).
136 - GitHub Actions are now pinned by hash to avoid security issues (:issue:`1607`).
137 - A new GitHub Action to update ``CITATION.cff`` and ``README.md`` with the latest Zenodo and Software Heritage links, so that they are always up-to-date with the latest release (:issue:`1574`).
138
139 Contributions
140 ~~~~~~~~~~~~~
141 GitHub code, documentation, and issue contributions (ordered by the number of
142 contributions):
143
144 * Marcel Stimberg (`@mstimberg <https://github.com/mstimberg>`_)
145 * Samuele De Cristofaro (`@De-Cri <https://github.com/De-Cri>`_)
146 * Dan Goodman (`@thesamovar <https://github.com/thesamovar>`_)
147 * Sagar Shahari (`@maverick4code <https://github.com/maverick4code>`_)
148 * `@mahipalimkar <https://github.com/mahipalimkar>`_
149 * Mrigesh Thakur (`@Legend101Zz <https://github.com/Legend101Zz>`_)
150 * Md Khurshid (`@alikhere <https://github.com/alikhere>`_)
151 * Palash Chitnavis (`@PalashChitnavis <https://github.com/PalashChitnavis>`_)
152 * Ben Evans (`@bdevans <https://github.com/bdevans>`_)
153 * `@clinssen <https://github.com/clinssen>`_
154 * shriyaise725 (`@shriya7ise <https://github.com/shriya7ise>`_)
155 * Ankur Sinha (`@sanjayankur31 <https://github.com/sanjayankur31>`_)
156 * Hong Zhu (`@Jasmine969 <https://github.com/Jasmine969>`_)
157 * 火焰青年 (`@zhengrenjie <https://github.com/zhengrenjie>`_)
158
159
160 Brian 2.8.0.1-2.8.0.4
161 ---------------------
162 Several patch-level releases, correcting metadata files about authors and contributors, updating release scripts, and fixing issues in a test and in the
163 continuous integration infrastructure. Wheel packages for linux-aarch64 are now built on GitHub's recently added ARM runners, removing the need for emulation
164 and greatly improving the built time. No other user-facing changes are included in this release.
165
166 Contributions
167 ~~~~~~~~~~~~~
168 GitHub code, documentation, and issue contributions (ordered by the number of
169 contributions):
170
171 * Marcel Stimberg (`@mstimberg <https://github.com/mstimberg>`_)
172
173
174 Brian 2.8.0
175 -----------
176 This release comes with an important performance improvement for random number generation in C++ standalone mode, various minor improvements and bugfixes, as well as a
177 number of behind-the-scenes improvements for our release process and compatibility with Python 3.13.
178
179 Selected improvements and bug fixes
180 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
181 - Faster simulation of random numbers (by replacing our outdated random number generator), now up to 5 times faster, speeding up all uses of random numbers
182 including noise and Poisson groups/inputs. Note that the random number algorithm behind the scenes is still the same, so simulations will still use the
183 same sequence of random numbers with a given seed, with the limitations given in :ref:`seeding_and_reproducibility` (:issue:`1559`).
184 - `~CPPStandaloneDevice.delete` has a new option to delete arrays stored on disk for the ``run_args`` feature – this can be useful for training paradigms,
185 where the ``run_args`` are used to provide a large array of weights from a previous run.
186 - Fixes for compatiblity with recent versions of ``setuptools`` and ``sympy``. Thanks to Étienne Mollier for noticing and fixing a related test failure (:issue:`1553`).
187
188 Infrastructure and documentation improvements
189 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
190 - Full compatibility with Python 3.13, and corresponding binary wheels.
191 - A new mechanism to automatically update our ``CITATION.cff`` and README files with the latest links to the Zenodo and Software Heritage archives, so that they are
192 always up-to-date with the latest release (:issue:`1575`).
193 - We now provide a ``codemeta.json`` file for Brian (see https://codemeta.github.io; :issue:`1574`).
194 - We know push docker images for the latest release to the GitHub Container Registry (see https://github.com/brian-team/brian2/pkgs/container/brian and https://github.com/brian-team/brian2/pkgs/container/brian-dev) in addition to Docker Hub (:issue:`1551`).
195 - New example: :doc:`../examples/frompapers.Diehl_Cook_2015` – note that this example needs a long time to run, a faster version using C++ standalone mode is in preparation.
196 Thanks to Björn A. Lindqvist for contributing this example (:issue:`1548`).
197
198 Contributions
199 ~~~~~~~~~~~~~
200 GitHub code, documentation, and issue contributions (ordered by the number of
201 contributions):
202
203 * Marcel Stimberg (`@mstimberg <https://github.com/mstimberg>`_)
204 * `@neworderofjamie <https://github.com/neworderofjamie>`_
205 * `@NickChernov <https://github.com/NickChernov>`_
206 * Kyle Johnsen (`@kjohnsen <https://github.com/kjohnsen>`_)
207 * Liam Keegan (`@lkeegan <https://github.com/lkeegan>`_)
208 * Étienne Mollier (`@emollier <https://github.com/emollier>`_)
209 * Bernhard Vogginger (`@bvogginger <https://github.com/bvogginger>`_)
210 * Dan Goodman (`@thesamovar <https://github.com/thesamovar>`_)
211 * `@Treetalker <https://github.com/Treetalker>`_
212 * Björn Lindqvist (`@bjourne <https://github.com/bjourne>`_)
213 * `@wcx12306 <https://github.com/wcx12306>`_
214
215
216 Brian 2.7.1
217 -----------
218 This minor bug-fix release contains a fix for a regression in the handling of the ``on_event`` argument of `Synapses` for custom events and non-default pathways,
219 which was introduced in Brian 2.6.0.
220
221 Selected improvements and bug fixes
222 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
223 - Fix a bug in interpreting the ``on_event`` argument of `Synapses` for custom events and non-default pathways (a regression introduced with Brian 2.6). Thanks to forum users
224 ``mreynes`` and ``mmiekus`` for making us aware of this issue. (:issue:`1541`)
225 - Make parsing SWC files more robust, by not being as strict for a correct 3-point-soma format (which is often slightly inexact on https://neuromorpho.org). Thanks to forum
226 user ``cbx`` for making us aware of this issue. (:issue:`1544`)
227
228 Infrastructure and documentation improvements
229 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
230 - Move to ``pytest-cov`` for coverage measurements – this fixes issues with wrong coverage reports on https://coveralls.io/github/brian-team/brian2. (:issue:`1545`)
231
232 Contributions
233 ~~~~~~~~~~~~~
234 GitHub code, documentation, and issue contributions (ordered by the number of
235 contributions):
236
237 * Marcel Stimberg (`@mstimberg <https://github.com/mstimberg>`_)
238 * `@mareba2030 <https://github.com/mareba2030>`_
239 * Björn Lindqvist (`@bjourne <https://github.com/bjourne>`_)
240
241 Other contributions outside of GitHub (ordered alphabetically, apologies to
242 anyone we forgot...):
243
244 * `cbx <https://brian.discourse.group/u/cbx/summary>`_
245 * `mmiekus <https://brian.discourse.group/u/mmiekus/summary>`_
246 * `mreynes <https://brian.discourse.group/u/mreynes/summary>`_
247
248 Brian 2.7.0
249 -----------
250 This release contains a number of bug fixes and improvements. Notably, it is fully compatible with the upcoming numpy 2.0 release and can be installed
251 alongside either numpy versions 1.23–1.26, or numpy 2.0.
252
253 Selected improvements and bug fixes
254 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
255 - Objects (e.g. `NeuronGroup` or `Synapses`) that are not used now raise warnings, avoiding errors for accidentally unused objects (:issue:`1536`). Thanks
256 to Jannik Luboeinski for suggesting this feature.
257 - Fix the :doc:`run_args <../user/computation>` feature for object names with upper case letters (:issue:`1533`). Thanks to DavidKing2020 for making us aware of this issue.
258 - Extremely short refractoriness periods were not converted into code correctly, truncating their value (:issue:`1521`). Thanks to YannaelB for reporting this issue.
259 - The numbers 0 and 1 were converted into ``true``/``false`` in C++ code, breaking tests expecting the numbers to appear (:issue:`1520`)
260 - The logging system was broken for 3rd-party packages that have names starting with ``brian`` (:issue:`1519`)
261
262 Infrastructure and documentation improvements
263 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
264 - The reference documentation was not correctly built, missing a lot of the information present in the source code. Thanks to Harsh Khilawala for making us aware of
265 this issue (:issue:`1534`)
266 - Binary wheels are built against numpy 2.0. These wheels are still backwards compatible with numpy >= 1.23 (:issue:`1527`)
267 - Faster tests on GitHub actions by caching the compiled Cython code (:issue:`1528`)
268 - The test suite was no longer testing the GSL integration (:issue:`1523` and :issue:`1526`)
269 - Brian no longer includes the date in its documentation for `reproducible builds <https://reproducible-builds.org/docs/source-date-epoch/>`_ (:issue:`1518`).
270
271 Contributions
272 ~~~~~~~~~~~~~
273
274 GitHub code, documentation, and issue contributions (ordered by the number of
275 contributions):
276
277 * Marcel Stimberg (`@mstimberg <https://github.com/mstimberg>`_)
278 * Dan Goodman (`@thesamovar <https://github.com/thesamovar>`_)
279 * Harsh Khilawala (`@HarshKhilawala <https://github.com/HarshKhilawala>`_)
280 * Ben Evans (`@bdevans <https://github.com/bdevans>`_)
281 * Jannik Luboeinski (`@jlubo <https://github.com/jlubo>`_)
282 * `@flomlo <https://github.com/flomlo>`_
283 * Sven Leach (`@SvennoNito <https://github.com/SvennoNito>`_)
284
285 Other contributions outside of GitHub (ordered alphabetically, apologies to
286 anyone we forgot...):
287
288 * `DavidKing2020 <https://brian.discourse.group/u/davidking2020/summary>`_
289 * `YannaelB <https://brian.discourse.group/u/YannaelB/summary>`_
290
291 Brian 2.6.0
292 -----------
293 This release introduces a major new feature for running standalone simulations repeatedly (or in parallel), without having to recompile the code.
294 It also fixes a number of compatiblity issues with the upcoming numpy 2.0 release, and offers compiled wheels for Python 3.12. Finally, we now
295 offer pre-built docker images containing a full installation of Brian and related tools for convenient testing and development.
296
297 New features
298 ~~~~~~~~~~~~
299 - The new ``run_args`` argument makes it possible to run standalone simulations repeatedly (or in parallel) with different parameters without
300 recompiling the code. See :ref:`standalone_multiple_full_runs` for details (:issue:`1429`).
301 - We now provide regularly updated Docker images with a full installation of Brian and related tools. You can find the latest release images
302 on https://hub.docker.com/repository/docker/briansimulator/brian/general, and temporary images for development versions on
303 https://hub.docker.com/repository/docker/briansimulator/brian-dev/general
304 (:issue:`1503`).
305
306 Selected improvements and bug fixes
307 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
308 - Various fixes for compatibility with recent Python versions and the future numpy 2.0 release (:issue:`1482`, :issue:`1484`, :issue:`1488`, :issue:`1510`).
309 - Do not assume that the test directory is writeable (:issue:`1507``)
310 - Fix the power operator for integer values in Cython (:issue:`1502`). Thanks to Hong Zhu for reporting this issue.
311 - Fix floor division on C++ (:issue:`1496`). Thanks to Brian forum user ``ansuz`` for reporting this issue.
312
313 Infrastructure and documentation improvements
314 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
315 - We now build wheels and test against for Python 3.12 (:issue:`1481`).
316 - We now build and test on Apple Silicon (M1) hardware (:issue:`1501`).
317 - Improved support for 3rd-party packages to use Brian's logging system (:issue:`1480`).
318 - New examples: :doc:`../examples/frompapers.Spreizer_et_al_2019.Spreizer_et_al_2019`, :doc:`../examples/frompapers.Wang_2002` (:issue:`1447`, :issue:`1489`)
319 - Use dependabot to keep GitHub actions and the dev container up-to-date (:issue:`1513`).
320
321 Contributions
322 ~~~~~~~~~~~~~
323
324 GitHub code, documentation, and issue contributions (ordered by the number of
325 contributions):
326
327 * Marcel Stimberg (`@mstimberg <https://github.com/mstimberg>`_)
328 * Ben Evans (`@bdevans <https://github.com/bdevans>`_)
329 * Jannik Luboeinski (`@jlubo <https://github.com/jlubo>`_)
330 * Dan Goodman (`@thesamovar <https://github.com/thesamovar>`_)
331 * Arash Golmohammadi (`@arashgmn <https://github.com/arashgmn>`_)
332 * xyz (`@DHRUVJ2003 <https://github.com/DHRUVJ2003>`_)
333 * Kyle Johnsen (`@kjohnsen <https://github.com/kjohnsen>`_)
334 * McCoy R. Becker (`@femtomc <https://github.com/femtomc>`_)
335 * Max Talanov (`@max-talanov <https://github.com/max-talanov>`_)
336 * `@lysea-haggie <https://github.com/lysea-haggie>`_
337 * Hong Zhu (`@Jasmine969 <https://github.com/Jasmine969>`_)
338 * Paul Brodersen (`@paulbrodersen <https://github.com/paulbrodersen>`_)
339 * `@MichielMoe <https://github.com/MichielMoe>`_
340 * Ian Quah (`@IanQS <https://github.com/IanQS>`_)
341 * Adam Willats (`@awillats <https://github.com/awillats>`_)
342 * `@flomlo <https://github.com/flomlo>`_
343
344 Other contributions outside of GitHub (ordered alphabetically, apologies to
345 anyone we forgot...):
346
347 * `ansuz <https://brian.discourse.group/u/ansuz/summary>`_`
348 * `@l-luo1 <https://github.com/l-luo1>_``
349 * Klaus Wimmer (`@wklausitor <https://github.com/wklausito>_`)
350
351 Brian 2.5.4
352 -----------
353 Yet another minor release that fixes an issue with the documentation build. As a bonus, we now provide wheels built
354 with the `musl <https://musl.libc.org/>`_ standard library, which allows installing Brian on distributions such as
355 `Alpine Linux <https://alpinelinux.org/>`_.
356
357 Selected bug fixes
358 ~~~~~~~~~~~~~~~~~~
359 - Re-introduce the tutorials and example plots that were omitted from the documentation by accident. Thanks to Felix Kern for making us aware of the issue.
360
361 Infrastructure improvements
362 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
363 - Provide ``musllinux`` (see `PEP 656 <https://peps.python.org/pep-0656/>`_) wheels for distributions such as Alpine Linux (:issue:`1478`).
364
365 Contributions
366 ~~~~~~~~~~~~~
367
368 Github code, documentation, and issue contributions (ordered by the number of
369 contributions):
370
371 * Marcel Stimberg (`@mstimberg <https://github.com/mstimberg>`_)
372 * Felix Benjamin Kern (`@kernfel <https://github.com/kernfel>`_)
373
374 Brian 2.5.3
375 -----------
376 This new minor release only fixes two infrastructure issues that came up with the previous release.
377
378 Selected bug fixes
379 ~~~~~~~~~~~~~~~~~~
380 - Re-introduce the reference documentation that was no longer created on https://brian2.readthedocs.org with the latest release (:issue:`1474`). Thanks to Michalis Pagkalos for making us aware of the issue.
381
382 Infrastructure improvements
383 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
384 - Brian's packaging infrastructure now switches to modern tools such as ``pyproject.toml`` for metadata declaration, ``build`` for source package creation, and ``setuptools_scm`` for versioning (:issue:`1475`).
385
386
387 Contributions
388 ~~~~~~~~~~~~~
389
390 Github code, documentation, and issue contributions (ordered by the number of
391 contributions):
392
393 * Marcel Stimberg (`@mstimberg <https://github.com/mstimberg>`_)
394
395
396 Brian 2.5.2
397 -----------
398 This new minor release fixes incompatibility issues with the latest numpy release, and a number of other issues.
399 To make it easier to contribute to Brian, we have now adopted a consistent code style and updated our infrastructure so
400 that the style gets enforced for all new code contributions (see :ref:`code_style` for details). Following
401 `NEP 29 <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_, this release supports Python 3.9 & numpy 1.21 and
402 newer.
403
404 New features
405 ~~~~~~~~~~~~
406 - We now provide Python wheels for the ``linux-aarch64`` architecture (:issue:`1463`), making it easier to install Brian
407 on ARM-based systems running Linux (including recent Apple hardware).
408
409 Selected improvements and bug fixes
410 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
411 - Fix compability with numpy 1.25 and avoid deprecation warnings (:issue:`1473`)
412 - Add missing ``volume`` attribute to `~.SpatialNeuron` (:issue:`1430`). Thanks to Sebastian Schmitt for contributing this
413 fix.
414 - Fix an issue with pickling `~.Quantity` objects (:issue:`1438`). Thanks to Shailesh Appukuttan for making us aware of
415 this issue.
416 - No longer use the deprecated ``distutils`` package (:issue:`1442`).
417 - Fix an issue with log files on Windows (:issue:`1454`). Thanks to discourse user
418 ``@NiKnight`` for making us aware of the issue.
419 - Fix an issue that prevents building the documentation on recent Python versions (:issue:`1450`). Thanks to Étienne
420 Mollier for contributing this fix.
421 - Fix an issue with the upcoming Cython version for GSL integration (:issue:`1471`).
422 - Fix a broken error message (:issue:`1467`). Thanks to ``@pjsph`` for contributing the fix.
423 - Fix an issue with user-provided header files (:issue:`1436`). Thanks to ``@wxie2013`` for reporting the issue.
424 - Fix an issue when using `SpatialNeuron` with `TimedArray` on Cython (:issue:`1428`). Thanks to Sebastian Schmitt for
425 reporting the issue.
426
427 Infrastructure and documentation improvements
428 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
429 - We now enforce a consistent code style for all new code contributions, and check/enforce the code style with tools
430 such as ``black``, ``isort``, ``flake8``, and ``pyupgrade`` (:issue:`1435`, :issue:`1444`, :issue:`1446`).
431 See :ref:`code_style` for details. Thanks to Oleksii Leonov for contributing this feature.
432 - A number of new examples have been added: :doc:`../examples/frompapers.Tetzlaff_2015`, :doc:`../examples/frompapers.Nicola_Clopath_2017`
433 (contributed by Sebastian Schmitt) and :doc:`../examples/coupled_oscillators`.
434 - The development container has been updated, and the repository now contains a file with all the places where
435 dependency versions are listed (:issue:`1451`, :issue:`1468`).
436
437 Backwards incompatible changes
438 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
439 - Using `SpatialNeuron` with the ``numpy`` code generation target now requires the ``scipy`` package to be installed
440 (:issue:`1460`).
441
442 Contributions
443 ~~~~~~~~~~~~~
444
445 Github code, documentation, and issue contributions (ordered by the number of
446 contributions):
447
448 * Marcel Stimberg (`@mstimberg <https://github.com/mstimberg>`_)
449 * Dan Goodman (`@thesamovar <https://github.com/thesamovar>`_)
450 * Ben Evans (`@bdevans <https://github.com/bdevans>`_)
451 * Oleksii Leonov (`@oleksii-leonov <https://github.com/oleksii-leonov>`_)
452 * Sebastian Schmitt (`@schmitts <https://github.com/schmitts>`_)
453 * Denis Alevi (`@denisalevi <https://github.com/denisalevi>`_)
454 * Shailesh Appukuttan (`@appukuttan-shailesh <https://github.com/appukuttan-shailesh>`_)
455 * `@TheSquake <https://github.com/TheSquake>`_
456 * `@tim-ufer <https://github.com/tim-ufer>`_
457 * Akalanka (`@boneyag <https://github.com/boneyag>`_)
458 * `@pjsph <https://github.com/pjsph>`_
459 * `@Bitloader22 <https://github.com/Bitloader22>`_
460 * `@MunozatABI <https://github.com/MunozatABI>`_
461 * Étienne Mollier (`@emollier <https://github.com/emollier>`_)
462 * `@KarimHabashy <https://github.com/KarimHabashy>`_
463 * `@hunjunlee <https://github.com/hunjunlee>`_
464 * Arash Golmohammadi (`@arashgmn <https://github.com/arashgmn>`_)
465 * Steathy Spikes (`@steathy-spikes <https://github.com/steathy-spikes>`_)
466 * Adam Willats (`@awillats <https://github.com/awillats>`_)
467
468 Other contributions outside of github (ordered alphabetically, apologies to
469 anyone we forgot...):
470 * `@NiKnight <https://brian.discourse.group/u/niknight/summary>`_
471
472 Brian 2.5.1
473 -----------
474 This new minor release contains a large number of bug fixes and improvements, in particular for the C++ standalone mode,
475 as well as many new contributed examples. For users of Visual Studio Code, getting involved with Brian development is now
476 easier than ever, thanks to a new "development container" that automatically provides an environment with all the necessary
477 dependencies.
478
479 New features
480 ~~~~~~~~~~~~
481 * Ben Evans added a Docker container for development with Visual Studio Code (:issue:`1387`).
482 * Synaptic indices of synapses created with manually provided indices can now be accessed in standalone mode even before
483 the situation has been run. This makes certain complex situations (e.g. synapses modulating other synapses) easier to
484 write and also makes more detailed error checking possible (:issue:`1403`).
485 * Additional "code slots", as well as more detailed profiling information about compilation times are avaiable for
486 C++ standalone mode (:issue:`1390`, :issue:`1391`). Thanks to Denis Alevi for contributing this feature.
487 * LaTeX output for quantity arrays (which is automatically used for the "rich representation" in jupyter notebooks), is
488 now limited to reasonable size and no longer tries to display all values for large arrays. It now also observes most
489 of numpy's print options (:issue:`1426`)
490
491 Selected improvements and bug fixes
492 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
493 * Internally, Brian objects now have more consistent names (used in the generated code), and variables declarations are
494 generated in deterministic order. This should make repeated runs of models faster, since less code has to be recompiled
495 (:issue:`1384`, :issue:`1417`).
496 * Running several simulations in parallel with Python's ``multiprocessing`` meant that all processes accessed the same
497 log file which led to redundant information and could lead to crashes when several processes tried to rotate the same
498 file. Brian now switches off logging in subprocesses, but users can enable also enable individual logs for each process,
499 see :ref:`logging_and_multiprocessing`. The default log level for the file log has also been raised to ``DEBUG``
500 (:issue:`1419`).
501 * Some common plotting idioms (e.g. ``plt.plot(spike_mon.t/ms, spike_mon.i, '.')``) were broken with the most recent
502 matplotlib version and are now working again (:issue:`1412`)
503 * Very long runs (with more then 2e9 simulation time steps) failed to run in C++ standalone mode (:issue:`1394`). Thanks to
504 Kai Chen for making us aware of the issue.
505
506 Infrastructure and documentation improvements
507 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
508 * Sebastian Schmitt has contributed several new :doc:`../examples/index`, reproducing results from several papers (e.g.
509 :doc:`../examples/frompapers.Maass_Natschlaeger_Markram_2002` and :doc:`../examples/frompapers.Naud_et_al_2008_adex_firing_patterns`)
510 * Akif Erdem Sağtekin and Sebastian Schmitt contributed the example :doc:`../examples/frompapers.Izhikevich_2003`.
511 * A number of fixes to the documentation have been contributed by Sebastian Schmitt.
512
513 Contributions
514 ~~~~~~~~~~~~~
515
516 Github code, documentation, and issue contributions (ordered by the number of
517 contributions):
518
519 * Marcel Stimberg (`@mstimberg <https://github.com/mstimberg>`_)
520 * Ben Evans (`@bdevans <https://github.com/bdevans>`_)
521 * Sebastian Schmitt (`@schmitts <https://github.com/schmitts>`_)
522 * Denis Alevi (`@denisalevi <https://github.com/denisalevi>`_)
523 * Akif Erdem Sağtekin (`@aesagtekin <https://github.com/aesagtekin>`_)
524 * `@MunozatABI <https://github.com/MunozatABI>`_
525 * Dan Goodman (`@thesamovar <https://github.com/thesamovar>`_)
526 * `@ivapl <https://github.com/ivapl>`_
527 * `@dokato <https://github.com/dokato>`_
528 * Davide Schiavone (`@davideschiavone <https://github.com/davideschiavone>`_)
529 * Kai Chen (`@NeoNeuron <https://github.com/NeoNeuron>`_)
530 * Yahya Ashrafi (`@yahya-ashrafi <https://github.com/yahya-ashrafi>`_)
531 * Ariel Martínez Silberstein (`@ariel-m-s <https://github.com/ariel-m-s>`_)
532 * Adam Willats (`@awillats <https://github.com/awillats>`_)
533
534
535 Brian 2.5.0.3
536 -------------
537 Another patch-level release that fixes incorrectly built Python wheels (the binary package
538 used to install packages with ``pip``). The wheels where mistakenly built against the most
539 recent version of ``numpy`` (1.22), which made them incompatible with earlier versions of
540 ``numpy``. This release also fixes a few minor mistakes in the string representation of
541 monitors, contributed by Felix Benjamin Kern.
542
543 Brian 2.5.0.2
544 -------------
545 A new patch-level release that fixes a missing ``#include`` in the synapse generation code for C++ standalone code. This
546 does not matter for most compilers (in particular, it does not matter for the gcc, clang, and Visual Studio compilers
547 that we use for testing on Linux, OS X, and Windows), but it can matter for projects like Brian2GeNN that build on top
548 of Brian2 and use Nvidia's ``nvcc`` compiler. The release also fixes a minor string-formatting error (:issue:`1377`),
549 which led to quantities that were displayed without their units.
550
551 Brian 2.5.0.1
552 -------------
553 A new build to provide binary
554 `wheels <https://packaging.python.org/guides/distributing-packages-using-setuptools/#wheels>`_
555 for Python 3.10.
556
557 .. _brian2.5:
558
559 Brian 2.5
560 ---------
561 This new major release contains a large number of bug fixes and improvements, as well as
562 important new features for synapse generation: the :ref:`generator_syntax` can now
563 create synapses "in both directions", and also supports random samples of fixed size.
564 In addition, several contributors have helped to improve the documentation, in
565 particular by adding several new :doc:`../examples/index`. We have also updated our test
566 infrastructure and removed workarounds and warnings related to older, now unsupported,
567 versions of Python. Our policy for supported Python and numpy versions now follows the
568 `NEP 29 policy <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_ adopted by
569 most packages in the scientific Python ecosystem. This and other policies related to
570 compatibility have been documented in :doc:`compatibility`. As always, we recommend all
571 users of Brian 2 to upgrade.
572
573 New features
574 ~~~~~~~~~~~~
575 * :ref:`generator_syntax` has become more powerful: it is now possible to express
576 pre-synaptic indices as a function of post-synaptic indices – previously, only the
577 other direction was supported (:issue:`1294`).
578 * Synapse generation can now make use of fixed-size random sampling (:issue:`1280`).
579 Together with the more powerful generator syntax, this finally makes it possible to
580 have networks where each cell receives a fixed number of random inputs:
581 ``syn.connect(i='k for k in sample(N_pre, size=number_of_inputs)')``.
582
583 Selected improvements and bug fixes
584 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
585 * Fair default build flags on several architectures (:issue:`1277`). Thanks to Étienne
586 Mollier for contributing this feature.
587 * Better C++ compiler detection on UNIX systems, e.g. with Anaconda installations
588 (:issue:`1304`). Thanks to Jan Marker for this contribution.
589 * Fixed LaTeX output for newer sympy versions (:issue:`1299`). Thanks to Sebastian
590 Schmitt for reporting this issue. The problem and its fix is described in detail
591 in this `blog post <https://briansimulator.org/posts/2021/bug-hunt-episode-1-broken-latex-output-for-equations/>`_.
592 * Fixed string representation for units (:issue:`1291`). Recreating a unit from
593 its string representation gave wrong results in some corner cases.
594 * Fix an error during the determination of appropriate C++ compiler flags on Windows
595 with Python 3.9 (:issue:`1286`), and fix the detection of a C99-compatible compiler
596 on Windows (:issue:`1257`). Thanks to Kyle Johnsen for reporting the errors
597 and providing both fixes.
598 * More robust usage of external constants in C++ standalone code, avoiding clashes
599 when the user defines constants with common names like ``x`` (:issue:`1279`). Thanks
600 to user ``@wxie2013`` for making us aware of this issue.
601 * Raise an error if summed variables refer to event-based variables (:issue:`1274`) and
602 a general rework of the dependency checks (:issue:`1328`). Thanks to Rohith Varma
603 Buddaraju for fixing this issue.
604 * Fix an error for deactivated spike-emitting objects (e.g. `NeuronGroup`,
605 `PoissonGroup`). They continued to emit spikes despite ``active=False`` if they had
606 spiked in the last time step of a previous run (:issue:`1319`). Thanks to forum user
607 Shencong for making us aware of the issue.
608 * Avoid warnings about deprecated numpy aliases (:issue:`1273`).
609 * Avoid a warning about an "ignored attribute shape" in some interactive Python
610 consoles (:issue:`1372`).
611 * Check units for summed variables (:issue:`1361`). Thanks to Jan-Hendrik Schleimer for
612 reporting this issue.
613 * Do not raise an error if synapses use restore instead of Synapses.connect
614 (:issue:`1359`). Thanks to forum user SIbanez for reporting this issue.
615 * Fix indexing for sections in SpatialNeuron (:issue:`1358`). Thanks to Sebastian
616 Schmitt for reporting this issue
617 * Better error messages for missing threshold definition (:issue:`1363`).
618 * Raise a useful error for ``namespace`` entries that start with an underscore instead
619 of failing during compilation if the name clashes with built-in functions
620 (:issue:`1362`). Thanks to Denis Alevi for reporting this issue.
621 * Consistently use include/library directory preferences (:issue:`1353`). The
622 preferences can now be used to override the list of include/library directories,
623 replacing the inconsistent behavior where they were either prepended (C++ standalone
624 mode) or appended (Cython runtime mode) to the default list. Thanks to Denis Alevi for
625 opening the discussion on this issue.
626 * Remove a warning about the difference between Python 2 and Python 3 semantics related
627 to division (:issue:`1351`).
628 * Do not generate spurious ``-.o`` files when checking compiler compatibility
629 (:issue:`1348`). For more details, see this
630 `blog post <https://briansimulator.org/posts/2021/bug-hunt-episode-2-a-strange-file-appears/>`_.
631 * Make `~.BrianGlobalPreferences.reset_to_defaults` work again, which was inadvertently
632 broken in the Python 2 → 3 transition (:issue:`1342`). Thanks to Denis Alevi for
633 reporting and fixing this issue.
634 * The commands to run and compile the code in C++ standalone mode can now be changed via
635 a preference (:issue:`1338`). This can be useful to run/compile on clusters where
636 jobs have to submitted with special commands. Thanks to Denis Alevi for contributing
637 this feature.
638
639 Backward-incompatible changes
640 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
641 * The ``default_preferences`` file that was part of the Brian installation has been
642 removed, since it could lead to problems when working with development versions of
643 Brian, and was overwritten with each update (:issue:`1354`). Users can still use a
644 system-wide or per-directory preference file (see :doc:`../advanced/preferences`).
645 * The preferences `codegen.cpp.include_dirs`, `codegen.cpp.library_dirs`, and
646 `codegen.cpp.runtime_library_dirs` now all replace the respective default values.
647 Previously they where prepended (C++ standalone mode) or appended (Cython runtime
648 mode). Users relying on a combination of the default values and their manually set
649 values need to include the default value (e.g.
650 ``os.path.join(sys.prefix, 'include')``) manually.
651
652 Infrastructure and documentation improvements
653 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
654 * Tagging a release will now automatically upload the release to PyPI via a GitHub
655 Action. Versions are automatically determined with
656 `versioneer <https://github.com/python-versioneer/python-versioneer>`_ (:issue:`1267`)
657 and include more detailed information when using a development version of Brian. See
658 :ref:`which_version` for more details.
659 * The test suite has been moved to GitHub Actions for all operating systems
660 (:issue:`1298`). Thanks to Rohith Varma Buddaraju for working on this.
661 * New :doc:`../examples/frompapers.Jansen_Rit_1995_single_column` (:issue:`1347`),
662 contributed by Ruben Tikidji-Hamburyan.
663 * New :doc:`../examples/synapses.spike_based_homeostasis` (:issue:`1331`), contributed
664 by Sebastian Schmitt.
665 * New :doc:`../examples/advanced.COBAHH_approximated` (:issue:`1309`), contributed by
666 Sebastian Schmitt.
667 * Several new examples covering several Brian usage pattern, e.g. a
668 :doc:`minimal C++ standalone script <../examples/standalone.simple_case>`, or
669 demonstrations of running multiple simulations in parallel with
670 :doc:`Cython <../examples/multiprocessing.01_using_cython>` or
671 :doc:`C++ standalone <../examples/multiprocessing.02_using_standalone>`, contributed
672 by A. Ziaeemehr.
673 * Corrected units in :doc:`../examples/frompapers.Kremer_et_al_2011_barrel_cortex`
674 (:issue:`1355`). Thanks to Adam Willats for contributing this fix.
675 * Most of Brian's code base should now use a consistent string formatting style
676 (:issue:`1364`), documented in the :doc:`../developer/guidelines/style`.
677 * Test reports will now show the project directory path for C++ standalone projects
678 (:issue:`1336`). Thanks to Denis Alevi for contributing this feature.
679 * Fix the documentation for C++ compiler references (:issue:`1323`, :issue:`1321`).
680 Thanks to Denis Alevi for fixing these issues.
681 * Examples are now listed in a deterministic order in the documentation (:issue:`1312`),
682 and their title is now correctly formatted in the restructured text source
683 (:issue:`1311`). Thanks to Felix C. Stegermann for contributing these fixes.
684 * Document how to plot model functions (e.g. time constants) in complex neuron models
685 (:issue:`1308`). Contributed by Sebastian Schmitt.
686
687 Contributions
688 ~~~~~~~~~~~~~
689
690 Github code, documentation, and issue contributions (ordered by the number of
691 contributions):
692
693 * Marcel Stimberg (`@mstimberg <https://github.com/mstimberg>`_)
694 * Dan Goodman (`@thesamovar <https://github.com/thesamovar>`_)
695 * Rohith Varma Buddaraju (`@rohithvarma3000 <https://github.com/rohithvarma3000>`_)
696 * Denis Alevi (`@denisalevi <https://github.com/denisalevi>`_)
697 * Dingkun.Liu (`@DingkunLiu <https://github.com/DingkunLiu>`_)
698 * Ruben Tikidji-Hamburyan (`@rat-h <https://github.com/rat-h>`_)
699 * Sebastian Schmitt (`@schmitts <https://github.com/schmitts>`_)
700 * `@ramapati166 <https://github.com/ramapati166>`_
701 * Jan Marker (`@jangmarker <https://github.com/jangmarker>`_)
702 * Kyle Johnsen (`@kjohnsen <https://github.com/kjohnsen>`_)
703 * Abolfazl Ziaeemehr (`@Ziaeemehr <https://github.com/Ziaeemehr>`_)
704 * Felix Benjamin Kern (`@kernfel <https://github.com/kernfel>`_)
705 * Yann Zerlaut (`@yzerlaut <https://github.com/yzerlaut>`_)
706 * Adam (`@Adam-Antios <https://github.com/Adam-Antios>`_)
707 * `@ShanqMa <https://github.com/ShanqMa>`_
708 * Ljubica Cimeša (`@LjubicaCimesa <https://github.com/LjubicaCimesa>`_)
709 * `@adididi <https://github.com/adididi>`_
710 * VigneswaranC (`@Vigneswaran-Chandrasekaran <https://github.com/Vigneswaran-Chandrasekaran>`_)
711 * Nunna Lakshmi Saranya (`@18sarru <https://github.com/18sarru>`_)
712 * Friedemann Zenke (`@fzenke <https://github.com/fzenke>`_)
713 * `@Alexis-Melot <https://github.com/Alexis-Melot>`_
714 * Adam Willats (`@awillats <https://github.com/awillats>`_)
715 * Felix C. Stegerman (`@obfusk <https://github.com/obfusk>`_)
716 * Eugen Skrebenkov (`@shcecter <https://github.com/shcecter>`_)
717 * Maurizio DE PITTA (`@mdepitta <https://github.com/mdepitta>`_)
718 * Simo (`@sivanni <https://github.com/sivanni>`_)
719 * Peter Quitta (`@peschn <https://github.com/peschn>`_)
720 * Étienne Mollier (`@emollier <https://github.com/emollier>`_)
721 * chaddy (`@chaddy1004 <https://github.com/chaddy1004>`_)
722 * `@DePasquale99 <https://github.com/DePasquale99>`_
723 * `@albertalbesa <https://github.com/albertalbesa>`_
724 * Christian Behrens (`@chbehrens <https://github.com/chbehrens>`_)
725
726 Other contributions outside of github (ordered alphabetically, apologies to
727 anyone we forgot...):
728
729 * forum user `Shencong <https://brian.discourse.group/u/shencong/>`_
730 * forum user `SIbanez <https://brian.discourse.group/u/sibanez/>`_
731
732 Brian 2.4.1
733 -----------
734 This is a bugfix release with a number of small fixes and updates to the continuous
735 integration testing.
736
737 Selected improvements and bug fixes
738 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
739 * The `check_units` decorator can now express that some arguments need to have the same
740 units. This mechanism is now used to check the units of the `clip` function
741 (:issue:`1234`). Thanks to Felix Kern for notifying us of this issue.
742 * Using `SpatialNeuron` with Cython no longer raises an unnecessary warning when the
743 ``scipy`` library is not installed (:issue:`1230`).
744 * Raise an error for references to ``N_incoming`` or ``N_outgoing`` in calls to
745 `Synapses.connect`. This use is ill-defined and led to compilation errors in previous
746 versions (:issue:`1227`). Thanks to Denis Alevi for making us aware of this issue.
747
748 Infrastructure and documentation improvements
749 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
750 * Brian no longer officially supports installation on 32bit operating systems.
751 Installation via ``pip`` will probably still work, but we are no longer testing this
752 configuration (:issue:`1232`).
753 * Automatic continuous integration tests for Windows now use the
754 `Microsoft Azure Pipeline <https://azure.microsoft.com/en-us/services/devops/pipelines/>`_
755 infrastructure instead of `Appveyor <https://www.appveyor.com/>`_. This should speed
756 up tests by running different configurations in parallel (:issue:`1233`).
757 * Fix an issue in the test suite that did not handle ``NotImplementedError`` correctly
758 anymore after the changes introduced with :issue:`1196`.
759
760 Contributions
761 ~~~~~~~~~~~~~
762 Github code, documentation, and issue contributions (ordered by the number of
763 contributions):
764
765 * Marcel Stimberg (`@mstimberg <https://github.com/mstimberg>`_)
766 * Dan Goodman (`@thesamovar <https://github.com/thesamovar>`_)
767 * Denis Alevi (`@denisalevi <https://github.com/denisalevi>`_)
768 * SK (`@akatav <https://github.com/akatav>`_)
769
770 Other contributions outside of github (ordered alphabetically, apologies to
771 anyone we forgot...):
772
773 * Felix B. Kern
774
775 Brian 2.4
776 ---------
777 This new release contains a large number of small improvements and bug fixes. We
778 recommend all users of Brian 2 to upgrade. The biggest code change of this new version
779 is that Brian is now Python-3 only (thanks to Ben Evans for working on this).
780
781 Selected improvements and bug fixes
782 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
783 * Removing objects from networks no longer fails (:issue:`1151`). Thanks to Wilhelm
784 Braun for reporting the issue.
785 * Point currents marked as ``constant over dt`` are now correctly handled
786 (:issue:`1160`). Thanks to Andrew Brughera for reporting the issue.
787 * Elapsed and estimated remaining time are now formatted as hours/minutes/etc.
788 in standalone mode as well (:issue:`1162`). Thanks to Rahul Kumar Gupta,
789 Syed Osama Hussain, Bhuwan Chandra, and Vigneswaran Chandrasekaran for working
790 on this issue as part of the GSoC 2020 application process.
791 * To prevent log files filling up the disk (:issue:`1188`), their file size is now limited to
792 10MB (configurable via the `logging.file_log_max_size` preference). Thanks to
793 Rike-Benjamin Schuppner for contributing this feature.
794 * Add more complete support for operations on `.VariableView` attributes. Previously,
795 operations like ``group.v**2`` failed and required the workaround ``group.v[:]**2`` (:issue:`1195`)
796 * Fix a number of compatibility issues with newer versions of numpy and sympy, and document our policy
797 on :doc:`compatibility`.
798 * File locking (used to avoid problems when running multiple simulations in parallel) is now based on
799 Benedikt Schmitt's `py-filelock <https://github.com/benediktschmitt/py-filelock>`_ package, which
800 should hopefully make it more robust.
801 * String expressions in `Synapses.connect` are now checked for syntactic correctness
802 before handing them over to the code generation process, improving error messages.
803 Thanks to Denis Alevi for making us aware of this issue. (:issue:`1224`)
804 * Avoid duplicate messages in "chained" exceptions. Also introduces a new preference
805 `logging.display_brian_error_message` to switch off the "Brian 2 encountered an unexpected
806 error" message (:issue:`1196`).
807 * Brian's unit system now correctly deals with matrix multiplication, including the
808 ``@`` operator (:issue:`1216`). Thanks to `@kjohnsen <https://github.com/kjohnsen>`_
809 for reporting this issue.
810 * Avoid turning all integer numbers in equations into floating point values (:issue:`1202`).
811 Thanks to Marco K. for making us aware of this issue.
812 * New attributes `.Synapses.N_outgoing_pre` and `.Synapses.N_incoming_post` to access
813 the number of synapses per pre-/post-synaptic cell (see
814 :ref:`accessing_synaptic_variables` for details; :issue:`1225`)
815
816 Contributions
817 ~~~~~~~~~~~~~
818 Github code, documentation, and issue contributions (ordered by the number of
819 contributions):
820
821 * Marcel Stimberg (`@mstimberg <https://github.com/mstimberg>`_)
822 * Ben Evans (`@bdevans <https://github.com/bdevans>`_)
823 * Dan Goodman (`@thesamovar <https://github.com/thesamovar>`_)
824 * Denis Alevi (`@denisalevi <https://github.com/denisalevi>`_)
825 * Rike-Benjamin Schuppner (`@Debilski <https://github.com/Debilski>`_)
826 * Syed Osama Hussain (`@Syed-Osama-Hussain <https://github.com/Syed-Osama-Hussain>`_)
827 * VigneswaranC (`@Vigneswaran-Chandrasekaran <https://github.com/Vigneswaran-Chandrasekaran>`_)
828 * Tushar (`@smalltimer <https://github.com/smalltimer>`_)
829 * Felix Hoffmann (`@felix11h <https://github.com/felix11h>`_)
830 * Rahul Kumar Gupta (`@rahuliitg <https://github.com/rahuliitg>`_)
831 * Dominik Spicher (`@dspicher <https://github.com/dspicher>`_)
832 * `@nfzd <https://github.com/nfzd>`_
833 * `@Snow-Crash <https://github.com/Snow-Crash>`_
834 * `@cnjackhu <https://github.com/cnjackhu>`_
835 * `@neurologic <https://github.com/neurologic>`_
836 * `@kjohnsen <https://github.com/kjohnsen>`_
837 * Ashwin Viswanathan Kannan (`@ashwin4ever <https://github.com/ashwin4ever>`_)
838 * Bhuwan Chandra (`@zeph1yr <https://github.com/zeph1yr>`_)
839 * Wilhelm Braun (`@wilhelmbraun <https://github.com/wilhelmbraun>`_)
840 * `@cortical-iv <https://github.com/cortical-iv>`_
841 * Eugen Skrebenkov (`@shcecter <https://github.com/shcecter>`_)
842 * `@Aman-A <https://github.com/Aman-A>`_
843 * Felix Benjamin Kern (`@kernfel <https://github.com/kernfel>`_)
844 * Francesco Battaglia (`@fpbattaglia <https://github.com/fpbattaglia>`_)
845 * Shivam Chitnis (`@shivChitinous <https://github.com/shivChitinous>`_)
846 * Marco K. (`@spokli <https://github.com/spokli>`_)
847 * `@jcmharry <https://github.com/jcmharry>`_
848 * Friedemann Zenke (`@fzenke <https://github.com/fzenke>`_)
849 * `@Adam-Antios <https://github.com/Adam-Antios>`_
850
851 Other contributions outside of github (ordered alphabetically, apologies to
852 anyone we forgot...):
853
854 * Andrew Brughera
855 * William Xavier
856
857
858 .. _brian2.3:
859
860 Brian 2.3
861 ---------
862 This release contains the usual mix of bug fixes and new features (see below), but
863 also makes some important changes to the Brian 2 code base to pave the way for
864 the full Python 2 -> 3 transition (the source code is now directly compatible with
865 Python 2 and Python 3, without the need for any translation at install time). Please
866 note that this release will be the last release that supports
867 Python 2, given that Python 2 reaches end-of-life in January 2020. Brian now also uses
868 `pytest <https://docs.pytest.org>`_ as its testing framework, since the previously used
869 ``nose`` package is not maintained anymore. Since `brian2hears <https://brian2hears.readthedocs.io>`_
870 has been released as an independent package, using `brian2.hears` as a "bridge" to
871 Brian 1's ``brian.hears`` package is now deprecated.
872
873 Finally, the Brian project has adopted the "Contributor Covenant"
874 :doc:`code_of_conduct`, pledging "to make participation in our community a
875 harassment-free experience for everyone".
876
877 New features
878 ~~~~~~~~~~~~
879 * The `restore` function can now also restore the state of the random number generator,
880 allowing for exact reproducibility of stochastic simulations (:issue:`1134`)
881 * The functions `expm1`, `log1p`, and `exprel` can now be used (:issue:`1133`)
882 * The system for calling random number generating functions has been generalized (see
883 :ref:`function_vectorisation`), and a new `poisson` function for Poisson-distrubted
884 random numbers has been added (:issue:`1111`)
885 * New versions of Visual Studio are now supported for standalone mode on Windows
886 (:issue:`1135`)
887
888 Selected improvements and bug fixes
889 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
890 * `~brian2.groups.group.Group.run_regularly` operations are now included in the network, even if they are
891 created after the parent object was added to the network (:issue:`1009`).
892 Contributed by `Vigneswaran Chandrasekaran <https://github.com/Vigneswaran-Chandrasekaran>`_.
893 * No longer incorrectly classify some equations as having "multiplicative noise" (:issue:`968`).
894 Contributed by `Vigneswaran Chandrasekaran <https://github.com/Vigneswaran-Chandrasekaran>`_.
895 * Brian is now compatible with Python 3.8 (:issue:`1130`), and doctests are compatible
896 with numpy 1.17 (:issue:`1120`)
897 * Progress reports for repeated runs have been fixed (:issue:`1116`), thanks to Ronaldo
898 Nunes for reporting the issue.
899 * `SpikeGeneratorGroup` now correctly works with `restore` (:issue:`1084`), thanks to
900 Tom Achache for reporting the issue.
901 * An indexing problem in `PopulationRateMonitor` has been fixed (:issue:`1119`).
902 * Handling of equations referring to ``-inf`` has been fixed (:issue:`1061`).
903 * Long simulations recording more than ~2 billion data points no longer crash with a
904 segmentation fault (:issue:`1136`), thanks to Rike-Benjamin Schuppner for reporting
905 the issue.
906
907 Backward-incompatible changes
908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
909 * The fix for `~brian2.groups.group.Group.run_regularly` operations (:issue:`1009`, see above) entails
910 a change in how objects are stored within `Network` objects. Previously, `Network.objects` stored a
911 complete list of all objects, including objects such as `~brian2.groups.neurongroup.StateUpdater` that
912 – often invisible to the user – are a part of major objects such as
913 `NeuronGroup`. Now, `Network.objects` only stores the objects directly
914 provided by the user (`NeuronGroup`, `Synapses`, `StateMonitor`, ...), the
915 dependent objects (`~brian2.groups.neurongroup.StateUpdater`, `~brian2.groups.neurongroup.Thresholder`, ...) are taken into account
916 at the time of the run. This might break code in some corner cases, e.g.
917 when removing a `~brian2.groups.neurongroup.StateUpdater` from `Network.objects` via `Network.remove`.
918 * The `brian2.hears` interface to Brian 1's ``brian.hears`` package has been deprecated.
919
920 Infrastructure and documentation improvements
921 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
922 * The same code base is used on Python 2 and Python 3 (:issue:`1073`).
923 * The test framework uses ``pytest`` (:issue:`1127`).
924 * We have adapoted a Code of Conduct (:issue:`1113`), thanks to Tapasweni Pathak for the
925 suggestion.
926
927 Contributions
928 ~~~~~~~~~~~~~
929 Github code, documentation, and issue contributions (ordered by the number of
930 contributions):
931
932 * Marcel Stimberg (`@mstimberg <https://github.com/mstimberg>`_)
933 * Dan Goodman (`@thesamovar <https://github.com/thesamovar>`_)
934 * Vigneswaran Chandrasekaran (`@Vigneswaran-Chandrasekaran <https://github.com/Vigneswaran-Chandrasekaran>`_)
935 * Moritz Orth (`@morth <https://github.com/morth>`_)
936 * Tristan Stöber (`@tristanstoeber <https://github.com/tristanstoeber>`_)
937 * `@ulyssek <https://github.com/ulyssek>`_
938 * Wilhelm Braun (`@wilhelmbraun <https://github.com/wilhelmbraun>`_)
939 * `@flomlo <https://github.com/flomlo>`_
940 * Rike-Benjamin Schuppner (`@Debilski <https://github.com/Debilski>`_)
941 * `@sdeiss <https://github.com/sdeiss>`_
942 * Ben Evans (`@bdevans <https://github.com/bdevans>`_)
943 * Tapasweni Pathak (`@tapaswenipathak <https://github.com/tapaswenipathak>`_)
944 * `@jonathanoesterle <https://github.com/jonathanoesterle>`_
945 * Richard C Gerkin (`@rgerkin <https://github.com/rgerkin>`_)
946 * Christian Behrens (`@chbehrens <https://github.com/chbehrens>`_)
947 * Romain Brette (`@romainbrette <https://github.com/romainbrette>`_)
948 * XiaoquinNUDT (`@XiaoquinNUDT <https://github.com/XiaoquinNUDT>`_)
949 * Dylan Muir (`@DylanMuir <https://github.com/DylanMuir>`_)
950 * Aleksandra Teska (`@alTeska <https://github.com/alTeska>`_)
951 * Felix Z. Hoffmann (`@felix11h <https://github.com/felix11h>`__)
952 * `@baixiaotian63648995 <https://github.com/baixiaotian63648995>`_
953 * Carlos de la Torre (`@c-torre <https://github.com/c-torre>`_)
954 * Sam Mathias (`@sammosummo <https://github.com/sammosummo>`_)
955 * `@Marghepano <https://github.com/Marghepano>`_
956 * Simon Brodeur (`@sbrodeur <https://github.com/sbrodeur>`_)
957 * Alex Dimitrov (`@adimitr <https://github.com/adimitr>`_)
958
959
960 Other contributions outside of github (ordered alphabetically, apologies to
961 anyone we forgot...):
962
963 * Ronaldo Nunes
964 * Tom Achache
965
966 Brian 2.2.2.1
967 -------------
968 This is a bug-fix release that fixes several bugs and adds a few minor new
969 features. We recommend all users of Brian 2 to upgrade.
970
971 As always, please report bugs or suggestions to the github bug tracker
972 (https://github.com/brian-team/brian2/issues) or to the brian-development
973 mailing list ([email protected]).
974
975 [Note that the original upload of this release was version 2.2.2, but due to
976 a mistake in the released archive, it has been uploaded again as version 2.2.2.1]
977
978 Selected improvements and bug fixes
979 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
980 * Fix an issue with the synapses generator syntax (:issue:`1037`).
981 * Fix an incorrect error when using a `SpikeGeneratorGroup` with a long period
982 (:issue:`1041`). Thanks to Kévin Cuallado-Keltsch for reporting this issue.
983 * Improve the performance of `SpikeGeneratorGroup` by avoiding a conversion
984 from time to integer time step (:issue:`1043`). This time step is now also
985 available to user code as ``t_in_timesteps``.
986 * Function definitions for weave/Cython/C++ standalone can now declare
987 additional header files and libraries. They also support a new ``sources``
988 argument to use a function definition from an external file. See the
989 :doc:`../advanced/functions` documentation for details.
990 * For convenience, single-neuron subgroups can now be created with a single
991 index instead of with a slice (e.g. ``neurongroup[3]`` instead of
992 ``neurongroup[3:4]``).
993 * Fix an issue when ``-inf`` is used in an equation (:issue:`1061`).
994
995 Contributions
996 ~~~~~~~~~~~~~
997 Github code, documentation, and issue contributions (ordered by the number of
998 contributions):
999
1000 * Marcel Stimberg (`@mstimberg <https://github.com/mstimberg>`_)
1001 * Dan Goodman (`@thesamovar <https://github.com/thesamovar>`_)
1002 * Felix Z. Hoffmann (`@Felix11H <https://github.com/Felix11H>`_)
1003 * `@wjx0914 <https://github.com/wjx0914>`_
1004 * Kévin Cuallado-Keltsch (`@kevincuallado <https://github.com/kevincuallado>`_)
1005 * Romain Cazé (`@rcaze <https://github.com/rcaze>`_)
1006 * Daphne (`@daphn3cor <https://github.com/daphn3cor>`_)
1007 * Erik (`@parenthetical-e <https://github.com/parenthetical-e>`_)
1008 * `@RahulMaram <https://github.com/RahulMaram>`_
1009 * Eghbal Hosseini (`@eghbalhosseini <https://github.com/eghbalhosseini>`_)
1010 * Martino Sorbaro (`@martinosorb <https://github.com/martinosorb>`_)
1011 * Mihir Vaidya (`@MihirVaidya94 <https://github.com/MihirVaidya94>`_)
1012 * `@hellolingling <https://github.com/hellolingling>`_
1013 * Volodimir Slobodyanyuk (`@vslobody <https://github.com/vslobody>`_)
1014 * Peter Duggins (`@psipeter <https://github.com/psipeter>`_)
1015
1016
1017 Brian 2.2.1
1018 -----------
1019 This is a bug-fix release that fixes a few minor bugs and incompatibilites with
1020 recent versions of the dependencies. We recommend all users of Brian 2 to
1021 upgrade.
1022
1023 As always, please report bugs or suggestions to the github bug tracker
1024 (https://github.com/brian-team/brian2/issues) or to the brian-development
1025 mailing list ([email protected]).
1026
1027 Selected improvements and bug fixes
1028 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1029 * Work around problems with the latest version of ``py-cpuinfo`` on Windows
1030 (:issue:`990`, :issue:`1020`) and no longer require it for Linux and OS X.
1031 * Avoid warnings with newer versions of Cython (:issue:`1030`) and correctly
1032 build the Cython spike queue for Python 3.7 (:issue:`1026`), thanks to Fleur
1033 Zeldenrust and Ankur Sinha for reporting these issues.
1034 * Fix error messages for ``SyntaxError`` exceptions in jupyter notebooks
1035 (:issue:`#964`).
1036
1037 Dependency and packaging changes
1038 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1039 * Conda packages in `conda-forge <https://conda-forge.org/>`_ are now avaible
1040 for Python 3.7 (but no longer for Python 3.5).
1041 * Linux and OS X no longer depend on the ``py-cpuinfo`` package.
1042 * Source packages on `pypi <https://pypi.org/>`_ now require a recent Cython
1043 version for installation.
1044
1045 Contributions
1046 ~~~~~~~~~~~~~
1047 Github code, documentation, and issue contributions (ordered by the number of
1048 contributions):
1049
1050 * Marcel Stimberg (`@mstimberg <https://github.com/mstimberg>`_)
1051 * Dan Goodman (`@thesamovar <https://github.com/thesamovar>`_)
1052 * Christopher (`@Chris-Currin <https://github.com/Chris-Currin>`_)
1053 * Peter Duggins (`@psipeter <https://github.com/psipeter>`_)
1054 * Paola Suárez (`@psrmx <https://github.com/psrmx>`_)
1055 * Ankur Sinha (`@sanjayankur31 <https://github.com/sanjayankur31>`_)
1056 * `@JingjinW <https://github.com/JingjinW>`_
1057 * Denis Alevi (`@denisalevi <https://github.com/denisalevi>`_)
1058 * `@lemonade117 <https://github.com/lemonade117>`_
1059 * `@wjx0914 <https://github.com/wjx0914>`_
1060 * Sven Leach (`@SvennoNito <https://github.com/SvennoNito>`_)
1061 * svadams (`@svadams <https://github.com/svadams>`_)
1062 * `@ghaessig <https://github.com/ghaessig>`_
1063 * Varshith Sreeramdass (`@varshiths <https://github.com/varshiths>`_)
1064
1065
1066 Brian 2.2
1067 ---------
1068 This releases fixes a number of important bugs and comes with a number of
1069 performance improvements. It also makes sure that simulation no longer give
1070 platform-dependent results for certain corner cases that involve the division of
1071 integers. These changes can break backwards-compatiblity in certain cases, see
1072 below. We recommend all users of Brian 2 to upgrade.
1073
1074 As always, please report bugs or suggestions to the github bug tracker
1075 (https://github.com/brian-team/brian2/issues) or to the brian-development
1076 mailing list ([email protected]).
1077
1078 Selected improvements and bug fixes
1079 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1080 * Divisions involving integers now use floating point division, independent of
1081 Python version and code generation target. The ``//`` operator can now used in
1082 equations and expressions to denote flooring division (:issue:`984`).
1083 * Simulations can now use single precision instead of double precision floats in
1084 simulations (:issue:`981`, :issue:`1004`). This is mostly intended for use
1085 with GPU code generation targets.
1086 * The `~brian2.core.functions.timestep`, introduced in version 2.1.3, was
1087 further optimized for performance, making the refractoriness calculation
1088 faster (:issue:`996`).
1089 * The ``lastupdate`` variable is only automatically added to synaptic models
1090 when event-driven equations are used, reducing the memory and performance
1091 footprint of simple synaptic models (:issue:`1003`). Thanks to Denis Alevi
1092 for bringing this up.
1093 * A ``from brian2 import *`` imported names unrelated to Brian, and overwrote
1094 some Python builtins such as ``dir`` (:issue:`969`). Now, fewer names are
1095 imported (but note that this still includes numpy and plotting tools:
1096 :doc:`../user/import`).
1097 * The ``exponential_euler`` state updater is no longer failing for systems of
1098 equations with differential equations that have trivial, constant
1099 right-hand-sides (:issue:`1010`). Thanks to Peter Duggins for making us aware
1100 of this issue.
1101
1102 Backward-incompatible changes
1103 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1104 * Code that divided integers (e.g. ``N/10``) with a C-based code generation
1105 target, or with the ``numpy`` target on Python 2, will now use floating point
1106 division instead of flooring division (i.e., Python 3 semantics). A warning
1107 will notify the user of this change, use either the flooring division operator
1108 (``N//10``), or the ``int`` function (``int(N/10)``) to make the expression
1109 unambiguous.
1110 * Code that directly referred to the ``lastupdate`` variable in synaptic
1111 statements, without using any event-driven variables, now has to manually add
1112 ``lastupdate : second`` to the equations and update the variable at the end
1113 of ``on_pre`` and/or ``on_post`` with ``lastupdate = t``.
1114 * Code that relied on ``from brian2 import *`` also importing unrelated names
1115 such as ``sympy``, now has to import such names explicitly.
1116
1117 Documentation improvements
1118 ~~~~~~~~~~~~~~~~~~~~~~~~~~
1119 * Various small fixes and additions (e.g. installation instructions, available
1120 functions, fixes in examples)
1121 * A new example, :doc:`Izhikevich 2007 <../examples/frompapers.Izhikevich_2007>`,
1122 provided by `Guillaume Dumas <https://github.com/deep-introspection>`_.
1123
1124 Contributions
1125 ~~~~~~~~~~~~~
1126 Github code, documentation, and issue contributions (ordered by the number of
1127 contributions):
1128
1129 * Marcel Stimberg (`@mstimberg <https://github.com/mstimberg>`_)
1130 * Dan Goodman (`@thesamovar <https://github.com/thesamovar>`_)
1131 * Denis Alevi (`@denisalevi <https://github.com/denisalevi>`_)
1132 * Thomas Nowotny (`@tnowotny <https://github.com/tnowotny>`_)
1133 * `@neworderofjamie <https://github.com/neworderofjamie>`_
1134 * Paul Brodersen (`@paulbrodersen <https://github.com/paulbrodersen>`_)
1135 * `@matrec4 <https://github.com/matrec4>`_
1136 * svadams (`@svadams <https://github.com/svadams>`_)
1137 * XiaoquinNUDT (`@XiaoquinNUDT <https://github.com/XiaoquinNUDT>`_)
1138 * Peter Duggins (`@psipeter <https://github.com/psipeter>`_)
1139 * `@nh17937 <https://github.com/nh17937>`_
1140 * Patrick Nave (`@pnave95 <https://github.com/pnave95>`_)
1141 * `@AI-pha <https://github.com/AI-pha>`_
1142 * Guillaume Dumas (`@deep-introspection <https://github.com/deep-introspection>`_)
1143 * `@godelicbach <https://github.com/godelicbach>`_
1144 * `@galharth <https://github.com/galharth>`_
1145
1146
1147 Brian 2.1.3.1
1148 -------------
1149 This is a bug-fix release that fixes two bugs in the recent 2.1.3 release:
1150
1151 * Fix an inefficiency in the newly introduced `~brian2.core.functions.timestep`
1152 function when using the ``numpy`` target (:issue:`965`)
1153 * Fix inefficiencies in the unit system that could lead to slow operations
1154 and high memory use (:issue:`967`). Thanks to Kaustab Pal for making us
1155 aware of the issue.
1156
1157 Brian 2.1.3
1158 -----------
1159 This is a bug-fix release that fixes a number of important bugs (see below),
1160 but does not introduce any new features. We recommend all users of Brian 2 to
1161 upgrade.
1162
1163 As always, please report bugs or suggestions to the github bug tracker
1164 (https://github.com/brian-team/brian2/issues) or to the brian-development
1165 mailing list ([email protected]).
1166
1167 Selected improvements and bug fixes
1168 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1169 - The Cython cache on disk now uses significantly less space by deleting
1170 unnecessary source files (set the `codegen.runtime.cython.delete_source_files`
1171 preference to ``False`` if you want to keep these files for debugging). In
1172 addition, a warning will be given when the Cython or weave cache exceeds a
1173 configurable size (`codegen.max_cache_dir_size`). The
1174 `~brian2.__init__.clear_cache` function is provided to delete files from the
1175 cache (:issue:`914`).
1176 - The C++ standalone mode now respects the ``profile`` option and therefore no
1177 longer collects profiling information by default. This can speed up
1178 simulations in certain cases (:issue:`935`).
1179 - The exact number of time steps that a neuron stays in the state of
1180 refractoriness after a spike could vary by up to one time step when the
1181 requested refractory time was a multiple of the simulation time step. With
1182 this fix, the number of time steps is ensured to be as expected by making
1183 use of a new `~brian2.core.functions.timestep` function that avoids floating
1184 point rounding issues (:issue:`949`, first reported by
1185 `@zhouyanasd <https://github.com/zhouyanasd>`_ in issue :issue:`943`).
1186 - When `restore` was called twice for a network, spikes that were not yet
1187 delivered to their target were not restored correctly (:issue:`938`, reported by
1188 `@zhouyanasd <https://github.com/zhouyanasd>`_).
1189 - `SpikeGeneratorGroup` now uses a more efficient method for sorting spike
1190 indices and times, leading to a much faster preparation time for groups that
1191 store many spikes (:issue:`948`).
1192 - Fix a memory leak in `TimedArray` (:issue:`923`, reported by Wilhelm Braun).
1193 - Fix an issue with summed variables targetting subgroups (:issue:`925`,
1194 reported by `@AI-pha <https://github.com/AI-pha>`_).
1195 - Fix the use of `~brian2.groups.group.Group.run_regularly` on subgroups
1196 (:issue:`922`, reported by `@AI-pha <https://github.com/AI-pha>`_).
1197 - Improve performance for `SpatialNeuron` by removing redundant computations
1198 (:issue:`910`, thanks to `Moritz Augustin <https://github.com/moritzaugustin>`_
1199 for making us aware of the issue).
1200 - Fix linked variables that link to scalar variables (:issue:`916`)
1201 - Fix warnings for numpy 1.14 and avoid compilation issues when switching
1202 between versions of numpy (:issue:`913`)
1203 - Fix problems when using logical operators in code generated for the numpy
1204 target which could lead to issues such as wrongly connected synapses
1205 (:issue:`901`, :issue:`900`).
1206
1207 Backward-incompatible changes
1208 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1209 - No longer allow ``delay`` as a variable name in a synaptic model to avoid
1210 ambiguity with respect to the synaptic delay. Also no longer allow access to
1211 the ``delay`` variable in synaptic code since there is no way to distinguish
1212 between pre- and post-synaptic delay (:issue:`927`, reported by Denis Alevi).
1213 - Due to the changed handling of refractoriness (see bug fixes above),
1214 simulations that make use of refractoriness will possibly no longer give
1215 exactly the same results. The preference `legacy.refractory_timing` can
1216 be set to ``True`` to reinstate the previous behaviour.
1217
1218 Infrastructure and documentation improvements
1219 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1220 - From this version on, conda packages will be available on
1221 `conda-forge <https://conda-forge.org/>`_. For a limited time, we will copy
1222 over packages to the ``brian-team`` channel as well.
1223 - Conda packages are no longer tied to a specific numpy version (PR :issue:`954`)
1224 - New example (:doc:`Brunel & Wang, 2001 <../examples/frompapers.Brunel_Wang_2001>`)
1225 contributed by `Teo Stocco <https://github.com/zifeo>`_ and
1226 `Alex Seeholzer <https://github.com/flinz>`_.
1227
1228 Contributions
1229 ~~~~~~~~~~~~~
1230 Github code, documentation, and issue contributions (ordered by the number of
1231 contributions):
1232
1233 * Marcel Stimberg (`@mstimberg <https://github.com/mstimberg>`_)
1234 * Dan Goodman (`@thesamovar <https://github.com/thesamovar>`_)
1235 * Teo Stocco (`@zifeo <https://github.com/zifeo>`_)
1236 * Dylan Muir (`@DylanMuir <https://github.com/DylanMuir>`_)
1237 * scarecrow (`@zhouyanasd <https://github.com/zhouyanasd>`_)
1238 * `@fuadfukhasyi <https://github.com/fuadfukhasyi>`_
1239 * Aditya Addepalli (`@Dyex719 <https://github.com/Dyex719>`_)
1240 * Kapil kumar (`@kapilkd13 <https://github.com/kapilkd13>`_)
1241 * svadams (`@svadams <https://github.com/svadams>`_)
1242 * Vafa Andalibi (`@Vafa-Andalibi <https://github.com/Vafa-Andalibi>`_)
1243 * Sven Leach (`@SvennoNito <https://github.com/SvennoNito>`_)
1244 * `@matrec4 <https://github.com/matrec4>`_
1245 * `@jarishna <https://github.com/jarishna>`_
1246 * `@AI-pha <https://github.com/AI-pha>`_
1247 * `@xdzhangxuejun <https://github.com/xdzhangxuejun>`_
1248 * Denis Alevi (`@denisalevi <https://github.com/denisalevi>`_)
1249 * Paul Pfeiffer (`@pfeffer90 <https://github.com/pfeffer90>`_)
1250 * Romain Brette (`@romainbrette <https://github.com/romainbrette>`_)
1251 * `@hustyanghui <https://github.com/hustyanghui>`_
1252 * Adrien F. Vincent (`@afvincent <https://github.com/afvincent>`_)
1253 * `@ckemere <https://github.com/ckemere>`_
1254 * `@evearmstrong <https://github.com/evearmstrong>`_
1255 * Paweł Kopeć (`@pawelkopec <https://github.com/pawelkopec>`_)
1256 * Moritz Augustin (`@moritzaugustin <https://github.com/moritzaugustin>`_)
1257 * Bart (`@louwers <https://github.com/louwers>`_)
1258 * `@amarsdd <https://github.com/amarsdd>`_
1259 * `@ttxtea <https://github.com/ttxtea>`_
1260 * Maria Cervera (`@MariaCervera <https://github.com/MariaCervera>`_)
1261 * ouyangxinrong (`@longzhixin <https://github.com/longzhixin>`_)
1262
1263 Other contributions outside of github (ordered alphabetically, apologies to
1264 anyone we forgot...):
1265
1266 * Wilhelm Braun
1267
1268 Brian 2.1.2
1269 -----------
1270 This is another bug fix release that fixes a major bug in `Equations`'
1271 substitution mechanism (:issue:`896`). Thanks to Teo Stocco for reporting this issue.
1272
1273 Brian 2.1.1
1274 -----------
1275 This is a bug fix release that re-activates parts of the caching mechanism for
1276 code generation that had been erroneously deactivated in the previous release.
1277
1278 Brian 2.1
1279 ---------
1280 This release introduces two main new features: a new "GSL integration" mode for
1281 differential equation that offers to integrate equations with variable-timestep
1282 methods provided by the GNU Scientific Library, and caching for the run
1283 preparation phase that can significantly speed up simulations. It also comes
1284 with a newly written tutorial, as well as additional documentation and examples.
1285
1286 As always, please report bugs or suggestions to the github bug tracker
1287 (https://github.com/brian-team/brian2/issues) or to the brian-development
1288 mailing list ([email protected]).
1289
1290 New features
1291 ~~~~~~~~~~~~
1292 * New numerical integration methods with variable time-step integration, based
1293 on the GNU Scientific Library (see :ref:`numerical_integration`). Contributed
1294 by `Charlee Fletterman <https://github.com/CharleeSF>`_, supported by 2017's
1295 `Google Summer of Code <https://summerofcode.withgoogle.com>`_ program.
1296 * New caching mechanism for the code generation stage (application of numerical
1297 integration algorithms, analysis of equations and statements, etc.), reducing
1298 the preparation time before the actual run, in particular for simulations with
1299 multiple `run` statements.
1300
1301 Selected improvements and bug fixes
1302 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1303 * Fix a rare problem in Cython code generation caused by missing type information (:issue:`893`)
1304 * Fix warnings about improperly closed files on Python 3.6 (:issue:`892`;
1305 reported and fixed by `Teo Stocco <https://github.com/zifeo>`_)
1306 * Fix an error when using numpy integer types for synaptic indexing (:issue:`888`)
1307 * Fix an error in numpy codegen target, triggered when assigning to a variable with an unfulfilled condition (:issue:`887`)
1308 * Fix an error when repeatedly referring to subexpressions in multiline statements (:issue:`880`)
1309 * Shorten long arrays in warning messages (:issue:`874`)
1310 * Enable the use of ``if`` in the shorthand generator syntax for `Synapses.connect` (:issue:`873`)
1311 * Fix the meaning of ``i`` and ``j`` in synapses connecting to/from other synapses (:issue:`854`)
1312
1313 Backward-incompatible changes and deprecations
1314 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1315 * In C++ standalone mode, information about the number of synapses and spikes
1316 will now only be displayed when built with ``debug=True`` (:issue:`882`).
1317 * The ``linear`` state updater has been renamed to ``exact`` to avoid confusion
1318 (:issue:`877`). Users are encouraged to use ``exact``, but the name ``linear``
1319 is still available and does not raise any warning or error for now.
1320 * The ``independent`` state updater has been marked as deprecated and might be
1321 removed in future versions.
1322
1323 Infrastructure and documentation improvements
1324 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1325 * A new, more advanced, :doc:`tutorial <../resources/tutorials/3-intro-to-brian-simulations>` "about
1326 managing the slightly more complicated tasks that crop up in research
1327 problems, rather than the toy examples we’ve been looking at so far."
1328 * Additional documentation on :doc:`../advanced/custom_events` and
1329 :doc:`../user/converting_from_integrated_form` (including example code for
1330 typical synapse models).
1331 * New example code reproducing published findings (:doc:`Platkiewicz and Brette, 2011 <../examples/frompapers.Platkiewicz_Brette_2011>`;
1332 :ref:`Stimberg et al., 2018 <frompapers.stimberg_et_al_2018>`)
1333 * Fixes to the sphinx documentation creation process, the documentation can be downloaded as a PDF once again (705 pages!)
1334 * Conda packages now have support for numpy 1.13 (but support for numpy 1.10 and 1.11 has been removed)
1335
1336 Contributions
1337 ~~~~~~~~~~~~~
1338 Github code, documentation, and issue contributions (ordered by the number of
1339 contributions):
1340
1341 * Marcel Stimberg (`@mstimberg <https://github.com/mstimberg>`_)
1342 * Charlee Fletterman (`@CharleeSF <https://github.com/CharleeSF>`_)
1343 * Dan Goodman (`@thesamovar <https://github.com/thesamovar>`_)
1344 * Teo Stocco (`@zifeo <https://github.com/zifeo>`_)
1345 * `@k47h4 <https://github.com/k47h4>`_
1346
1347 Other contributions outside of github (ordered alphabetically, apologies to
1348 anyone we forgot...):
1349
1350 * Chaofei Hong
1351 * Lucas ("lucascdst")
1352
1353
1354 Brian 2.0.2.1
1355 -------------
1356
1357 Fixes a bug in the tutorials' HMTL rendering on readthedocs.org (code blocks
1358 were not displayed). Thanks to Flora Bouchacourt for making us aware of this
1359 problem.
1360
1361 Brian 2.0.2
1362 -----------
1363
1364 New features
1365 ~~~~~~~~~~~~
1366 * `molar` and `liter` (as well as `litre`, scaled versions of the former, and a
1367 few useful abbreviations such as `mM`) have been added as new units (:issue:`574`).
1368 * A new module `brian2.units.constants` provides physical constants such as the
1369 Faraday constants or the gas constant (see :ref:`constants` for details).
1370 * `SpatialNeuron` now supports non-linear membrane currents (e.g.
1371 Goldman–Hodgkin–Katz equations) by linearizing them with respect to v.
1372 * Multi-compartmental models can access the capacitive current via `Ic` in
1373 their equations (:issue:`677`)
1374 * A new function `scheduling_summary` that displays information about the
1375 scheduling of all objects (see :ref:`scheduling` for details).
1376 * Introduce a new preference to pass arguments to the ``make``/``nmake`` command
1377 in C++ standalone mode (`devices.cpp_standalone.extra_make_args_unix` for
1378 Linux/OS X and `devices.cpp_standalone.extra_make_args_windows` for Windows).
1379 For Linux/OS X, this enables parallel compilation by default.
1380 * Anaconda packages for Brian 2 are now available for Python 3.6 (but Python 3.4
1381 support has been removed).
1382
1383 Selected improvements and bug fixes
1384 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1385 * Work around low performance for certain C++ standalone simulations on Linux,
1386 due to a bug in glibc (see :issue:`803`). Thanks to Oleg Strikov
1387 (`@xj8z <https://github.com/xj8z>`_) for debugging this
1388 issue and providing the workaround that is now in use.
1389 * Make exact integration of ``event-driven`` synaptic variables use the
1390 ``linear`` numerical integration algorithm (instead of ``independent``),
1391 fixing rare occasions where integration failed despite the equations being
1392 linear (:issue:`801`).
1393 * Better error messages for incorrect unit definitions in equations.
1394 * Various fixes for the internal representation of physical units and the
1395 unit registration system.
1396 * Fix a bug in the assignment of state variables in subtrees of `SpatialNeuron`
1397 (:issue:`822`)
1398 * Numpy target: fix an indexing error for a `SpikeMonitor` that records from a
1399 subgroup (:issue:`824`)
1400 * Summed variables targeting the same post-synaptic variable now raise an error
1401 (previously, only the one executed last was taken into account, see :issue:`766`).
1402 * Fix bugs in synapse generation affecting Cython (:issue:`781`) respectively numpy
1403 (:issue:`835`)
1404 * C++ standalone simulations with many objects no longer fail on Windows (:issue:`787`)
1405
1406 Backwards-incompatible changes
1407 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1408 * `celsius` has been removed as a unit, because it was ambiguous in its relation
1409 to `kelvin` and gave wrong results when used as an absolute temperature (and
1410 not a temperature difference). For temperature differences, you can directly
1411 replace `celsius` by `kelvin`. To convert an absolute temperature in degree
1412 Celsius to Kelvin, add the `zero_celsius` constant from
1413 `brian2.units.constants` (:issue:`817`).
1414 * State variables are no longer allowed to have names ending in ``_pre`` or
1415 ``_post`` to avoid confusion with references to pre- and post-synaptic
1416 variables in `Synapses` (:issue:`818`)
1417
1418 Changes to default settings
1419 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
1420 * In C++ standalone mode, the ``clean`` argument now defaults to ``False``,
1421 meaning that ``make clean`` will not be executed by default before building
1422 the simulation. This avoids recompiling all files for unchanged simulations
1423 that are executed repeatedly. To return to the previous behaviour, specify
1424 ``clean=True`` in the ``device.build`` call (or in ``set_device`` if your
1425 script does not have an explicit ``device.build``).
1426
1427 Contributions
1428 ~~~~~~~~~~~~~
1429 Github code, documentation, and issue contributions (ordered by the number of
1430 contributions):
1431
1432 * Marcel Stimberg (`@mstimberg <https://github.com/mstimberg>`_)
1433 * Dan Goodman (`@thesamovar <https://github.com/thesamovar>`_)
1434 * Thomas McColgan (`@phreeza <https://github.com/phreeza>`_)
1435 * Daan Sprenkels (`@dsprenkels <https://github.com/dsprenkels>`_)
1436 * Romain Brette (`@romainbrette <https://github.com/romainbrette>`_)
1437 * Oleg Strikov (`@xj8z <https://github.com/xj8z>`_)
1438 * Charlee Fletterman (`@CharleeSF <https://github.com/CharleeSF>`_)
1439 * Meng Dong (`@whenov <https://github.com/whenov>`_)
1440 * Denis Alevi (`@denisalevi <https://github.com/denisalevi>`_)
1441 * Mihir Vaidya (`@MihirVaidya94 <https://github.com/MihirVaidya94>`_)
1442 * Adam (`@ffa <https://github.com/ffa>`_)
1443 * Sourav Singh (`@souravsingh <https://github.com/souravsingh>`_)
1444 * Nick Hale (`@nik849 <https://github.com/nik849>`_)
1445 * Cody Greer (`@Cody-G <https://github.com/Cody-G>`_)
1446 * Jean-Sébastien Dessureault (`@jsdessureault <https://github.com/jsdessureault>`_)
1447 * Michele Giugliano (`@mgiugliano <https://github.com/mgiugliano>`_)
1448 * Teo Stocco (`@zifeo <https://github.com/zifeo>`_)
1449 * Edward Betts (`@EdwardBetts <https://github.com/EdwardBetts>`_)
1450
1451 Other contributions outside of github (ordered alphabetically, apologies to
1452 anyone we forgot...):
1453
1454 * Christopher Nolan
1455 * Regimantas Jurkus
1456 * Shailesh Appukuttan
1457
1458 Brian 2.0.1
1459 -----------
1460 This is a bug-fix release that fixes a number of important bugs (see below),
1461 but does not introduce any new features. We recommend all users of Brian 2 to
1462 upgrade.
1463
1464 As always, please report bugs or suggestions to the github bug tracker
1465 (https://github.com/brian-team/brian2/issues) or to the brian-development
1466 mailing list ([email protected]).
1467
1468 Improvements and bug fixes
1469 ~~~~~~~~~~~~~~~~~~~~~~~~~~
1470 * Fix `PopulationRateMonitor` for recordings from subgroups (:issue:`772`)
1471 * Fix `SpikeMonitor` for recordings from subgroups (:issue:`777`)
1472 * Check that string expressions provided as the ``rates`` argument for
1473 `PoissonGroup` have correct units.
1474 * Fix compilation errors when multiple run statements with different ``report``
1475 arguments are used in C++ standalone mode.
1476 * Several documentation updates and fixes
1477
1478 Contributions
1479 ~~~~~~~~~~~~~
1480 Code and documentation contributions (ordered by the number of commits):
1481
1482 * Marcel Stimberg (`@mstimberg <https://github.com/mstimberg>`_)
1483 * Dan Goodman (`@thesamovar <https://github.com/thesamovar>`_)
1484 * Alex Seeholzer (`@flinz <https://github.com/flinz>`_)
1485 * Meng Dong (`@whenov <https://github.com/whenov>`_)
1486
1487 Testing, suggestions and bug reports (ordered alphabetically, apologies to
1488 anyone we forgot...):
1489
1490 * Myung Seok Shim
1491 * Pamela Hathway
1492
1493
1494 Brian 2.0 (changes since 1.4)
1495 -----------------------------
1496
1497 Major new features
1498 ~~~~~~~~~~~~~~~~~~
1499
1500 * Much more flexible model definitions. The behaviour of all model elements
1501 can now be defined by arbitrary equations specified in standard
1502 mathematical notation.
1503
1504 * Code generation as standard. Behind the scenes, Brian automatically generates
1505 and compiles C++ code to simulate your model, making it much faster.
1506
1507 * "Standalone mode". In this mode, Brian generates a complete C++ project tree
1508 that implements your model. This can be then be compiled and run entirely
1509 independently of Brian. This leads to both highly efficient code, as well as
1510 making it much easier to run simulations on non-standard computational
1511 hardware, for example on robotics platforms.
1512
1513 * Multicompartmental modelling.
1514
1515 * Python 2 and 3 support.
1516
1517 New features
1518 ~~~~~~~~~~~~
1519
1520 * Installation should now be much easier, especially if using the
1521 Anaconda Python distribution. See :doc:`/introduction/install`.
1522 * Many improvements to `Synapses` which replaces the old ``Connection``
1523 object in Brian 1. This includes:
1524 synapses that are triggered by non-spike events; synapses that target
1525 other synapses; huge speed improvements thanks to using code generation;
1526 new "generator syntax" when creating synapses is much more flexible and
1527 efficient. See :doc:`/user/synapses`.
1528 * New model definitions allow for much more flexible refractoriness. See
1529 :doc:`/user/refractoriness`.
1530 * `SpikeMonitor` and `StateMonitor` are now much more flexible, and cover a
1531 lot of what used to be covered by things like ``MultiStateMonitor``, etc.
1532 See :doc:`/user/recording`.
1533 * Multiple event types. In addition to the default ``spike`` event, you can
1534 create arbitrary events, and have these trigger code blocks (like reset)
1535 or synaptic events. See :doc:`/advanced/custom_events`.
1536 * New units system allows arrays to have units. This eliminates the need for
1537 a lot of the special casing that was required in Brian 1. See
1538 :doc:`/user/units`.
1539 * Indexing variable by condition, e.g. you might write ``G.v['x>0']`` to
1540 return all values of variable ``v`` in `NeuronGroup` ``G`` where the
1541 group's variable ``x>0``. See :ref:`state_variables`.
1542 * Correct numerical integration of stochastic differential equations.
1543 See :doc:`/user/numerical_integration`.
1544 * "Magic" `run` system has been greatly simplified and is now much more
1545 transparent. In addition, if there is any ambiguity about what the user
1546 wants to run, an erorr will be raised rather than making a guess. This
1547 makes it much safer. In addition, there is now a `store`/`restore`
1548 mechanism that simplifies restarting simulations and managing separate
1549 training/testing runs. See :doc:`/user/running`.
1550 * Changing an external variable between runs now works as expected, i.e.
1551 something like ``tau=1*ms; run(100*ms); tau=5*ms; run(100*ms)``. In
1552 Brian 1 this would have used ``tau=1*ms`` for both runs. More generally,
1553 in Brian 2 there is now better control over namespaces. See
1554 :doc:`/advanced/namespaces`.
1555 * New "shared" variables with a single value shared between all neurons.
1556 See :ref:`shared_variables`.
1557 * New `Group.run_regularly` method for a codegen-compatible way of doing
1558 things that used to be done with `network_operation` (which can still
1559 be used). See :ref:`regular_operations`.
1560 * New system for handling externally defined functions. They have to specify
1561 which units they accept in their arguments, and what they return. In
1562 addition, you can easily specify the implementation of user-defined
1563 functions in different languages for code generation. See
1564 :doc:`/advanced/functions`.
1565 * State variables can now be defined as integer or boolean values.
1566 See :doc:`/user/equations`.
1567 * State variables can now be exported directly to Pandas data frame.
1568 See :ref:`storing_state_variables`.
1569 * New generalised "flags" system for giving additional information when
1570 defining models. See :ref:`flags`.
1571 * `TimedArray` now allows for 2D arrays with arbitrary indexing.
1572 See :ref:`timed_arrays`.
1573 * Better support for using Brian in IPython/Jupyter. See, for example,
1574 `start_scope`.
1575 * New preferences system. See :doc:`/advanced/preferences`.
1576 * Random number generation can now be made reliably reproducible.
1577 See :doc:`/advanced/random`.
1578 * New profiling option to see which parts of your simulation are taking
1579 the longest to run. See :ref:`profiling`.
1580 * New logging system allows for more precise control. See
1581 :doc:`/advanced/logging`.
1582 * New ways of importing Brian for advanced Python users. See
1583 :doc:`/user/import`.
1584 * Improved control over the order in which objects are updated during
1585 a run. See :doc:`/advanced/scheduling`.
1586 * Users can now easily define their own numerical integration methods.
1587 See :doc:`/advanced/state_update`.
1588 * Support for parallel processing using the OpenMP version of
1589 standalone mode. Note that all Brian tests pass with this, but it is
1590 still considered to be experimental. See :ref:`openmp`.
1591
1592 Backwards incompatible changes
1593 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1594
1595 See :doc:`brian1_to_2/index`.
1596
1597 Behind the scenes changes
1598 ~~~~~~~~~~~~~~~~~~~~~~~~~
1599
1600 * All user models are now passed through the code generation system.
1601 This allows us to be much more flexible about introducing new target
1602 languages for generated code to make use of non-standard computational
1603 hardware. See :doc:`/developer/codegen`.
1604 * New standalone/device mode allows generation of a complete project tree
1605 that can be compiled and built independently of Brian and Python. This
1606 allows for even more flexible use of Brian on non-standard hardware.
1607 See :doc:`/developer/devices`.
1608 * All objects now have a unique name, used in code generation. This can
1609 also be used to access the object through the `Network` object.
1610
1611 Contributions
1612 ~~~~~~~~~~~~~
1613 Full list of all Brian 2 contributors, ordered by the time of their first
1614 contribution:
1615
1616 * Dan Goodman (`@thesamovar <https://github.com/thesamovar>`_)
1617 * Marcel Stimberg (`@mstimberg <https://github.com/mstimberg>`_)
1618 * Romain Brette (`@romainbrette <https://github.com/romainbrette>`_)
1619 * Cyrille Rossant (`@rossant <https://github.com/rossant>`_)
1620 * Victor Benichoux (`@victorbenichoux <https://github.com/victorbenichoux>`_)
1621 * Pierre Yger (`@yger <https://github.com/yger>`_)
1622 * Werner Beroux (`@wernight <https://github.com/wernight>`_)
1623 * Konrad Wartke (`@Kwartke <https://github.com/Kwartke>`_)
1624 * Daniel Bliss (`@dabliss <https://github.com/dabliss>`_)
1625 * Jan-Hendrik Schleimer (`@ttxtea <https://github.com/ttxtea>`_)
1626 * Moritz Augustin (`@moritzaugustin <https://github.com/moritzaugustin>`_)
1627 * Romain Cazé (`@rcaze <https://github.com/rcaze>`_)
1628 * Dominik Krzemiński (`@dokato <https://github.com/dokato>`_)
1629 * Martino Sorbaro (`@martinosorb <https://github.com/martinosorb>`_)
1630 * Benjamin Evans (`@bdevans <https://github.com/bdevans>`_)
1631
1632
1633 Brian 2.0 (changes since 2.0rc3)
1634 --------------------------------
1635
1636 New features
1637 ~~~~~~~~~~~~
1638 * A new flag ``constant over dt`` can be applied to subexpressions to have them
1639 only evaluated once per timestep (see :doc:`../user/models`). This flag is
1640 mandatory for stateful subexpressions, e.g. expressions using ``rand()`` or
1641 ``randn()``. (:issue:`720`, :issue:`721`)
1642
1643 Improvements and bug fixes
1644 ~~~~~~~~~~~~~~~~~~~~~~~~~~
1645 * Fix `EventMonitor.values` and `SpikeMonitor.spike_trains` to always return
1646 sorted spike/event times (:issue:`725`).
1647 * Respect the ``active`` attribute in C++ standalone mode (:issue:`718`).
1648 * More consistent check of compatible time and dt values (:issue:`730`).
1649 * Attempting to set a synaptic variable or to start a simulation with synapses
1650 without any preceding connect call now raises an error (:issue:`737`).
1651 * Improve the performance of coordinate calculation for `Morphology` objects,
1652 which previously made plotting very slow for complex morphologies (:issue:`741`).
1653 * Fix a bug in `SpatialNeuron` where it did not detect non-linear dependencies
1654 on v, introduced via point currents (:issue:`743`).
1655
1656 Infrastructure and documentation improvements
1657 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1658 * An interactive demo, tutorials, and examples can now be run in an interactive
1659 jupyter notebook on the `mybinder <http://mybinder.org/>`_ platform, without
1660 any need for a local Brian installation (:issue:`736`). Thanks to Ben Evans for the
1661 idea and help with the implementation.
1662 * A new extensive guide for converting Brian 1 simulations to Brian 2 user
1663 coming from Brian 1: :doc:`changes`
1664 * A re-organized :doc:`../user/index`, with clearer indications which
1665 information is important for new Brian users.
1666
1667 Contributions
1668 ~~~~~~~~~~~~~
1669 Code and documentation contributions (ordered by the number of commits):
1670
1671 * Marcel Stimberg (`@mstimberg <https://github.com/mstimberg>`_)
1672 * Dan Goodman (`@thesamovar <https://github.com/thesamovar>`_)
1673 * Benjamin Evans (`@bdevans <https://github.com/bdevans>`_)
1674
1675 Testing, suggestions and bug reports (ordered alphabetically, apologies to
1676 anyone we forgot...):
1677
1678 * Chaofei Hong
1679 * Daniel Bliss
1680 * Jacopo Bono
1681 * Ruben Tikidji-Hamburyan
1682
1683
1684 Brian 2.0rc3
1685 ------------
1686 This is another "release candidate" for Brian 2.0 that fixes a range of bugs and introduces
1687 better support for random numbers (see below). We are getting close to the final Brian 2.0
1688 release, the remaining work will focus on bug fixes, and better error messages and
1689 documentation.
1690
1691 As always, please report bugs or suggestions to the github bug tracker
1692 (https://github.com/brian-team/brian2/issues) or to the brian-development mailing
1693 list ([email protected]).
1694
1695 New features
1696 ~~~~~~~~~~~~
1697 * Brian now comes with its own `seed` function, allowing to seed the random number generator
1698 and thereby to make simulations reproducible. This function works for all code generation
1699 targets and in runtime and standalone mode. See :doc:`../advanced/random` for details.
1700 * Brian can now export/import state variables of a group or a full network to/from a
1701 `pandas <http://pandas.pydata.org>`_ ``DataFrame`` and comes with a mechanism to extend
1702 this to other formats. Thanks to Dominik Krzemiński for this contribution (see :issue:`306`).
1703
1704 Improvements and bug fixes
1705 ~~~~~~~~~~~~~~~~~~~~~~~~~~
1706 * Use a Mersenne-Twister pseudorandom number generator in C++ standalone mode, replacing the
1707 previously used low-quality random number generator from the C standard library (see :issue:`222`,
1708 :issue:`671` and :issue:`706`).
1709 * Fix a memory leak in code running with the weave code generation target, and a smaller
1710 memory leak related to units stored repetitively in the `~brian2.units.fundamentalunits.UnitRegistry`.
1711 * Fix a difference of one timestep in the number of simulated timesteps between
1712 runtime and standalone that could arise for very specific values of dt and t (see :issue:`695`).
1713 * Fix standalone compilation failures with the most recent gcc version which defaults to
1714 C++14 mode (see :issue:`701`)
1715 * Fix incorrect summation in synapses when using the ``(summed)`` flag and writing to
1716 *pre*-synaptic variables (see :issue:`704`)
1717 * Make synaptic pathways work when connecting groups that define nested subexpressions,
1718 instead of failing with a cryptic error message (see :issue:`707`).
1719
1720 Contributions
1721 ~~~~~~~~~~~~~
1722 Code and documentation contributions (ordered by the number of commits):
1723
1724 * Marcel Stimberg (`@mstimberg <https://github.com/mstimberg>`_)
1725 * Dominik Krzemiński (`@dokato <https://github.com/dokato>`_)
1726 * Dan Goodman (`@thesamovar <https://github.com/thesamovar>`_)
1727 * Martino Sorbaro (`@martinosorb <https://github.com/martinosorb>`_)
1728
1729 Testing, suggestions and bug reports (ordered alphabetically, apologies to
1730 anyone we forgot...):
1731
1732 * Craig Henriquez
1733 * Daniel Bliss
1734 * David Higgins
1735 * Gordon Erlebacher
1736 * Max Gillett
1737 * Moritz Augustin
1738 * Sami Abdul-Wahid
1739
1740
1741 Brian 2.0rc1
1742 ------------
1743 This is a bug fix release that we release only about two weeks after the previous
1744 release because that release introduced a bug that could lead to wrong integration of
1745 stochastic differential equations. Note that standard neuronal noise models were
1746 not affected by this bug, it only concerned differential equations implementing a
1747 "random walk". The release also fixes a few other issues reported by users, see below
1748 for more information.
1749
1750 Improvements and bug fixes
1751 ~~~~~~~~~~~~~~~~~~~~~~~~~~
1752 * Fix a regression from 2.0b4: stochastic differential equations without any non-stochastic
1753 part (e.g. ``dx/dt = xi/sqrt(ms)```) were not integrated correctly (see :issue:`686`).
1754 * Repeatedly calling `restore` (or `Network.restore`) no longer raises an error (see :issue:`681`).
1755 * Fix an issue that made `PoissonInput` refuse to run after a change of dt (see :issue:`684`).
1756 * If the ``rates`` argument of `PoissonGroup` is a string, it will now be evaluated at
1757 every time step instead of once at construction time. This makes time-dependent rate
1758 expressions work as expected (see :issue:`660`).
1759
1760 Contributions
1761 ~~~~~~~~~~~~~
1762 Code and documentation contributions (ordered by the number of commits):
1763
1764 * Marcel Stimberg (`@mstimberg <https://github.com/mstimberg>`_)
1765
1766 Testing, suggestions and bug reports (ordered alphabetically, apologies to
1767 anyone we forgot...):
1768
1769 * Cian O'Donnell
1770 * Daniel Bliss
1771 * Ibrahim Ozturk
1772 * Olivia Gozel
1773
1774
1775 Brian 2.0rc
1776 -----------
1777 This is a release candidate for the final Brian 2.0 release, meaning that from
1778 now on we will focus on bug fixes and documentation, without introducing new
1779 major features or changing the syntax for the user. This release candidate itself
1780 *does* however change a few important syntax elements, see "Backwards-incompatible
1781 changes" below.
1782
1783 As always, please report bugs or suggestions to the github bug tracker
1784 (https://github.com/brian-team/brian2/issues) or to the brian-development mailing
1785 list ([email protected]).
1786
1787 Major new features
1788 ~~~~~~~~~~~~~~~~~~
1789 * New "generator syntax" to efficiently generate synapses (e.g. one-to-one connections), see :ref:`creating_synapses`
1790 for more details.
1791 * For synaptic connections with multiple synapses between a pair of neurons, the number of the synapse can now be
1792 stored in a variable, allowing its use in expressions and statements (see :ref:`creating_synapses`).
1793 * `Synapses` can now target other `Synapses` objects, useful for some models of synaptic modulation.
1794 * The `Morphology` object has been completely re-worked and several issues have been fixed. The new `Section` object
1795 allows to model a section as a series of truncated cones (see :ref:`creating_morphology`).
1796 * Scripts with a single `run` call, no longer need an explicit ``device.build()`` call to run with the C++
1797 standalone device. A `set_device` in the beginning is enough and will trigger the ``build`` call after the run
1798 (see :ref:`cpp_standalone`).
1799 * All state variables within a `Network` can now be accessed by `Network.get_states` and `Network.set_states` and the
1800 `store`/`restore` mechanism can now store the full state of a simulation to disk.
1801 * Stochastic differential equations with multiplicative noise can now be integrated using the Euler-Heun method
1802 (``heun``). Thanks to Jan-Hendrik Schleimer for this contribution.
1803 * Error messages have been significantly improved: errors for unit mismatches are now much clearer and error messages
1804 triggered during the intialization phase point back to the line of code where the relevant object (e.g. a
1805 `NeuronGroup`) was created.
1806 * `PopulationRateMonitor` now provides a `~brian2.monitors.ratemonitor.PopulationRateMonitor.smooth_rate` method for a filtered version of the
1807 stored rates.
1808
1809 Improvements and bug fixes
1810 ~~~~~~~~~~~~~~~~~~~~~~~~~~
1811 * In addition to the new synapse creation syntax, sparse probabilistic connections are now created much faster.
1812 * The time for the initialization phase at the beginning of a `run` has been significantly reduced.
1813 * Multicompartmental simulations with a large number of compartments are now simulated more efficiently and are making
1814 better use of several processor cores when OpenMP is activated in C++ standalone mode. Thanks to Moritz Augustin for
1815 this contribution.
1816 * Simulations will use compiler settings that optimize performance by default.
1817 * Objects that have user-specified names are better supported for complex simulation scenarios (names no longer have to
1818 be unique at all times, but only across a network or across a standalone device).
1819 * Various fixes for compatibility with recent versions of numpy and sympy
1820
1821 Important backwards-incompatible changes
1822 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1823 * The argument names in `Synapses.connect` have changed and the first argument can no longer be an array of indices. To
1824 connect based on indices, use ``Synapses.connect(i=source_indices, j=target_indices)``. See :ref:`creating_synapses`
1825 and the documentation of `Synapses.connect` for more details.
1826 * The actions triggered by pre-synaptic and post-synaptic spikes are now described by the ``on_pre`` and ``on_post``
1827 keyword arguments (instead of ``pre`` and ``post``).
1828 * The `Morphology` object no longer allows to change attributes such as length and diameter after its creation. Complex
1829 morphologies should instead be created using the `Section` class, allowing for the specification of all details.
1830 * `Morphology` objects that are defined with coordinates need to provide the start point (relative to the end point of
1831 the parent compartment) as the first coordinate. See :ref:`creating_morphology` for more details.
1832 * For simulations using the C++ standalone mode, no longer call `Device.build` (if using a single `run` call), or
1833 use `set_device` with ``build_on_run=False`` (see :ref:`cpp_standalone`).
1834
1835 Infrastructure improvements
1836 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
1837 * Our test suite is now also run on Mac OS-X (on the `Travis CI <https://travis-ci.org/>`_ platform).
1838
1839 Contributions
1840 ~~~~~~~~~~~~~
1841 Code and documentation contributions (ordered by the number of commits):
1842
1843 * Marcel Stimberg (`@mstimberg <https://github.com/mstimberg>`_)
1844 * Dan Goodman (`@thesamovar <https://github.com/thesamovar>`_)
1845 * Moritz Augustin (`@moritzaugustin <https://github.com/moritzaugustin>`_)
1846 * Jan-Hendrik Schleimer (`@ttxtea <https://github.com/ttxtea>`_)
1847 * Romain Cazé (`@rcaze <https://github.com/rcaze>`_)
1848 * Konrad Wartke (`@Kwartke <https://github.com/Kwartke>`_)
1849 * Romain Brette (`@romainbrette <https://github.com/romainbrette>`_)
1850
1851 Testing, suggestions and bug reports (ordered alphabetically, apologies to
1852 anyone we forgot...):
1853
1854 * Chaofei Hong
1855 * Kees de Leeuw
1856 * Luke Y Prince
1857 * Myung Seok Shim
1858 * Owen Mackwood
1859 * Github users: @epaxon, @flinz, @mariomulansky, @martinosorb, @neuralyzer, @oleskiw, @prcastro, @sudoankit
1860
1861
1862 Brian 2.0b4
1863 -----------
1864 This is the fourth (and probably last) beta release for Brian 2.0. This release
1865 adds a few important new features and fixes a number of bugs so we recommend all
1866 users of Brian 2 to upgrade. If you are a user new to Brian, we also recommend
1867 to directly start with Brian 2 instead of using the stable release of Brian 1.
1868 Note that the new recommended way to install Brian 2 is to use the Anaconda
1869 distribution and to install the Brian 2 conda package (see :doc:`install`).
1870
1871 This is however still a Beta release, please report bugs or suggestions to the
1872 github bug tracker (https://github.com/brian-team/brian2/issues) or to the
1873 brian-development mailing list ([email protected]).
1874
1875 Major new features
1876 ~~~~~~~~~~~~~~~~~~
1877 * In addition to the standard threshold/reset, groups can now define "custom
1878 events". These can be recorded with the new `EventMonitor` (a generalization
1879 of `SpikeMonitor`) and `Synapses` can connect to these events instead of
1880 the standard spike event. See :doc:`../advanced/custom_events` for more
1881 details.
1882 * `SpikeMonitor` and `EventMonitor` can now also record state variable values
1883 at the time of spikes (or custom events), thereby offering the functionality
1884 of ``StateSpikeMonitor`` from Brian 1. See
1885 :ref:`recording_variables_spike_time` for more details.
1886 * The code generation modes that interact with C++ code (weave, Cython, and C++
1887 standalone) can now be more easily configured to work with external libraries
1888 (compiler and linker options, header files, etc.). See the documentation of
1889 the `~brian2.codegen.cpp_prefs` module for more details.
1890
1891 Improvemements and bug fixes
1892 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1893 * Cython simulations no longer interfere with each other when run in parallel
1894 (thanks to Daniel Bliss for reporting and fixing this).
1895 * The C++ standalone now works with scalar delays and the spike queue
1896 implementation deals more efficiently with them in general.
1897 * Dynamic arrays are now resized more efficiently, leading to faster monitors
1898 in runtime mode.
1899 * The spikes generated by a `SpikeGeneratorGroup` can now be changed between
1900 runs using the
1901 `~brian2.input.spikegeneratorgroup.SpikeGeneratorGroup.set_spikes` method.
1902 * Multi-step state updaters now work correctly for non-autonomous differential
1903 equations
1904 * `PoissonInput` now correctly works with multiple clocks (thanks to Daniel
1905 Bliss for reporting and fixing this)
1906 * The `~brian2.groups.group.Group.get_states` method now works for
1907 `StateMonitor`. This method provides a convenient way to access all the data
1908 stored in the monitor, e.g. in order to store it on disk.
1909 * C++ compilation is now easier to get to work under Windows, see
1910 :doc:`install` for details.
1911
1912 Important backwards-incompatible changes
1913 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1914 * The ``custom_operation`` method has been renamed to
1915 `~brian2.groups.group.Group.run_regularly` and can now be called without the
1916 need for storing its return value.
1917 * `StateMonitor` will now by default record at the beginning of a time step
1918 instead of at the end. See :ref:`recording_variables_continuously` for
1919 details.
1920 * Scalar quantities now behave as python scalars with respect to in-place
1921 modifications (augmented assignments). This means that
1922 ``x = 3*mV; y = x; y += 1*mV`` will no longer increase the value of the
1923 variable ``x`` as well.
1924
1925 Infrastructure improvements
1926 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
1927 * We now provide conda packages for Brian 2, making it very easy to install
1928 when using the Anaconda distribution (see :doc:`install`).
1929
1930 Contributions
1931 ~~~~~~~~~~~~~
1932 Code and documentation contributions (ordered by the number of commits):
1933
1934 * Marcel Stimberg (`@mstimberg <https://github.com/mstimberg>`_)
1935 * Dan Goodman (`@thesamovar <https://github.com/thesamovar>`_)
1936 * Daniel Bliss (`@dabliss <https://github.com/dabliss>`_)
1937 * Romain Brette (`@romainbrette <https://github.com/romainbrette>`_)
1938
1939 Testing, suggestions and bug reports (ordered alphabetically, apologies to
1940 everyone we forgot...):
1941
1942 * Daniel Bliss
1943 * Damien Drix
1944 * Rainer Engelken
1945 * Beatriz Herrera Figueredo
1946 * Owen Mackwood
1947 * Augustine Tan
1948 * Ot de Wiljes
1949
1950
1951 Brian 2.0b3
1952 -----------
1953 This is the third beta release for Brian 2.0. This release does not add many new
1954 features but it fixes a number of important bugs so we recommend all users of
1955 Brian 2 to upgrade. If you are a user new to Brian, we also recommend to
1956 directly start with Brian 2 instead of using the stable release of Brian 1.
1957
1958 This is however still a Beta release, please report bugs or suggestions to the
1959 github bug tracker (https://github.com/brian-team/brian2/issues) or to the
1960 brian-development mailing list ([email protected]).
1961
1962 Major new features
1963 ~~~~~~~~~~~~~~~~~~
1964 * A new `PoissonInput` class for efficient simulation of Poisson-distributed
1965 input events.
1966
1967 Improvements
1968 ~~~~~~~~~~~~
1969 * The order of execution for ``pre`` and ``post`` statements happending in the
1970 same time step was not well defined (it fell back to the default alphabetical
1971 ordering, executing ``post`` before ``pre``). It now explicitly specifies the
1972 ``order`` attribute so that ``pre`` gets executed before ``post`` (as in
1973 Brian 1). See the :doc:`../user/synapses` documentation for details.
1974 * The default schedule that is used can now be set via a preference
1975 (`core.network.default_schedule`). New automatically generated scheduling
1976 slots relative to the explicitly defined ones can be used, e.g.
1977 ``before_resets`` or ``after_synapses``. See :ref:`scheduling` for details.
1978 * The scipy_ package is no longer a dependency (note that weave_ for
1979 compiled C code under Python 2 is now available in a separate package). Note
1980 that multicompartmental models will still benefit from the scipy_ package
1981 if they are simulated in pure Python (i.e. with the ``numpy`` code generation
1982 target) -- otherwise Brian 2 will fall back to a numpy-only solution which is
1983 significantly slower.
1984
1985 Important bug fixes
1986 ~~~~~~~~~~~~~~~~~~~
1987 * Fix `SpikeGeneratorGroup` which did not emit all the spikes under certain
1988 conditions for some code generation targets (:issue:`429`)
1989 * Fix an incorrect update of pre-synaptic variables in synaptic statements for
1990 the ``numpy`` code generation target (:issue:`435`).
1991 * Fix the possibility of an incorrect memory access when recording a subgroup
1992 with `SpikeMonitor` (:issue:`454`).
1993 * Fix the storing of results on disk for C++ standalone on Windows -- variables
1994 that had the same name when ignoring case (e.g. ``i`` and ``I``) where
1995 overwriting each other (:issue:`455`).
1996
1997 Infrastructure improvements
1998 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
1999 * Brian 2 now has a chat room on gitter_: https://gitter.im/brian-team/brian2
2000 * The sphinx documentation can now be built from the release archive file
2001 * After a big cleanup, all files in the repository have now simple LF line
2002 endings (see https://help.github.com/articles/dealing-with-line-endings/ on
2003 how to configure your own machine properly if you want to contribute to
2004 Brian).
2005
2006 .. _scipy: http://scipy.org
2007 .. _weave: https://pypi.python.org/pypi/weave
2008 .. _gitter: http://gitter.im
2009
2010 Contributions
2011 ~~~~~~~~~~~~~
2012 Code and documentation contributions (ordered by the number of commits):
2013
2014 * Marcel Stimberg (`@mstimberg <https://github.com/mstimberg>`_)
2015 * Dan Goodman (`@thesamovar <https://github.com/thesamovar>`_)
2016 * Konrad Wartke (`@kwartke <https://github.com/Kwartke>`_)
2017
2018 Testing, suggestions and bug reports (ordered alphabetically, apologies to
2019 everyone we forgot...):
2020
2021 * Daniel Bliss
2022 * Owen Mackwood
2023 * Ankur Sinha
2024 * Richard Tomsett
2025
2026
2027 Brian 2.0b2
2028 -----------
2029 This is the second beta release for Brian 2.0, we recommend all users of Brian 2
2030 to upgrade. If you are a user new to Brian, we also recommend to directly start
2031 with Brian 2 instead of using the stable release of Brian 1.
2032
2033 This is however still a Beta release, please report bugs or suggestions to the
2034 github bug tracker (https://github.com/brian-team/brian2/issues) or to the
2035 brian-development mailing list ([email protected]).
2036
2037 Major new features
2038 ~~~~~~~~~~~~~~~~~~
2039 * Multi-compartmental simulations can now be run using the
2040 :ref:`cpp_standalone` mode (this is not yet well-tested, though).
2041 * The implementation of `TimedArray` now supports two-dimensional arrays, i.e.
2042 different input per neuron (or synapse, etc.), see :ref:`timed_arrays` for
2043 details.
2044 * Previously, not setting a code generation target (using the `codegen.target`
2045 preference) would mean that the ``numpy`` target was used. Now,
2046 the default target is ``auto``, which means that a compiled language
2047 (``weave`` or ``cython``) will be used if possible. See
2048 :doc:`../user/computation` for details.
2049 * The implementation of `SpikeGeneratorGroup` has been improved and it now
2050 supports a ``period`` argument to repeatedly generate a spike pattern.
2051
2052 Improvements
2053 ~~~~~~~~~~~~
2054 * The selection of a numerical algorithm (if none has been specified by the
2055 user) has been simplified. See :ref:`numerical_integration` for details.
2056 * Expressions that are shared among neurons/synapses are now updated only once
2057 instead of for every neuron/synapse which can lead to performance
2058 improvements.
2059 * On Windows, The Microsoft Visual C compiler is now supported in the
2060 ``cpp_standalone`` mode, see the respective notes in the :doc:`install` and
2061 :doc:`../user/computation` documents.
2062 * Simulation runs (using the standard "runtime" device) now collect profiling
2063 information. See :ref:`profiling` for details.
2064
2065 Infrastructure and documentation improvements
2066 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2067 * :doc:`Tutorials for beginners <../resources/tutorials/index>` in the form of
2068 ipython notebooks (currently only covering the basics of neurons and synapses)
2069 are now available.
2070 * The :doc:`../examples/index` in the documentation now include the images
2071 they generated. Several examples have been adapted from Brian 1.
2072 * The code is now automatically tested on Windows machines, using the
2073 `appveyor <http://ci.appveyor.com>`_ service. This complements the Linux
2074 testing on `travis <https://travis-ci.org>`_.
2075 * Using a version of a dependency (e.g. sympy) that we don't support will now
2076 raise an error when you import ``brian2`` -- see :ref:`dependency_checks` for
2077 more details.
2078 * Test coverage for the ``cpp_standalone`` mode has been significantly
2079 increased.
2080
2081 Important bug fixes
2082 ~~~~~~~~~~~~~~~~~~~
2083 * The preparation time for complicated equations has been significantly reduced.
2084 * The string representation of small physical quantities has been corrected
2085 (:issue:`361`)
2086 * Linking variables from a group of size 1 now works correctly (:issue:`383`)
2087
2088 Contributions
2089 ~~~~~~~~~~~~~
2090 Code and documentation contributions (ordered by the number of commits):
2091
2092 * Marcel Stimberg (`@mstimberg <https://github.com/mstimberg>`_)
2093 * Dan Goodman (`@thesamovar <https://github.com/thesamovar>`_)
2094 * Romain Brette (`@romainbrette <https://github.com/romainbrette>`_)
2095 * Pierre Yger (`@yger <https://github.com/yger>`_)
2096
2097 Testing, suggestions and bug reports (ordered alphabetically, apologies to
2098 everyone we forgot...):
2099
2100 * Conor Cox
2101 * Gordon Erlebacher
2102 * Konstantin Mergenthaler
2103
2104
2105 Brian 2.0beta
2106 -------------
2107 This is the first beta release for Brian 2.0 and the first version of Brian 2.0
2108 we recommend for general use. From now on, we will try to keep changes that
2109 break existing code to a minimum. If you are a user new to Brian, we'd
2110 recommend to start with the Brian 2 beta instead of using the stable release of
2111 Brian 1.
2112
2113 This is however still a Beta release, please report bugs or suggestions to the
2114 github bug tracker (https://github.com/brian-team/brian2/issues) or to the
2115 brian-development mailing list ([email protected]).
2116
2117 Major new features
2118 ~~~~~~~~~~~~~~~~~~
2119 * New classes `Morphology` and `SpatialNeuron` for the simulation of
2120 :doc:`../user/multicompartmental`
2121 * A temporary "bridge" for ``brian.hears`` that allows to use its Brian 1
2122 version from Brian 2 (:doc:`brian1_to_2/brian1hears_bridge`)
2123 * Cython is now a new code generation target, therefore the performance benefits
2124 of compiled code are now also available to users running simulations under
2125 Python 3.x (where ``scipy.weave`` is not available)
2126 * Networks can now store their current state and return to it at a later time,
2127 e.g. for simulating multiple trials starting from a fixed network state
2128 (:ref:`continue_repeat`)
2129 * C++ standalone mode: multiple processors are now supported via OpenMP
2130 (:ref:`openmp`), although this code has not yet been well tested so may be
2131 inaccurate.
2132 * C++ standalone mode: after a run, state variables and monitored values can
2133 be loaded from disk transparently. Most scripts therefore only need two
2134 additional lines to use standalone mode instead of Brian's default runtime
2135 mode (:ref:`cpp_standalone`).
2136
2137 Syntax changes
2138 ~~~~~~~~~~~~~~
2139 * The syntax and semantics of everything around simulation time steps, clocks,
2140 and multiple runs have been cleaned up, making ``reinit`` obsolete and also
2141 making it unnecessary for most users to explicitly generate `Clock` objects --
2142 instead, a ``dt`` keyword can be specified for objects such as `NeuronGroup`
2143 (:doc:`../user/running`)
2144 * The ``scalar`` flag for parameters/subexpressions has been renamed to
2145 ``shared``
2146 * The "unit" for boolean variables has been renamed from ``bool`` to ``boolean``
2147 * C++ standalone: several keywords of
2148 `CPPStandaloneDevice.build <brian2.devices.cpp_standalone.device.CPPStandaloneDevice.build>`
2149 have been renamed
2150 * The preferences are now accessible via ``prefs`` instead of ``brian_prefs``
2151 * The ``runner`` method has been renamed to `~brian2.groups.group.Group.custom_operation`
2152
2153 Improvements
2154 ~~~~~~~~~~~~
2155 * Variables can now be linked across `NeuronGroup`\ s (:ref:`linked_variables`)
2156 * More flexible progress reporting system, progress reporting also works in the
2157 C++ standalone mode (:ref:`progress_reporting`)
2158 * State variables can be declared as ``integer`` (:ref:`equation_strings`)
2159
2160 Bug fixes
2161 ~~~~~~~~~
2162 57 github issues have been closed since the alpha release, of which 26 had been
2163 labeled as bugs. We recommend all users of Brian 2 to upgrade.
2164
2165 Contributions
2166 ~~~~~~~~~~~~~
2167 Code and documentation contributions (ordered by the number of commits):
2168
2169 * Marcel Stimberg (`@mstimberg <https://github.com/mstimberg>`_)
2170 * Dan Goodman (`@thesamovar <https://github.com/thesamovar>`_)
2171 * Romain Brette (`@romainbrette <https://github.com/romainbrette>`_)
2172 * Pierre Yger (`@yger <https://github.com/yger>`_)
2173 * Werner Beroux (`@wernight <https://github.com/wernight>`_)
2174
2175 Testing, suggestions and bug reports (ordered alphabetically, apologies to
2176 everyone we forgot…):
2177
2178 * Guillaume Bellec
2179 * Victor Benichoux
2180 * Laureline Logiaco
2181 * Konstantin Mergenthaler
2182 * Maurizio De Pitta
2183 * Jan-Hendrick Schleimer
2184 * Douglas Sterling
2185 * Katharina Wilmes