Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
anna29 committed Sep 8, 2014
1 parent a9518ac commit 6285c94
Show file tree
Hide file tree
Showing 9 changed files with 2,576 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

.idea
# C extensions
*.so

Expand Down
540 changes: 540 additions & 0 deletions ChrisCabot/cabot1.py

Large diffs are not rendered by default.

177 changes: 177 additions & 0 deletions ChrisCabot/cabot1_out.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@

Pop Back

[<SpikeTrain(array([ 203.06718514, 204.2123412 , 205.31957063, 206.40809001,
207.4856394 , 208.55610744, 209.62172635, 210.68389217,
211.74353296, 212.80129439, 213.85763906, 214.91290407,
215.9673452 , 217.02116001, 218.07450337, 219.12749295,
220.18022216, 221.23276694, 222.28518966, 223.33754198,
224.38986711, 225.44219565, 226.49455397, 227.546965 ,
228.59944891, 229.65202265, 230.70469672, 231.75748119,
232.81038576, 233.86341989, 234.91659285, 235.96991354,
237.02338528, 238.07701231, 239.13079967, 240.18475305,
241.23887273, 242.29316046, 243.34761924, 244.40225311,
245.457067 , 246.51206658, 247.56725816, 248.62264276,
249.67822285, 250.73400217, 251.78997919, 252.84615433,
253.90252963, 254.95910847, 256.01589537, 257.07289581,
258.13011611, 259.18705674, 260.24060045, 261.29182109,
262.34102682, 263.38847346, 264.43571571, 265.48303967,
266.53044818, 267.57794495, 268.62553439, 269.67322121,
270.72101038, 271.76890536, 272.81690169, 273.86499678,
274.91318952, 275.96148008, 277.00986964, 278.05836022,
279.10695457, 280.155656 , 281.20446833, 282.25339575,
283.30244282, 284.35161439, 285.40090832, 286.45032079,
287.49984973, 288.54949447, 289.5992555 , 290.64913434,
291.69913329, 292.74925537, 293.79950415, 294.84988374,
295.90039862, 296.95105368, 298.0018541 , 299.05279802]) * ms, [0.0 ms, 300.0 ms])>]

Pop Forward

[<SpikeTrain(array([ 7.7896748 , 8.93484849, 10.04212847, 11.13063423,
12.2081261 , 13.27851411, 14.34403943, 15.40610211,
16.46563206, 17.52327563, 18.57949803, 19.63464332,
20.68897158, 21.7426829 , 22.79593349, 23.84884653,
24.90151485, 25.95401346, 27.00640346, 28.058735 ,
29.11104959, 30.16338185, 31.21576086, 32.26821133,
33.32075275, 34.37339836, 35.42615998, 36.47904833,
37.53207322, 38.58524373, 39.63856263, 40.69203318,
41.74565905, 42.79944429, 43.85339324, 44.90751051,
45.96180089, 47.0162694 , 48.07092119, 49.12576159,
50.18079609, 51.2360303 , 52.29147004, 53.34712123,
54.40298998, 55.45908256, 56.51539985, 57.57194376,
58.6287171 , 59.68572343, 60.74296697, 61.79820698,
62.8504048 , 63.90004608, 64.94753276, 65.99472108,
67.0420046 , 68.08938556, 69.13686676, 70.18445142,
71.23213802, 72.279926 , 73.32781565, 74.37580791,
75.4239043 , 76.47210685, 77.52041797, 78.56884044,
79.6173773 , 80.66603185, 81.71480755, 82.76370804,
83.81273709, 84.86189863, 85.91119666, 86.96063065,
88.0102009 , 89.05990848, 90.10975219, 91.15972947,
92.20983902, 93.26008057, 94.3104547 , 95.36096273,
96.41160659, 97.46238875, 98.51331209, 99.56437992,
100.61559585, 101.66696379, 102.71848371, 103.77015544,
104.8219797 , 105.87395804, 106.92609263, 107.97838622,
109.03084203, 110.08346368, 111.13625517, 112.18922079,
113.24236515, 114.29569311, 115.34920973, 116.40292032,
117.45682884, 118.51093399, 119.56523191, 120.61972046,
121.67439888, 122.72926763, 123.78432811, 124.8395826 ,
125.89503404, 126.95068601, 128.00654256, 129.06260821,
130.11888786, 131.17538677, 132.23211049, 133.28906489,
134.34625609, 135.40254387, 136.45544354, 137.50550436,
138.5531808 , 139.6003517 , 140.64762212, 141.69499496,
142.74247356, 143.79006153, 144.83776258, 145.88557686,
146.93350432, 147.9815457 , 149.02969761, 150.07795763,
151.12632449, 152.17479788, 153.22337829, 154.27206684,
155.3208652 , 156.36977547, 157.41880016, 158.46794209,
159.51720435, 160.5665903 , 161.6161035 , 162.66574771,
163.71552686, 164.76544502, 165.81550196, 166.86569787,
167.9160337 , 168.96651108, 170.0171322 , 171.06789974,
172.11881675, 173.16988503, 174.2211034 , 175.27247182,
176.32399114, 177.37566302, 178.42748974, 179.47947417,
180.53161964, 181.58392437, 182.63638782, 183.68901051,
184.74179379, 185.79473976, 186.84785112, 187.90113111,
188.95458336, 190.00821188, 191.06202097, 192.11601521,
193.1701994 , 194.22457862, 195.27915813, 196.33394341,
197.38893721, 198.44414051, 199.4995553 , 200.55518433,
201.61103086, 202.66709309, 203.72337068, 204.77986456,
205.83657669, 206.8935099 , 207.95066778, 209.00801228,
210.06162528, 211.11211608, 212.15998828, 213.20714146,
214.25438876, 215.30173044, 216.34916766, 217.39670228,
218.44433666, 219.49207341, 220.53991547, 221.58786596,
222.63592825, 223.68410586, 224.73240247, 225.78082187,
226.82936796, 227.87804339, 228.92684789, 229.97577919,
231.02483379, 232.07400952, 233.12330536, 234.17272123,
235.22225781, 236.27191644, 237.32169904, 238.37160798,
239.42164602, 240.47181628, 241.52212219, 242.57256742,
243.62315588, 244.6738894 , 245.72476752, 246.77579071,
247.82696024, 248.87827801, 249.9297465 , 250.98136867,
252.03314789, 253.0850879 , 254.13719277, 255.18946685,
256.24191475, 257.29454097, 258.34734558, 259.40032577,
260.45347837, 261.50680173, 262.56029548, 263.61396024,
264.66779753, 265.72180955, 266.77599912, 267.83036959,
268.88492473, 269.93966871, 270.99460602, 272.04974146,
273.10508012, 274.16062734, 275.2163887 , 276.27237003,
277.32857175, 278.38499539, 279.44164343, 280.49851914,
281.55562648, 282.6129253 , 283.6663667 , 284.71658258,
285.76458721, 286.81172757, 287.85896611, 288.90630395,
289.95374294, 291.00128421, 292.04892581, 293.09666683,
294.14450726, 295.19244779, 296.24048973, 297.28863488,
298.33688543, 299.38524392]) * ms, [0.0 ms, 300.0 ms])>]

Pop Turn Right

[<SpikeTrain(array([], dtype=float64) * ms, [0.0 ms, 300.0 ms])>]

Pop Turn Left

[<SpikeTrain(array([ 5.06718514, 6.2123412 , 7.31957063, 8.40809001,
9.4856394 , 10.5561067 , 11.62171714, 12.6838591 ,
13.74345372, 14.80114144, 15.85738336, 16.91251047,
17.96677334, 19.02036521, 20.0734273 , 21.12607083,
22.17838487, 23.23044181, 24.28230118, 25.33401239,
26.38561681, 27.43714977, 28.48863961, 29.54010367,
30.59155068, 31.6429888 , 32.69442642, 33.74587204,
34.79733427, 35.84882172, 36.90034303, 37.95190684,
39.00352181, 40.05519649, 41.10693931, 42.15875782,
43.21065221, 44.26261495, 45.31464108, 46.36672732,
47.41887214, 48.47107522, 49.52333774, 50.57566183,
51.62805076, 52.68050873, 53.7330401 , 54.78564996,
55.83834402, 56.89112846, 57.94400231, 58.99696424,
60.05000801, 61.10312999, 62.15632873, 63.20960453,
64.26295914, 65.31639477, 66.36991459, 67.42352247,
68.47722309, 69.53102145, 70.58492295, 71.63893308,
72.69305026, 73.74727422, 74.80159957, 75.85601998,
76.91053137, 77.96513168, 79.01982074, 80.07460003,
81.12947239, 82.18444172, 83.23951288, 84.29469144,
85.34998364, 86.40539622, 87.46092991, 88.51658505,
89.57236362, 90.62825988, 91.68426997, 92.74039216,
93.79662664, 94.85297489, 95.90875397, 96.96312321,
98.01622638, 99.06813605, 100.11917726, 101.17028403,
102.22145415, 103.27268702, 104.32398343, 105.37534536,
106.42676816, 107.47824921, 108.52978782, 109.58138424,
110.63304008, 111.68475807, 112.73654189, 113.78839597,
114.84032535, 115.89233253, 116.94441596, 117.99657566,
119.04881312, 120.10113025, 121.15353008, 122.20600771,
123.25856028, 124.31118658, 125.36388694, 126.41666285,
127.46951692, 128.52245264, 129.57547419, 130.62858152,
131.6817724 , 132.73504632, 133.78840413, 134.84184807,
135.8953815 , 136.94900874, 138.00272764, 139.05653644,
140.11043501, 141.16442445, 142.21850621, 143.27268288,
144.32695785, 145.38132985, 146.43579714, 147.49035967,
148.54501903, 149.59977823, 150.6546414 , 151.70961355,
152.76470019, 153.81990211, 154.87495896, 155.92980463,
156.98438576, 158.03865545, 159.0925726 , 160.14609434,
161.19918389, 162.25180963, 163.30397758, 164.35568496,
165.40693694, 166.45772295, 167.50835269, 168.55903889,
169.60977621, 170.66056115, 171.71169296, 172.7630644 ,
173.81457896, 174.86614444, 175.91767861, 176.96910885,
178.02037116, 179.07154617, 180.12277158, 181.17405168,
182.22539122, 183.27679545, 184.32827 , 185.37981077,
186.43141524, 187.48308193, 188.53481041, 189.58659517,
190.63843241, 191.69032019, 192.74225801, 193.79424667,
194.84628811, 195.89838543, 196.95054274, 198.00276444,
199.05505571, 200.10742239, 201.15935104, 202.20997997,
203.25998264, 204.30934054, 205.35804219, 206.40608565,
207.45374108, 208.50141366, 209.54910728, 210.59682644,
211.64457631, 212.69236255, 213.74019131, 214.78806801,
215.83599791, 216.88397887, 217.9320031 , 218.98006381,
220.02815617, 221.07627713, 222.12442514, 223.17259989,
224.22080216, 225.26903366, 226.31729707, 227.3655959 ,
228.41393439, 229.4623169 , 230.51074829, 231.55922962,
232.60775307, 233.65631323, 234.70490692, 235.75353262,
236.80219006, 237.85087981, 238.89960331, 239.94836246,
240.99715937, 242.04599657, 243.0948772 , 244.1438047 ,
245.19278294, 246.24181259, 247.29089189, 248.34001257,
249.38916912, 250.43835839, 251.48757905, 252.53683076,
253.58611458, 254.63543282, 255.68478878, 256.73418657,
257.78363088, 258.83312699, 259.88268048, 260.93229515,
261.9819706 , 263.03170249, 264.08148455, 265.13131277,
266.18118451, 267.23109859, 268.28105491, 269.33105438,
270.38109868, 271.43119051, 272.48133316, 273.5315307 ,
274.58178705, 275.63210496, 276.68248262, 277.73291994,
278.78340997, 279.83394811, 280.88453211, 281.93516161,
282.98583773, 284.03656287, 285.08734043, 286.13817406,
287.18906773, 288.24002592, 289.29105336, 290.34215449,
291.39332802, 292.44457424, 293.49589424, 294.54728112,
295.59872991, 296.65023758, 297.7018025 , 298.75342465,
299.80510523]) * ms, [0.0 ms, 300.0 ms])>]
197 changes: 197 additions & 0 deletions ChrisCabot/objRecConnections.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
DELAY = 1.0

INPUT_NEURONS_HEIGHT = 50
INPUT_NEURONS_WIDTH = 50

CA_HEIGHT = 10
CA_WIDTH = 10

#----------------setup connections-----------------
#setup CAs in the pyramid and stalactite net
def connectCA (CANum):
CASize = CA_WIDTH*CA_HEIGHT
CARow = CANum/5
CACol = CANum%5
synWeight = 3.0
numSynapses = 10
connector = []
for cRow in range (0,CA_HEIGHT):
for cCol in range (0,CA_WIDTH):
fromNeuron=cRow*INPUT_NEURONS_WIDTH+cCol
fromNeuron=fromNeuron+(CARow*CA_HEIGHT*INPUT_NEURONS_WIDTH)
fromNeuron = fromNeuron + (CACol*CA_WIDTH)
for cSynapse in range (0,numSynapses):
toCol = cCol + cSynapse + 1
toRow = cRow
if (toCol>=CA_WIDTH) :
toCol = toCol - 10
toRow = toRow + 1
if (toRow>=CA_HEIGHT) :
toRow = toRow - 10
toNeuron=toRow*INPUT_NEURONS_WIDTH+toCol
toNeuron=toNeuron+(CARow*CA_HEIGHT*INPUT_NEURONS_WIDTH)
toNeuron = toNeuron + (CACol*CA_WIDTH)
connector = connector + [(fromNeuron,toNeuron,synWeight,DELAY)]

return connector

#add connections up 5 and over one both ways (15)
def connectHEdgeBottomToPyramid ():
totalNeurons = INPUT_NEURONS_HEIGHT*INPUT_NEURONS_WIDTH
synWeight = 10.0
connector = []
for cNeuron in range (INPUT_NEURONS_WIDTH*10,totalNeurons):
fromRow = cNeuron/50
fromCol = cNeuron % 50
for toRow in range(fromRow-5,fromRow):
for toCol in range (fromCol-1,fromCol + 2):
toNeuron = toRow*50+toCol
connector = connector + [(cNeuron,toNeuron,synWeight,DELAY)]
return connector

#add connections down left (7:30) 5 and over one both ways (15)
def connectSEdgeLeftToPyramid ():
totalNeurons = INPUT_NEURONS_HEIGHT*INPUT_NEURONS_WIDTH
synWeight = 10.0
connector = []
for cNeuron in range (5,totalNeurons-(INPUT_NEURONS_WIDTH*10)):
fromRow = cNeuron/50
fromCol = cNeuron % 50
if fromCol < 5:
continue
for rowChange in range(1,6):
toRow = fromRow+rowChange
for toCol in range (fromCol-rowChange-1,fromCol-rowChange + 2):
toNeuron = toRow*50+toCol
connector = connector + [(cNeuron,toNeuron,synWeight,DELAY)]
return connector

#bedge
#add connections down right (4:30) 5 and over one both ways (15)
def connectBEdgeRightToPyramid ():
totalNeurons = INPUT_NEURONS_HEIGHT*INPUT_NEURONS_WIDTH
synWeight = 10.0
connector = []
for cNeuron in range (0,totalNeurons-(INPUT_NEURONS_WIDTH*10)):
fromRow = cNeuron/50
fromCol = cNeuron % 50
if fromCol > 45:
continue
for rowChange in range(1,6):
toRow = fromRow+rowChange
for toCol in range (fromCol+rowChange-1,fromCol+rowChange + 2):
toNeuron = toRow*50+toCol
connector = connector + [(cNeuron,toNeuron,synWeight,DELAY)]
return connector

#add connections down 5 and over one both ways (15)
def connectAndAngleToPyramid ():
totalNeurons = INPUT_NEURONS_HEIGHT*INPUT_NEURONS_WIDTH
synWeight = 10.0
connector = []
for cNeuron in range (0,totalNeurons-(INPUT_NEURONS_WIDTH*10)):
fromRow = cNeuron/50
fromCol = cNeuron % 50
for toRow in range(fromRow+1,fromRow+6):
for toCol in range (fromCol-1,fromCol + 2):
toNeuron = toRow*50+toCol
connector = connector + [(cNeuron,toNeuron,synWeight,DELAY)]
return connector

#add connections up right (1:30) 5 and over one both ways (15)
def connectLessThanAngleToPyramid ():
totalNeurons = INPUT_NEURONS_HEIGHT*INPUT_NEURONS_WIDTH
synWeight = 10.0
connector = []
for cNeuron in range (INPUT_NEURONS_WIDTH*5,totalNeurons):
fromRow = cNeuron/50
fromCol = cNeuron % 50
if fromCol > 45:
continue
for rowChange in range(-5,0):
toRow = fromRow+rowChange
for toCol in range (fromCol-rowChange-1,fromCol-rowChange + 2):
toNeuron = toRow*50+toCol
connector = connector + [(cNeuron,toNeuron,synWeight,DELAY)]
return connector

#add connections up left (half ten) 5 and over one both ways (15)
def connectGreaterThanAngleToPyramid ():
totalNeurons = INPUT_NEURONS_HEIGHT*INPUT_NEURONS_WIDTH
synWeight = 10.0
connector = []
for cNeuron in range (INPUT_NEURONS_WIDTH*5,totalNeurons):
fromRow = cNeuron/50
fromCol = cNeuron % 50
if fromCol < 6:
continue
for rowChange in range(-5,0):
toRow = fromRow+rowChange
for toCol in range (fromCol+rowChange-1,fromCol+rowChange + 2):
toNeuron = toRow*50+toCol
connector = connector + [(cNeuron,toNeuron,synWeight,DELAY)]
return connector


#add connections down 5 and over one both ways (15)
def connectHEdgeTopToStalactite ():
totalNeurons = INPUT_NEURONS_HEIGHT*INPUT_NEURONS_WIDTH
synWeight = 10.0
connector = []
for cNeuron in range (0,totalNeurons-(INPUT_NEURONS_WIDTH*10)):
fromRow = cNeuron/50
fromCol = cNeuron % 50
for toRow in range(fromRow+1,fromRow+6):
for toCol in range (fromCol-1,fromCol + 2):
toNeuron = toRow*50+toCol
connector = connector + [(cNeuron,toNeuron,synWeight,DELAY)]
return connector

#add connections up left (half ten) 5 and over one both ways (15)
def connectSEdgeRightToStalactite ():
totalNeurons = INPUT_NEURONS_HEIGHT*INPUT_NEURONS_WIDTH
synWeight = 10.0
connector = []
for cNeuron in range (INPUT_NEURONS_WIDTH*5,totalNeurons):
fromRow = cNeuron/50
fromCol = cNeuron % 50
if fromCol < 6:
continue
for rowChange in range(-5,0):
toRow = fromRow+rowChange
for toCol in range (fromCol+rowChange-1,fromCol+rowChange + 2):
toNeuron = toRow*50+toCol
connector = connector + [(cNeuron,toNeuron,synWeight,DELAY)]
return connector


#add connections up right (1:30) 5 and over one both ways (15)
def connectBEdgeLeftToStalactite():
totalNeurons = INPUT_NEURONS_HEIGHT*INPUT_NEURONS_WIDTH
synWeight = 10.0
connector = []
for cNeuron in range (INPUT_NEURONS_WIDTH*5,totalNeurons):
fromRow = cNeuron/50
fromCol = cNeuron % 50
if fromCol > 45:
continue
for rowChange in range(-5,0):
toRow = fromRow+rowChange
for toCol in range (fromCol-rowChange-1,fromCol-rowChange + 2):
toNeuron = toRow*50+toCol
connector = connector + [(cNeuron,toNeuron,synWeight,DELAY)]
return connector

#add connections up 5 and over one both ways (15)
def connectOrAngleToStalactite ():
totalNeurons = INPUT_NEURONS_HEIGHT*INPUT_NEURONS_WIDTH
synWeight = 10.0
connector = []
for cNeuron in range (INPUT_NEURONS_WIDTH*10,totalNeurons):
fromRow = cNeuron/50
fromCol = cNeuron % 50
for toRow in range(fromRow-5,fromRow):
for toCol in range (fromCol-1,fromCol + 2):
toNeuron = toRow*50+toCol
connector = connector + [(cNeuron,toNeuron,synWeight,DELAY)]
return connector
Binary file added ChrisCabot/pyr1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 6285c94

Please sign in to comment.