toll_booth 0 Light Poster

Hello everyone.

I am trying to teach myself the very basics of the Brian neuron simulator before attempting to modeling realistic networks. Any of you guys know how to use it? Specifically, the first exercise I am attempting is:

dx/dt = 1 + x - y - x^2 - x^3
dy/dt = eps(-1 + (1 - 4alpha)x + 4xy)

where x is voltage, y is a response variable, eps is small, and alpha is a parameter to be experimented with. Here is my attempted code thus far:

from brian import *

eps = 0.0001
alpha = 0.5

equs = Equations('''
dV/dt = (1 + V - y - V**2 - V**3)
dy/dt = eps*(-1 + (1 - 4*alpha)*V + 4*V*y)

G = NeuronGroup(N=1, model=equs)
M = StateMonitor(G, 'V', record=0)

plot(M.times/ms, M[0])

This produced the following, and rather expected, error:

[code] raise TypeError, "Invalid equation string: " + line
TypeError: Invalid equation string: dV/dt = (1 + V - y - V2 - V3)[/code]

I have studied the Brian documentation and tutorials, but as it's a pretty new project, there's not always much on the subject for us rookie programmers. Specifically, I have three questions about this:

  1. How do I get the equations into Brian? I keep getting a dimension mismatch, which makes sense considering that V and V^2, for example, are clearly not the same units. But how do I resolve this? Should I, for instance, write the V^2 part as "V**2/mV"? What about the 4Vy term?

  2. How do I plot V vs y? The Brian tutorial is very clear how to plot V vs. t, but not V vs. y (or vice versa).

  3. Are there some highly-trafficked Brian forums out there, or is that allowed to be discussed here?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.