Expected end of text, found 'K'

26 views
Skip to first unread message

barbara....@gmail.com

unread,
Jul 22, 2020, 7:02:51 AM7/22/20
to Brian
Hi all,

I get the error in the object when defining some rule for the synapse I'm creating.

For example:

synEffectAstro = '''
... dKeastro/dt = (S_A/(F*Vol_E))*(IKA_pre -2*IPumpA_pre)                                           : mmolar  (clock-driven)
... dNaeastro/dt = (S_A/(F*Vol_E))*(-INaA_pre +3*IPumpA_pre)                                        : mmolar   (clock-driven)
... Ke_post += Keastro                                                                     : mmolar                           
... Nae_post += Naeastro                                                                  : mmolar  
'''

ecs_astro_to_syn = Synapses(astro, exc_syn, model=synEffectAstro)


And after that I get the following error, and it seems I cannot find the reason of the error:

brian2.equations.equations.EquationError: Parsing failed:
Ke_post += Keastro                                                                     : mmolar                           
^
Expected end of text, found 'K'  (at char 244), (line:4, col:1)


Any help/suggestion?

Barbara

Marcel Stimberg

unread,
Aug 4, 2020, 6:18:02 AM8/4/20
to Brian
Hi Barbara,
admittedly this is not a great error message... In equations, you cannot use "+=", this is why you get the error. I guess you wanted to use a "summed variable"? The correct syntax would be "Ke_post = Keastro : mmolar (summed)"

Best,
  Marcel

Reply all
Reply to author
Forward
0 new messages