Skip to content

Commit

Permalink
Finished backend version that can be merged with the master branch.
Browse files Browse the repository at this point in the history
  • Loading branch information
Richert committed Jul 10, 2019
1 parent 2a7efe5 commit baed323
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 11 deletions.
68 changes: 58 additions & 10 deletions model_templates/jansen_rit/simple_jansenrit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,62 @@ PRO:
V_thr:
default: 6e-3

RPO:
JRC_op:
base: OperatorTemplate
equations:
- 'd/dt * PSP = PSP_t'
- 'd/dt * PSP_t = h/tau * (sigmoid(V_in, m_max, r, V_thr) + u) - (1./tau)^2. * PSP - 2. * 1./tau * PSP_t'
- 'd/dt * PSP_ein = PSP_t_ein'
- 'd/dt * PSP_t_ein = h_e*c_pc_ein/tau_e * sigmoid((PSP_pc_e + PSP_pc_i), m_max, r, V_thr) - (1./tau_e)^2. * PSP_ein - (2./tau_e) * PSP_t_ein'
- 'd/dt * PSP_iin = PSP_t_iin'
- 'd/dt * PSP_t_iin = h_e*c_pc_iin/tau_e * sigmoid((PSP_pc_e + PSP_pc_i), m_max, r, V_thr) - (1./tau_e)^2. * PSP_iin - (2./tau_e) * PSP_t_iin'
- 'd/dt * PSP_pc_e = PSP_t_pc_e'
- 'd/dt * PSP_t_pc_e = h_e/tau_e * (c_ein_pc*sigmoid(PSP_ein, m_max, r, V_thr) + u) - (1./tau_e)^2. * PSP_pc_e - (2./tau_e) * PSP_t_pc_e'
- 'd/dt * PSP_pc_i = PSP_t_pc_i'
- 'd/dt * PSP_t_pc_i = h_i*c_iin_pc/tau_i * sigmoid(PSP_iin, m_max, r, V_thr) - (1./tau_i)^2. * PSP_pc_i - (2./tau_i) * PSP_t_pc_i'
- 'PSP_pc = PSP_pc_e + PSP_pc_i'
variables:
h:
h_e:
default: 3.25e-3
tau:
tau_e:
default: 10e-3
h_i:
default: -22e-3
tau_i:
default: 20e-3
u:
default: placeholder
V_in:
default: input
in_var: PSP
PSP:
PSP_ein:
default: variable
PSP_t_ein:
default: variable
PSP_iin:
default: variable
PSP_t_iin:
default: variable
PSP_pc:
default: output
PSP_t:
PSP_pc_e:
default: variable
PSP_t_pc_e:
default: variable
PSP_pc_i:
default: variable
PSP_t_pc_i:
default: variable
m_max:
default: 5.
r:
default: 560.
V_thr:
default: 6e-3
c_ein_pc:
default: 108.0
c_iin_pc:
default: 33.75
c_pc_ein:
default: 135.0
c_pc_iin:
default: 33.75


RPO_e_pc:
base: OperatorTemplate
Expand Down Expand Up @@ -98,6 +135,11 @@ RPO_i:
PSP_t:
default: variable

JRC_pop:
base: NodeTemplate
operators:
- JRC_op

PC:
base: NodeTemplate
operators:
Expand Down Expand Up @@ -133,3 +175,9 @@ JRC:
- [PC/PRO/m_out, EIN/RPO_e/m_in, DummyEdge, {weight: 135.}]
- [EIN/PRO/m_out, PC/RPO_e_pc/m_in, DummyEdge, {weight: 108.}]
- [IIN/PRO/m_out, PC/RPO_i/m_in, DummyEdge, {weight: 33.75}]

JRC_simple:
base: CircuitTemplate
nodes:
JRC: JRC_pop
edges:
2 changes: 1 addition & 1 deletion pyrates/backend/funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
# function definitions
######################

def pr_sigmoid(x, scaling=1., steepness=1.0, offset=0.):
def pr_sigmoid(x, scaling=1.0, steepness=1.0, offset=0.0):
return scaling/(1. + np.exp(steepness*(offset-x)))


Expand Down

0 comments on commit baed323

Please sign in to comment.