Skip to content

Commit

Permalink
Create IntFire_PD.mod
Browse files Browse the repository at this point in the history
  • Loading branch information
ceciliaromaro authored Jul 10, 2018
1 parent 2ca7f68 commit 2e526ff
Showing 1 changed file with 86 additions and 0 deletions.
86 changes: 86 additions & 0 deletions IntFire_PD.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
NEURON {
: ARTIFICIAL_CELL means

ARTIFICIAL_CELL IntFire_PD
RANGE m, Iext, i
: m plays the role of voltage
}

PARAMETER {
:Membrane time constant
taum = 10 (ms)
:Absolute refractory period
tauref =2 (ms)
:Postsynaptic current time constant
tausyn = 0.5 (ms) :0.5
:Reset potential
Vreset = -65 (mV) : -49 (mV) :
:Fixed firing threshold
Vteta = -50 (mV)
:Membrane capacity
Cm = 250 (pF)
Iext = 0(pA)
}

: Specify units that have physiological interpretations (NB: ms is already declared)
UNITS {
(mV) = (millivolt)
(pF) = (picofarad)
(pA) = (picoamps)
}


ASSIGNED {
m(mV)
i(pA)
t0(ms)
refractory
}

FUNCTION M() {

}

FUNCTION I() {

}


INITIAL {
t0 = t
refractory = 0 : 0-integrates input, 1-refractory
}

NET_RECEIVE (w) {
if (refractory == 0) { : inputs integrated only when excitable

:6.5
i=i-(i/tausyn)*(t-t0)
i=i+w
m=m+(((Vreset-m)/taum)+((i+Iext)/Cm))*(t-t0)


:7.5
:i=i+w
:m=m+(((Vreset-m)/taum)+((i+Iext)/Cm))*(t-t0)
:i=i-(i/tausyn)*(t-t0)

:6.7
:m=m+(((Vreset-m)/taum)+((i+Iext)/Cm))*(t-t0)
:i=i+w
:i=i-(i/tausyn)*(t-t0)
t0 = t

if (m > Vteta) {
refractory = 1
:m = Vreset
m = Vreset+30
net_send(tauref, refractory)
net_event(t)
}
}else if (flag == 1) { : ready to integrate again
t0 = t
refractory = 0
m = Vreset
}
}

0 comments on commit 2e526ff

Please sign in to comment.