Skip to content

Commit

Permalink
Issue robclewley#101: Fix MorrisLecar examples
Browse files Browse the repository at this point in the history
The function name "tau" collides with "math.tau", which ultimately
leads to a TypeError: 'float' object is not callable. This fix renames
"tau" to "tauw".
  • Loading branch information
davidcsterratt committed Oct 31, 2022
1 parent 939e3ab commit 0359dd5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions examples/PyCont_MorrisLecar_TypeI.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@

# Set up model
auxfndict = {'minf': (['v'], '0.5*(1 + tanh((v-v1)/v2))'), \
'winf': (['v'], '0.5*(1 + tanh((v-v3)/v4))'), \
'tau': (['v'], '1/cosh((v-v3)/(2*v4))') \
}
'winf': (['v'], '0.5*(1 + tanh((v-v3)/v4))'), \
'tauw': (['v'], '1/cosh((v-v3)/(2*v4))') \
}

vstr = '(Iapp - gCa*minf(v)*(v-vCa) - gK*w*(v-vK) - gL*(v-vL))/C'
wstr = 'phi*(winf(v)-w)/tau(v)'
wstr = 'phi*(winf(v)-w)/tauw(v)'

DSargs = args(name='MorrisLecar')
DSargs.pars = pars
Expand Down
8 changes: 4 additions & 4 deletions examples/PyCont_MorrisLecar_TypeII.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@

# Set up model
auxfndict = {'minf': (['v'], '0.5*(1 + tanh((v-v1)/v2))'), \
'winf': (['v'], '0.5*(1 + tanh((v-v3)/v4))'), \
'tau': (['v'], '1/cosh((v-v3)/(2*v4))') \
}
'winf': (['v'], '0.5*(1 + tanh((v-v3)/v4))'), \
'tauw': (['v'], '1/cosh((v-v3)/(2*v4))') \
}

vstr = '(Iapp - gCa*minf(v)*(v-vCa) - gK*w*(v-vK) - gL*(v-vL))/C'
wstr = 'phi*(winf(v)-w)/tau(v)'
wstr = 'phi*(winf(v)-w)/tauw(v)'

DSargs = args(name='MorrisLecar')
DSargs.pars = pars
Expand Down

0 comments on commit 0359dd5

Please sign in to comment.