-
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.
Merge pull request #2 from OpenSourceBrain/master
Updated scripts to test & compare channels NML2 vs mod
- Loading branch information
Showing
8 changed files
with
242 additions
and
46 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 |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
|
||
/NeuroML2/*.mod | ||
/NeuroML2/*.hoc | ||
/NeuroML2/*.dat | ||
|
||
/NEURON*/test/*.dat | ||
/NEURON*/*.dat | ||
|
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
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,174 @@ | ||
usegui = 1 | ||
|
||
{load_file("stdlib.hoc")} | ||
{load_file("stdgui.hoc")} | ||
|
||
|
||
create Soma | ||
access Soma | ||
|
||
celsius = 23 | ||
|
||
Soma {pt3dclear() pt3dadd(0.0, 0, 0.0, 27) pt3dadd(0.0, 27, 0.0, 27)} | ||
define_shape() | ||
|
||
forall Ra = 100 | ||
|
||
insert Golgi_lkg | ||
glbar_Golgi_lkg=2.1e-05 | ||
|
||
insert Golgi_KA | ||
gkbar_Golgi_KA=0.008 | ||
|
||
insert Golgi_CALC | ||
|
||
//ena = -55 | ||
ek = -84.69 | ||
|
||
proc initialiseValues0() { | ||
|
||
forall v = -65 | ||
|
||
} | ||
|
||
objref fih0 | ||
{fih0 = new FInitializeHandler(0, "initialiseValues0()")} | ||
|
||
objref stim1 | ||
objref stim2 | ||
|
||
|
||
Soma { | ||
stim1 = new IClamp(0.5) | ||
stim1.del = 200.0 | ||
stim1.dur = 200.0 | ||
stim1.amp = -0.005 | ||
|
||
stim2 = new IClamp(0.5) | ||
stim2.del = 800.0 | ||
stim2.dur = 200.0 | ||
stim2.amp = 0.04 | ||
} | ||
|
||
|
||
|
||
tstop = 1500.0 | ||
dt = 0.002 | ||
|
||
|
||
objref v_time | ||
objref f_time | ||
|
||
v_time = new Vector() | ||
{ v_time.record(&t) } | ||
//{ v_time.resize(70001) } // false | ||
f_time = new File() | ||
|
||
|
||
objref Soma_v | ||
{ Soma_v = new Vector() } | ||
{ Soma_v.record(&Soma.v(0.5))} | ||
objref Soma_ca | ||
{ Soma_ca = new Vector() } | ||
{ Soma_ca.record(&Soma.cai(0.5))} | ||
objref Soma_ka_a | ||
{ Soma_ka_a = new Vector() } | ||
{ Soma_ka_a.record(&Soma.a_Golgi_KA(0.5))} | ||
objref Soma_ka_b | ||
{ Soma_ka_b = new Vector() } | ||
{ Soma_ka_b.record(&Soma.b_Golgi_KA(0.5))} | ||
|
||
objref f_Soma_v | ||
|
||
|
||
objref GraphWin_0 | ||
objref GraphWin_1 | ||
objref GraphWin_2 | ||
objref GraphWin_3 | ||
|
||
if (usegui==1) { | ||
GraphWin_0 = new Graph(0) | ||
{GraphWin_0.size(0, tstop,-110.0,50.0)} | ||
{GraphWin_0.view(0, -110.0, tstop, 160.0, 80, 330, 330, 250)} | ||
{ | ||
GraphWin_0.addexpr("Soma.v", "Soma.v(0.5)", 1, 1, 0.8, 0.9, 2) | ||
graphList[0].append(GraphWin_0) | ||
} | ||
|
||
GraphWin_2 = new Graph(0) | ||
{GraphWin_2.size(0, tstop,0,1)} | ||
{GraphWin_2.view(0, 0, tstop, 1, 80, 330, 330, 250)} | ||
{ | ||
GraphWin_2.addexpr("KA a", "Soma.a_Golgi_KA", 1, 1, 0.8, 0.9, 2) | ||
GraphWin_2.addexpr("KA b", "Soma.b_Golgi_KA", 2, 1, 0.8, 0.9, 2) | ||
graphList[0].append(GraphWin_2) | ||
} | ||
|
||
GraphWin_3 = new Graph(0) | ||
{GraphWin_3.size(0, tstop,0,0.005)} | ||
{GraphWin_3.view(0, 0, tstop, 0.005, 80, 330, 330, 250)} | ||
{ | ||
GraphWin_3.addexpr("cai", "Soma.cai", 1, 1, 0.8, 0.9, 2) | ||
graphList[0].append(GraphWin_3) | ||
} | ||
|
||
} | ||
|
||
{run()} | ||
|
||
strdef timeFilename | ||
|
||
|
||
f_Soma_v = new File() | ||
strdef filename | ||
{sprint(filename, "Soma.dat")} | ||
f_Soma_v.wopen(filename) | ||
Soma_v.printf(f_Soma_v) | ||
f_Soma_v.close() | ||
|
||
|
||
{ sprint(timeFilename, "%s", "time.dat")} | ||
{ f_time.wopen(timeFilename) } | ||
{ v_time.printf(f_time) } | ||
{ f_time.close() } | ||
|
||
objref f_Soma_si | ||
f_Soma_si = new File() | ||
{ f_Soma_si.wopen("Soma.si.dat") } | ||
for i=0, Soma_v.size()-1 { | ||
f_Soma_si.printf("%f\t%f\n", v_time.x[i]/1000, Soma_v.x[i]/1000) | ||
} | ||
{ f_Soma_si.close() } | ||
|
||
|
||
|
||
objref f_Soma_ka | ||
f_Soma_ka = new File() | ||
{sprint(filename, "KA.dat")} | ||
f_Soma_ka.wopen(filename) | ||
for i=0, Soma_v.size()-1 { | ||
f_Soma_ka.printf("%f\t%f\t%f\n", v_time.x[i]/1000, Soma_ka_a.x[i], Soma_ka_b.x[i]) | ||
} | ||
f_Soma_ka.close() | ||
|
||
|
||
|
||
|
||
if (usegui==1) { | ||
// This code pops up a simple Run Control | ||
|
||
{ | ||
xpanel("RunControl", 0) | ||
v_init = -60.0 | ||
xbutton("Init & Run","run()") | ||
xbutton("Stop","stoprun=1") | ||
t = 0 | ||
xvalue("t","t", 2 ) | ||
xvalue("Tstop","tstop", 1,"tstop_changed()", 0, 1 ) | ||
dt = 0.01 | ||
xvalue("dt","dt", 1,"setdt()", 0, 1 ) | ||
xpanel(80,80) | ||
} | ||
} | ||
|
||
forall psection() |
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
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
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
Oops, something went wrong.