sim.create(netParams, simConfig)
sim.simulate()
sim.analyze()
like so:
stimtimevec = sim.allSimData.t
VavgM=np.zeros(len(sim.allSimData.t))
for i in range(20,40):
arrayname = f'cell_{i}'
VavgM = np.add(VavgM,sim.allSimData.V_soma[arrayname])
VavgM = (1/20)*VavgM
plt.figure(figsize=(10,6))
plt.plot(stimtimevec,VavgM)
plt.xlabel("Time (ms)")
plt.ylabel("Voltage (mV)")
plt.rcParams['font.size'] = 16
But that didn't work... any suggestions would be greatly appreciated.
Thank you
Maliha
randomname = 3
randomname2 = 4
with open('tut8_output.txt', "a") as tut8_output_txt:
l1 = '\n [%.3f,' % randomname
l2 = '%.3f],' % randomname2
tut8_output_txt.writelines([l1,l2])
I expected that each time the init.py is called for each run, these lines would also get executed but that's not the case. Hmm..