Skip to content

Commit

Permalink
Updated exported cell, adding axon & fixing densities
Browse files Browse the repository at this point in the history
Passing tests
  • Loading branch information
pgleeson committed Apr 18, 2017
1 parent cecf547 commit 399eb0c
Show file tree
Hide file tree
Showing 13 changed files with 6,955 additions and 6,347 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@ generatedNeuroML2
/NeuroML2/L23_NoHotSpot.cell.svg
/NeuroML2/L23_IV.net.svg
/NeuroML2/L23_morph.cell.svg
/NEURON/temp.*
/NeuroML2/*cell.png
/NeuroML2/*old
11 changes: 7 additions & 4 deletions NEURON/test/.test.l23.mep
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
system: Testing a detailed cell

experiments:
0.6:
0.3:
expected:
spike times: [55.95, 68.85, 80.55, 90.325, 142.6, 156.45, 171.025, 185.575, 200.1, 214.65, 229.25, 243.85, 258.525, 273.2, 287.925]
0.7:
spike times: [71.275, 106.525, 153.125]
0.4:
expected:
spike times: [54.825, 66.6, 76.75, 171.1, 182.05, 194.675, 207.7, 220.7, 233.675, 246.7, 259.725, 272.8, 285.9, 299.0]
spike times: [60.975, 79.25, 97.925, 117.75, 138.65, 160.225, 182.2, 204.475, 226.975, 249.65, 272.475, 295.425]
0.5:
expected:
spike times: [57.675, 72.375, 86.325, 99.95, 113.85, 128.825, 144.925, 161.55, 178.4, 195.35, 212.4, 229.525, 246.725, 263.975, 281.275, 298.6]
18 changes: 14 additions & 4 deletions NEURON/test/.test.l23.pynrn.omt
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,32 @@ target: test_iclamp.py
engine: PyNEURON
mep: .test.l23.mep
experiments:
0.6:
0.3:
observables:
spike times:
file:
path: voltage.dat
columns: [0,8]
columns: [0,5]
scaling: [1000, 1000]
spike detection:
method: threshold
tolerance: 0
0.7:
0.4:
observables:
spike times:
file:
path: voltage.dat
columns: [0,9]
columns: [0,6]
scaling: [1000, 1000]
spike detection:
method: threshold
tolerance: 0
0.5:
observables:
spike times:
file:
path: voltage.dat
columns: [0,7]
scaling: [1000, 1000]
spike detection:
method: threshold
Expand Down
16 changes: 13 additions & 3 deletions NEURON/test/load_l23.hoc
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@

nrnpython("from neuron import h")
nrnpython("import os")
nrnpython("print os.getcwd()")
nrnpython("print('Current dir: '+os.getcwd())")
nrnpython("from test_iclamp import run_iclamp")

nrnpython("run_iclamp([0], False, True)")
celsius = 35

nrnpython("mymodel = run_iclamp([0], True, True, None)")

define_shape()

count2=0
forall {print "--------------- ", secname()}
forall { count2=count2+1 }
print "-- Number of sections: ", count2

load_file("test/cellCheck.hoc")

psection()
cellInfo()
2 changes: 1 addition & 1 deletion NEURON/test/singleCompAllChans.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def run(tstop=10, dt=0.001):



varlist = ['v']#, 'ica', 'cai']
varlist = ['v', 'ica', 'cai', 'ina', 'ik']
ds = create_dumps(comp, varlist)

run(600, 0.001)
Expand Down
9 changes: 6 additions & 3 deletions NEURON/test/test_iclamp.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ def run_iclamp(iRange, run, nogui, vFileName):
lb.add_dendStim(model, data.iclampLoc[1], data.iclampLoc[2],
onset=data.iclampOnset, dur=data.iclampDur, amp=data.iclampAmp)

h('count=0')
h('forall {print "--------------- ", secname() \n count=count+1 } ')
h('print "Number of sections: ", count')

if run:
data.vdata, data.vDdata, data.gdata, data.idata, data.caDdata, data.vsec = [], [], [], [], [], []
data.rates = []
Expand All @@ -83,8 +87,6 @@ def run_iclamp(iRange, run, nogui, vFileName):
for k in sorted(data.__dict__.keys()):
print(" %s:\t\t%s"%(k, data.__dict__[k]))
SIM_currentSteps(data, model, data.iRange, data.BGROUND)

h('forall {print "--------------- ", secname() \n psection() } ')

modelData = sc.emptyObject()
lb.props(modelData)
Expand Down Expand Up @@ -125,6 +127,7 @@ def run_iclamp(iRange, run, nogui, vFileName):

print("Done!")

return model


if __name__ == "__main__":
Expand All @@ -136,4 +139,4 @@ def run_iclamp(iRange, run, nogui, vFileName):
iRange = np.array([0.7])
vFileName = './test/voltage.one.dat'

run_iclamp(iRange, True, nogui, vFileName)
model = run_iclamp(iRange, True, nogui, vFileName)
35 changes: 32 additions & 3 deletions NeuroML2/.test.iv.jnmlnrn.omt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,35 @@

target: LEMS_L23_IV.xml
engine: jNeuroML_NEURON



mep: ../NEURON/test/.test.l23.mep
experiments:
0.3:
observables:
spike times:
file:
path: Sim_L23_IV.L23_pop.v.dat
columns: [0,5]
scaling: [1000, 1000]
spike detection:
method: threshold
tolerance: 0.009143
0.4:
observables:
spike times:
file:
path: Sim_L23_IV.L23_pop.v.dat
columns: [0,6]
scaling: [1000, 1000]
spike detection:
method: threshold
tolerance: 0.004739
0.5:
observables:
spike times:
file:
path: Sim_L23_IV.L23_pop.v.dat
columns: [0,7]
scaling: [1000, 1000]
spike detection:
method: threshold
tolerance: 0.002596
4 changes: 2 additions & 2 deletions NeuroML2/GenerateIV.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ def generate(cell_id, duration, reference, iRange):

cell_id = 'L23_NoHotSpot'
reference = "L23_IV"
duration = 350
duration = 400
iRange = np.arange(-0.1,0.8,0.1)

if '-one' in sys.argv:
iRange = np.array([0.7])
reference = "L23_One"
duration = 350
duration = 400

generate(cell_id, duration, reference, iRange)
6 changes: 3 additions & 3 deletions NeuroML2/L23_IV.net.nml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<neuroml xmlns="http://www.neuroml.org/schema/neuroml2" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.neuroml.org/schema/neuroml2 https://raw.github.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2beta5.xsd" id="L23_IV">
<notes>

This NeuroML 2 file was generated by OpenCortex v0.0.6 using:
libNeuroML v0.2.23
pyNeuroML v0.2.2
This NeuroML 2 file was generated by OpenCortex v0.0.8 using:
libNeuroML v0.2.29
pyNeuroML v0.2.10

</notes>
<property tag="Python random seed" value="1234"/>
Expand Down
Loading

0 comments on commit 399eb0c

Please sign in to comment.