コード例 #1
0
        nbNeurons1, meanRates1, meanRatesStd1, s = simulate_selection_vs_neurons(
            sel_interval_1, hz=20, load=True)
        s = s + ' %s %5s %3s \n' % ('Sel thr:', str(SELECTION_THR), 'Hz')
        s = s + ' \n%s %5s %3s \n' % ('Sel interval 1:', str(sel_interval_1),
                                      'pA')
        info_string = info_string + s
        misc.pickle_save([nbNeurons1, meanRates1, meanRatesStd1, info_string],
                         save_result_at)
    else:
        print 'hej'
        #nbNeurons1, meanRates1, meanRatesStd1, info_string = misc.pickle_load(save_result_at)

    # DISPLAY
    plot_settings.set_mode(pylab,
                           mode='by_fontsize',
                           w=1100.0,
                           h=450.0,
                           fontsize=12)
    font_size_text = 8
    fig = pylab.figure(facecolor='w')

    ax_list = []
    ax_list.append(MyAxes(fig, [.075, .37, .135, .26]))  # text box
    ax_list.append(MyAxes(fig, [.26, .6, .165, .34]))  #
    ax_list.append(MyAxes(fig, [.53, .6, .165, .34]))  #
    ax_list.append(MyAxes(fig, [.26, .1, .165 * 2.312, .34]))  #
    ax_list.append(MyAxes(fig, [.8, .6, .165, .34]))  #
    #ax_list.append( MyAxes(fig, [ .53,  .1,  .165, .34 ] ) )    #
    ax_list.append(MyAxes(fig, [.8, .1, .165, .34]))  #

    # Text
コード例 #2
0
frequenciesAll, steadyStateFacilitationAll = simulate_steady_state_freq(numpy.arange(1.,100.,1.))

# Max conductance all frequencies
if LOAD:
    sname_nb=0
    frequenciesAll, maxFacilitationAll = simulate_steady_state_freq(numpy.arange(1.,100.,1.), 
                                                                    flag='max')

# Recovery spike
revoceryTimes, relativeRecovery = simulate_recovery(numpy.arange(100,5000,200))

# Steady state conductance 0-1 frequencies
frequenciesZoom, relativeFacilitationZoom = simulate_steady_state_freq(numpy.arange(0.1,1.,.1))

# DISPLAY
plot_settings.set_mode(mode='by_fontsize', w = 750.0, h = 400.0, fontsize=12)
font_size_text = 9
fig = pylab.figure( facecolor = 'w' )

ax_list = []
ax_list.append( MyAxes(fig, [ .1, .4, .18,  .26 ] ) )    # text box
ax_list.append( MyAxes(fig, [ .35, .6, .24, .34 ] ) )    # 
ax_list.append( MyAxes(fig, [ .73, .6, .24, .34 ] ) )    # 
ax_list.append( MyAxes(fig, [ .35, .1, .24, .34 ] ) )    # 
ax_list.append( MyAxes(fig, [ .73, .1, .24, .34 ] ) )    # 

# Text
ax=ax_list[0]
plot_text(ax)

# Example steady state all
コード例 #3
0
    return xopt  



sim_time=20000
  

save_at=OUTPUT_PATH+'/simulate_network_fmin.plk' 
x=fmin(0,save_at)
#x=[215, 0.08]

STN_target1, e1=restriction_1(gpe_rate, n_ctx, n_gpe, x, neuron_model, syn_models)
STN_target2, e2=restriction_2(gpe_rate, n_ctx, n_gpe, x, neuron_model, syn_models)
STN_target3 = GPE_46_hz(gpe_rate, n_ctx, n_gpe, x, neuron_model, syn_models)

plot_settings.set_mode(pylab, mode='by_fontsize', w = 500.0, h = 500.0, fontsize=8)
font_size_text = 8
fig = pylab.figure( facecolor = 'w')

ax_list=[]
ax_list.append( MyAxes(fig, [ .1, .7, .8, .2 ] ) )    # text box
ax_list.append( MyAxes(fig, [ .1, .4, .8, .2 ] ) )    # 
ax_list.append( MyAxes(fig, [ .1, .1, .8, .2 ] ) )    # 
 
ax=ax_list[0]
plot_example(ax, STN_target1,sim_time, x, type='No GPE')  

ax=ax_list[1]
plot_example(ax, STN_target2, sim_time, x, type='Normal')  

ax=ax_list[2]
コード例 #4
0
# input
sgs = my_nest.Create('spike_generator',
                     params={'spike_times': [float(sp) for sp in spike_times]})

syn_model = 'MSN_MSN_gaba_s'
my_nest.Connect(sgs, [MSN[0]], model=syn_model)  # connect MSNs
T = 2000  # simulation time
my_nest.Simulate(T)  # simulate

MSN.get_signal('v', 'V_m')

pylab.close('all')  # display
# Create figure where figsize(width,height) and figure dimenstions window
# width = figsize(width) x dpi and window hight = figsize(hight) x dpi
plot_settings.set_mode(mode='dynamic', w=700.0, h=400.0)
font_size_text = 10
fig = pylab.figure(facecolor='w')
pylab.suptitle('MSN to MSN')

ax_list = []
ax_list.append(MyAxes(fig, [.1, .37, .2, .26]))  # text box
ax_list.append(MyAxes(fig, [.50, .15, .40, .65]))  # voltage trace

ds = my_nest.GetDefaults(syn_model)
sn = my_nest.GetStatus(MSN[:])[0]

ax = ax_list[0]  # Text box
tb = ''
tb = tb + ' %6s %7s %3s \n' % ('Synapse model:', ds['synapsemodel'], ' ')
tb = tb + ' \n '
コード例 #5
0
n_gpe = 32
stn_rate = 10.0
n_exp = 4.
SNR_target1, mr1, std1, e1 = restriction_1(msn_rate, gpe_rate, stn_rate, n_msn,
                                           n_gpe, x, neuron_model, syn_models,
                                           n_exp)
SNR_target2, mr2, std2, e2 = restriction_2(msn_rate, gpe_rate, stn_rate, n_msn,
                                           n_gpe, x, neuron_model, syn_models,
                                           n_exp)
SNR_target3, mr3, std3, e3 = restriction_3(msn_rate, gpe_rate, stn_rate, n_msn,
                                           n_gpe, x, neuron_model, syn_models,
                                           n_exp)

plot_settings.set_mode(pylab,
                       mode='by_fontsize',
                       w=1000.0,
                       h=1000.0,
                       fontsize=16)
font_size_text = 8
fig = pylab.figure(facecolor='w')

ax_list = []
ax_list.append(MyAxes(fig, [.1, .7, .8, .2]))  # text box
ax_list.append(MyAxes(fig, [.1, .4, .8, .2]))  #
ax_list.append(MyAxes(fig, [.1, .1, .8, .2]))  #

ax = ax_list[0]
plot_example(ax, SNR_target1, sim_time, x, [mr1, std1], type='No GABA')

ax = ax_list[1]
plot_example(ax, SNR_target2, sim_time, x, [mr2, std2], type='No STN')