Beispiel #1
0

class Network:
    def __init__(self):
        savedparams = []
        savedcells = []


net = Network()
net.savedparams = savedparams
net.savedcells = savedcells


# Plot the mean number of spikes
if ShowMean:
    ns.plot_mean_spikes(net, "IC-soma")
    ns.show()

if SaveMean:
    ns.save_mean_spikes(net, "IC-soma", param, base_filename + "_mean.dat")
    ns.save_mean_spikes(net, "DNLL-soma", param, base_filename + "_DNLL_mean.dat")

if SaveSpikes:
    for a in param:
        ns.save_spikes(net, "IC-soma", a, base_filename + "_spikes_" + ns.list_to_string(a) + ".dat", repeats)

if SaveFSL:
    ns.save_fsl(net, "IC-soma", param, base_filename + "_fsl.dat", repeats)

if SaveVoltage:
    for d in stims:
Beispiel #2
0
        networks["C"].cells["IC"]["cells"][0].sec["soma"].diam = a

    for d in stims*repeats:
        progress.update(count, total)
        count += 1
        for net in networks:
            s[net].stim_dur = d 
            s[net].run()
            key = [a,d] 
            networks[net].savecells([["IC","soma"],["IC","dendE"]], key, spikes=True, 
                                                                         conductance=False, 
                                                                         current=False, 
                                                                         voltage=True)

if True:
    ns.plot_mean_spikes(networks["C"], "IC-soma", "c_soma_size.dat")
    ns.plot_mean_spikes(networks["AC"], "IC-soma", "ac_soma_size.dat")
    ns.show()  # Comment out to just save the results to file

# Plot the results
if False:
    count = 0
    for a in param:
        for d in stims:
            count += 1
            key = [a,d]
            ns.subplot(len(param),len(stims),count)
            ns.plot_voltage(networks["C"], "IC-soma", key)
    progress.update(count, len(stims))
    ns.show()