File: BioAxonStub.hoc

package info (click to toggle)
bmtk 0.0%2Bgit20210109.8572664%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 74,876 kB
  • sloc: python: 24,853; javascript: 1,998; makefile: 34; sh: 16
file content (61 lines) | stat: -rw-r--r-- 1,035 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
begintemplate BioAxonStub

public init
public soma, dend, apic, axon
public all, somatic, basal, apical, axonal

objref all, somatic, basal, apical, axonal
objref this

create soma[1]
create dend[1]
create apic[1]
create axon[1]


proc init() {localobj nl, import
	all = new SectionList()
	somatic = new SectionList()
	basal = new SectionList()
	apical = new SectionList()
	axonal = new SectionList()
	forall delete_section()

//  nl = new Import3d_Neurolucida3()
	nl = new Import3d_SWC_read()
	nl.quiet = 1
	nl.input($s1)
	import = new Import3d_GUI(nl, 0)
//	import.quite = 1
	import.instantiate(this)
	
	simplify_axon()
}

proc simplify_axon() {

	forsec axonal { delete_section() } 
	create axon[2]
	
	axon[0] { 
	    L = 30 
	    diam = 1 
	    nseg = 1+2*int(L/40) 
	    all.append() 
	    axonal.append() 
	} 
	axon[1] { 
	    L = 30 
	    diam = 1 
	    nseg = 1+2*int(L/40) 
	    all.append() 
	    axonal.append() 
	} 
	connect axon(0), soma(0.5) 
	connect axon[1](0), axon[0](1) 
	define_shape()
	

}

endtemplate BioAxonStub