I am modeling a biophysical network composed of two subnetworks. The neurons are instantiated in class objects for cells, cell types, and a network structure. Within the cells and cell types classes, I am recording membrane potential time series and within the network class I am storing netcons for external spike input and intra-subnetwork synapses.(very similar to the ball and stick python tutorial on the neuron documentation website). I am using jupyter notebook.
I have functions that defines a spike input with vecstim. And I have a function that creates two subnetworks and connects them with new synapses and netcons.
I put this all together to run like so:
Code: Select all
network_arrangment_1 = []
network_arrangement_2 = []
for spotdiameter in np.arange(1,2,0.5):
t = 10
rate_array = createRate(spotdiameter, t)
subnetwork1_input = createPoissonInputs(rate_array, t)
t = 10
d = 10 # always full field spot diameter for second network
rate_array = createRate(d,t)
subnetwork2_input = createPoissonInputs(rate_array, t)
for x in range(0,2):
if x==0:
netarrangement = 'type1' #inter-subnetwork arrangement
ring, ring2 = create2Rings(numberofcells=5, radiusofnetwork=100, subnetwork1_input, subnetwork2_input, netarrangement)
t = h.Vector().record(h._ref_t)
ring._netstim.number = 0 # just turning off netstim within the ring classes
ring2._netstim.number = 0 # just turning off netstim within the ring classes
h.v_init = -65
h.tstop = 22
h.celsius = 34
h.run();
vertstack = np.vstack((ring.IN_1.soma_v,
ring.TCcells[0].soma_v))
network_arrangement_1.append(vertstack)
else:
netarrangment = 'type2'
ring, ring2 = create2Rings(numberofcells=5, radiusofnetwork=100, subnetwork1_input, subnetwork2_input, netarrangement)
t = h.Vector().record(h._ref_t)
ring._netstim.number = 0
ring2._netstim.number = 0
h.v_init = -65
h.tstop = 22
h.celsius = 34
h.run();
vertstack = np.vstack((ring.IN_1.soma_v,
ring.TCcells[0].soma_v))
network_arrangement_2.append(vertstack)