-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2ca7f68
commit 2e526ff
Showing
1 changed file
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |