# Brian 2 documentation

Brian is a simulator for spiking neural networks. It is written in the Python programming language and is available on almost all platforms. We believe that a simulator should not only save the time of processors, but also the time of scientists. Brian is therefore designed to be easy to learn and use, highly flexible and easily extensible.

To get an idea of what writing a simulation in Brian looks like, take a look at a simple example, or run our interactive demo.

You can actually edit and run the examples in the browser without having to install Brian, using the Binder service (note: sometimes this service is down or running slowly):

Once you have a feel for what is involved in using Brian, we recommend you start by following the installation instructions, and in case you are new to the Python programming language, having a look at Running Brian scripts. Then, go through the tutorials, and finally read the User Guide.

While reading the documentation, you will see the names of certain functions and classes are highlighted links (e.g. `PoissonGroup`). Clicking on these will take you to the “reference documentation”. This section is automatically generated from the code, and includes complete and very detailed information, so for new users we recommend sticking to the User’s guide. However, there is one feature that may be useful for all users. If you click on, for example, `PoissonGroup`, and scroll down to the bottom, you’ll get a list of all the example code that uses `PoissonGroup`. This is available for each class or method, and can be helpful in understanding how a feature works.

Finally, if you’re having problems, please do let us know at our support page.

Please note that all interactions (e.g. via the mailing list or on github) should adhere to our Code of Conduct.

Documentation

- Introduction
  - Installation
  - Running Brian scripts
  - Release notes
  - Changes for Brian 1 users
  - Known issues
  - Support
  - Compatibility and reproducibility
  - Contributor Covenant Code of Conduct
- User’s guide
  - Importing Brian
  - Physical units
  - Models and neuron groups
  - Numerical integration
  - Equations
  - Refractoriness
  - Synapses
  - Input stimuli
  - Recording during a simulation
  - Running a simulation
  - Multicompartment models
  - Computational methods and efficiency
  - Converting from integrated form to ODEs
  - How to plot functions
- Advanced guide
  - Functions
  - Preferences
  - Logging
  - Namespaces
  - Custom progress reporting
  - Random numbers
  - Custom events
  - State update
  - How Brian works
  - Interfacing with external code

- Reference documentation
- Developer’s guide

Examples and tutorials

- Examples

External links

- Source code repository
- PyPI package

# Indices and tables

- Index

- Module Index

- Search Page