# Brian (software)

Developer(s) Romain Brette, Dan Goodman 1.4.1 / April 30, 2013; 2 years ago Active Python Cross-platform Neural network software CeCILL http://www.briansimulator.org

Brian is an open source Python package for developing simulations of networks of spiking neurons. It is being developed by Romain Brette and Dan Goodman at the École Normale Supérieure in Paris.

## Details

Brian is aimed at researchers developing models based on networks of spiking neurons. The design is aimed at minimizing users' development time, with execution speed a secondary goal.[1] Users specify neuron models by giving their differential equations in standard mathematical form, create groups of neurons and connect them via synapses. The intent is to make the process as flexible as possible, so that researchers are not restricted to using neuron models already built into the simulator. The entire simulator is written in Python, using the NumPy and SciPy numerical and scientific computing packages. Parts of the simulator can optionally be run using C code generated on the fly. Computationally, Brian uses vectorization techniques, so that for large numbers of neurons, execution speed is of the same order of magnitude as C code.[1]

## Example

The following code defines, runs and plots a randomly connected network of leaky integrate and fire neurons with exponential inhibitory and excitatory currents.

File:Sample raster plot from Brian neural network simulator.jpg
Sample raster plot from randomly connected network of integrate and fire neurons with exponential inhibitory and excitatory currents.
```from brian import *
eqs = '''
dv/dt = (ge+gi-(v+49*mV))/(20*ms) : volt
dge/dt = -ge/(5*ms) : volt
dgi/dt = -gi/(10*ms) : volt
'''
P = NeuronGroup(4000, eqs, threshold=-50*mV, reset=-60*mV)
P.v = -60*mV
Pe = P.subgroup(3200)
Pi = P.subgroup(800)
Ce = Connection(Pe, P, 'ge', weight=1.62*mV, sparseness=0.02)
Ci = Connection(Pi, P, 'gi', weight=-9*mV, sparseness=0.02)
M = SpikeMonitor(P)
run(1*second)
raster_plot(M)
show()```

## Comparison to other simulators

Brian is primarily aimed at single compartmental model neurons. Simulators focused on multi-compartmental models include Neuron, GENESIS, and its derivatives.

Another similar simulator is NEST.[2]

## Footnotes

1. ^ a b Goodman and Brette 2009
2. ^ http://www.nest-initiative.org/