from brian2 import *
eqs1 = Equations(""" dv/dt = -v * Hz : 1 """)
eqs2 = Equations(""" dv/dt = 1 * Hz : 1 """)
eqA = Equations(""" vn : 1 (linked) """)
P = PoissonGroup(1, 8*Hz)
G = NeuronGroup(1, eqs1)
A = NeuronGroup(1, eqs2, threshold = 'v > 1', reset='v=0')
S1 = Synapses(P, A, model=eqA) # <=== variable "vn" in eqA is linked to "v" in G
S1.vn = linked_var(G, 'v')
S1.connect(True)
ERROR brian2: Brian 2 encountered an unexpected error. If you think this is bug in Brian 2, please report this issue either to the mailing list at <http://groups.google.com/group/brian-development/>, or to the issue tracker at <https://github.com/brian-team/brian2/issues>. Please include this file with debug information in your report: /var/folders/5j/c7kq4kb565sbg07km9_bmxqh0000gn/T/brian_debug_ecqG92.log Additionally, you can also include a copy of the script that was run, available at: /var/folders/5j/c7kq4kb565sbg07km9_bmxqh0000gn/T/brian_script_xbvOcq.py Thanks!
Traceback (most recent call last):
File "tst.py", line 12, in <module>
S1 = Synapses(P, A, model=eqA) # <=== variable "vn" in eqA is linked to "v" in G
File "/Users/erlebach/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Brian2-2.0beta-py2.7-macosx-10.6-x86_64.egg/brian2/synapses/synapses.py", line 599, in __init__
PARAMETER: ['constant', 'shared']})
File "/Users/erlebach/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/Brian2-2.0beta-py2.7-macosx-10.6-x86_64.egg/brian2/equations/equations.py", line 886, in check_flags
flag, allowed_flags[eq.type]))
ValueError: Equations of type "parameter" cannot have a flag "linked", only the following flags are allowed: ['constant', 'shared']
Thanks!
Gordon