Goodman and Brette The Brian simulator Figure 2 | Brian implementation of a model of prey localisation in the sand scorpion, adapted from Stürzl et al. (2000). The movement of the prey causes a surface wave [function wave in the code in panel (C)] which is detected by mechanoreceptors [the red points in panel (A)] at the ends of each of the scorpion’s legs.The mechanoreceptors are modelled by noisy, leaky integrate-and-ﬁre neurons with an input current deﬁned by the surface wave displacement at the ends of the legs (object legs in the code, deﬁned by the equations eqs_legs.These neurons send an excitatory signal (the object synapses_ex) to corresponding command neurons (the blue points) modelled by leaky integrate-and- ﬁre neurons (object neurons with equations eqs_neuron), which also receive delayed inhibitory signals (the object synapses_inh) from the three legs on the other side (the for loop). A wave arriving ﬁrst at one side of the scorpion will cause an excitatory signal to be sent to the command neurons on that side causing them to ﬁre, and an inhibitory signal to the command neurons on the other side, stopping them from ﬁring when the wave reaches the other side. The result is that command neurons are associated to the directions of the corresponding legs, ﬁring at a high rate if the prey is in that direction. Panel (B) shows the ﬁring rates for the eight command neurons in a polar plot for a prey at an angle of 60 degrees relative to the scorpion. tions (a free equivalent of Matlab), the synﬁre chain model was a 2-month student project. This experience illustrates the fact that choosing to minimise the time spent on learning and writ- ing code has qualitative implications: what was before a full project can now be done by students in a single tutorial, allowing for a much richer course content. DISCUSSION With the Brian project, we chose a different emphasis from previous simulation projects: ﬂex- ibility, readability, and simplicity of the syntax. Two choices followed from those goals: ﬁrstly, Brian is an extension package of Python, a simple and popular programming language, and sec- ondly Brian is equation-oriented, that is models are written in a form that is as close as possible to their mathematical expression, with differential equations and discrete events. This makes Brian a convenient simulation tool for exploring new spiking neural models, modelling complex neural models at the systems level, and teaching compu- tational neuroscience. Frontiers in Neuroscience www.frontiersin.org September 2009 | Volume 3 | Issue 2 | 196