1 | ;; |
---|
2 | ;; A model of the projections between Golgi and granule cells in |
---|
3 | ;; cerebellar granular layer. |
---|
4 | ;; |
---|
5 | ;; Copyright 2012-2014 Ivan Raikov and the Okinawa Institute of Science and Technology |
---|
6 | ;; |
---|
7 | ;; This program is free software: you can redistribute it and/or |
---|
8 | ;; modify it under the terms of the GNU General Public License as |
---|
9 | ;; published by the Free Software Foundation, either version 3 of the |
---|
10 | ;; License, or (at your option) any later version. |
---|
11 | ;; |
---|
12 | ;; This program is distributed in the hope that it will be useful, but |
---|
13 | ;; WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
15 | ;; General Public License for more details. |
---|
16 | ;; |
---|
17 | ;; A full copy of the GPL license can be found at |
---|
18 | ;; <http://www.gnu.org/licenses/>. |
---|
19 | ;; |
---|
20 | |
---|
21 | (npccl-model GL |
---|
22 | |
---|
23 | ( |
---|
24 | |
---|
25 | (const PFlength = 1500) |
---|
26 | |
---|
27 | (const PCLdepth = 200) |
---|
28 | |
---|
29 | (const nAxons = 10) |
---|
30 | (const Axminx = -100) |
---|
31 | (const Axmaxx = 100) |
---|
32 | (const Axminy = -100) |
---|
33 | (const Axmaxy = 100) |
---|
34 | (const Axminz = -10) |
---|
35 | (const Axmaxz = -30) |
---|
36 | |
---|
37 | (const nApical = 2) |
---|
38 | (const nBasolateral = 2) |
---|
39 | |
---|
40 | (const Anseg = 3 ) |
---|
41 | (const Bnseg = 5 ) |
---|
42 | (const Ansegpts = 5 ) |
---|
43 | (const Bnsegpts = 5 ) |
---|
44 | |
---|
45 | (const Adendh = 160.0 ) |
---|
46 | (const Bdendh = 66.0 ) |
---|
47 | (const Aradius = 10.0 ) |
---|
48 | (const Bradius = 6.0 ) |
---|
49 | (const AthetaMean = 10.0 ) |
---|
50 | (const BthetaMean = 10.0 ) |
---|
51 | (const AthetaSdev = 1.0 ) |
---|
52 | (const BthetaSdev = 1.0 ) |
---|
53 | |
---|
54 | (const PFtoGoCzone = 5.0) |
---|
55 | (const AAtoGoCzone = 5.0) |
---|
56 | |
---|
57 | (component (type local-cell-forest) (name GC) |
---|
58 | |
---|
59 | |
---|
60 | (component (type layout) (name GranuleTcoordinates) |
---|
61 | |
---|
62 | (s = (PointsFromFile ("GCTcoordinates.sorted.dat"))) |
---|
63 | |
---|
64 | (output s) |
---|
65 | ) |
---|
66 | |
---|
67 | (component (type section) (name AscendingAxons) |
---|
68 | |
---|
69 | (defun f (origin) |
---|
70 | (let ((dX 0) |
---|
71 | (dY 0) |
---|
72 | (dZ (neg (PCLdepth)))) |
---|
73 | LineSegment (origin dX dY dZ) |
---|
74 | )) |
---|
75 | |
---|
76 | (const n = 1) |
---|
77 | |
---|
78 | (p (u) = (generator f) (npts 4)) |
---|
79 | |
---|
80 | (output u n) |
---|
81 | |
---|
82 | ) |
---|
83 | |
---|
84 | |
---|
85 | (component (type section) (name ParallelFibers) |
---|
86 | |
---|
87 | (defun f (origin) |
---|
88 | (let ((dX (PFlength / 2)) |
---|
89 | (dY 0) |
---|
90 | (dZ 0)) |
---|
91 | LineSegment (origin dX dY dZ))) |
---|
92 | |
---|
93 | (defun g (origin) |
---|
94 | (let ((dX (PFlength / 2)) |
---|
95 | (dY 0) |
---|
96 | (dZ 0)) |
---|
97 | LineSegment (origin ~ (neg (dX)) ~ dY ~ dZ))) |
---|
98 | |
---|
99 | (const n = 1) |
---|
100 | |
---|
101 | ;; process u grows in the positive X direction |
---|
102 | ;; process v grows in the negative X direction |
---|
103 | (p (u) = (generator f) (npts 200)) |
---|
104 | (p (v) = (generator g) (npts 200)) |
---|
105 | |
---|
106 | (output u n v n) |
---|
107 | |
---|
108 | ) |
---|
109 | |
---|
110 | |
---|
111 | |
---|
112 | ) |
---|
113 | |
---|
114 | |
---|
115 | (component (type cell-forest) (name GoC) |
---|
116 | |
---|
117 | (component (type layout) (name GolgiCoordinates) |
---|
118 | |
---|
119 | (s = (PointsFromFile ("GoCcoordinates.sorted.dat"))) |
---|
120 | |
---|
121 | (output s) |
---|
122 | ) |
---|
123 | |
---|
124 | (component (type section) (name BasolateralDendrites) |
---|
125 | |
---|
126 | |
---|
127 | (defun f (origin init) |
---|
128 | (let ( |
---|
129 | (thetaDeg (randomNormal (BthetaMean BthetaSdev init))) |
---|
130 | (theta ((PI / 180.) * thetaDeg)) |
---|
131 | |
---|
132 | (dX (Bradius * cos (theta))) |
---|
133 | (dY (Bradius * sin (theta))) |
---|
134 | (dZ Bdendh) |
---|
135 | ) |
---|
136 | |
---|
137 | LineSegment (origin dX dY dZ))) |
---|
138 | |
---|
139 | (const n = nBasolateral) |
---|
140 | |
---|
141 | (segp (u) = (generator f) (initial (randomInit (13))) |
---|
142 | (nsegs Bnseg) (nsegpts Bnsegpts)) |
---|
143 | |
---|
144 | (output u n) |
---|
145 | |
---|
146 | ) |
---|
147 | |
---|
148 | (component (type section) (name ApicalDendrites) |
---|
149 | |
---|
150 | (defun f (origin init) |
---|
151 | (let ( |
---|
152 | (thetaDeg (randomNormal (AthetaMean AthetaSdev init))) |
---|
153 | (theta ((PI / 180.) * thetaDeg)) |
---|
154 | |
---|
155 | (dX (Aradius * cos (theta))) |
---|
156 | (dY (Aradius * sin (theta))) |
---|
157 | (dZ Adendh) |
---|
158 | ) |
---|
159 | |
---|
160 | LineSegment (origin dX dY dZ))) |
---|
161 | |
---|
162 | (const n = nApical) |
---|
163 | |
---|
164 | (segp (u) = (generator f) (initial (randomInit (17))) |
---|
165 | (nsegs Anseg) (nsegpts Ansegpts)) |
---|
166 | |
---|
167 | (output u n) |
---|
168 | |
---|
169 | ) |
---|
170 | |
---|
171 | (component (type section) (name Axons) |
---|
172 | |
---|
173 | (const n = nAxons) |
---|
174 | |
---|
175 | (defun f (origin init) |
---|
176 | (let ((dX (randomUniform (Axminx Axmaxx init))) |
---|
177 | (dY (randomUniform (Axminy Axmaxy init))) |
---|
178 | (dZ (randomUniform (Axminz Axmaxz init)))) |
---|
179 | LineSegment (origin dX dY dZ))) |
---|
180 | |
---|
181 | (p (u) = (generator f) (initial (randomInit (23)))) |
---|
182 | |
---|
183 | (output u n) |
---|
184 | |
---|
185 | ) |
---|
186 | |
---|
187 | ) |
---|
188 | |
---|
189 | (component (type projection) |
---|
190 | |
---|
191 | (input (GC from cell-forests) |
---|
192 | (GoC from cell-forests)) |
---|
193 | |
---|
194 | (const r = PFtoGoCzone) |
---|
195 | |
---|
196 | (set source = (section GC ParallelFibers)) |
---|
197 | (set target = (section GoC ApicalDendrites)) |
---|
198 | |
---|
199 | (PFtoGoC = (SegmentProjection (r source target))) |
---|
200 | |
---|
201 | (output PFtoGoC) |
---|
202 | ) |
---|
203 | |
---|
204 | |
---|
205 | )) |
---|