示例#1
0
def main(rand_nodes=False, 
         script_name= __file__.split('/')[-1][0:-3], 
         from_disk=0):   
      
    k=get_kwargs_builder()
    
    dinfo, dn = get_setup(**{'rand_nodes':rand_nodes})

    dn=modify(dn)
    ds = get_storages(script_name, dn.keys(), dinfo)

    dstim={}
    dstim ['IV']=map(float, range(-300,300,100)) #curr
    dstim ['IF']=map(float, range(0,500,100)) #curr
    dstim ['FF']=map(float, range(0,1500,100)) #rate
  
    d={}
    d.update(run_XX('IV', dn, [from_disk]*4, ds, dstim))
    d.update(run_XX('IF', dn, [from_disk]*4, ds, dstim))
    d.update(run_XX('FF', dn, [from_disk]*4, ds, dstim))   
    d.update(optimize('opt_rate', dn, [from_disk]*1, ds, **{ 'x0':200.0}))   
    set_optimization_val(d['opt_rate']['Net_0'], dn['hist']) 
    d.update(run('hist', dn, [from_disk]*2, ds, 'mean_rates', 
                 **{'t_start':k['start_rec']}))                 

    
    
    
    fig, axs=pl.get_figure(n_rows=2, n_cols=2, w=1000.0, h=800.0, fontsize=16) 

    show(dstim, d, axs, NAMES)
    ds['fig'].save_fig(fig)
    
    if not os.environ.get('DISPLAY'): pylab.show()   
def main(rand_nodes=False,
         script_name=__file__.split('/')[-1][0:-3],
         from_disk=1):

    k = get_kwargs_builder()
    dinfo, dn = get_setup(**{'rand_nodes': rand_nodes})

    #     dinfo, dn = get_setup()
    ds = get_storages(script_name, dn.keys(), dinfo)

    d = {}
    d.update(optimize('opt_rate', dn, [from_disk] * 5, ds, **{'x0': 200.0}))

    for key in sorted(dn['hist'].keys()):
        net = dn['hist'][key]
        set_optimization_val(d['opt_rate'][net.get_name()], [net])
    d.update(
        run('hist', dn, [from_disk] * 5, ds, 'mean_rates',
            **{'t_start': k['start_rec']}))

    fig, axs = pl.get_figure(n_rows=1,
                             n_cols=1,
                             w=1000.0,
                             h=800.0,
                             fontsize=16)

    show_opt_hist(d, axs, '$GPe_{+d}^{TA}$')
    ds['fig'].save_fig(fig)

    if DISPLAY: pylab.show()