示例#1
0
def get():

    l = []
    solution, s_mul, s_equal = get_solution()

    d0 = 0.8
    f_beta_rm = lambda f: (1 - f) / (d0 + f * (1 - d0))

    y = 2.5

    v = numpy.arange(0.1, 1.2, 0.1)
    for x in v:
        d = {}
        for keys in s_mul:
            update(solution, d, keys)
        l += [pl(d, '*', **{'name': ''})]

        d = {}
        for keys in s_equal:
            update(solution, d, keys)
        misc.dict_update(d, {'nest': {'ST': {'beta_I_AMPA_1': f_beta_rm(y)}}})
        misc.dict_update(d, {'nest': {'ST': {'beta_I_NMDA_1': f_beta_rm(y)}}})

        misc.dict_update(d, {'nest': {'GA_M1_gaba': {'weight': x}}})
        misc.dict_update(d, {'nest': {'GA_M2_gaba': {'weight': x}}})
        misc.dict_update(d, {'nest': {'GA_FS_gaba': {'weight': x}}})

        d['node']['EA']['rate'] *= 0.7
        l[-1] += pl(d, '=', **{'name': ('mod_GA_striatum_1' + str(x))})

    return l
示例#2
0
def get():

    l = []
    solution, s_mul, s_equal = get_solution_slow_GP_striatum()

    d0 = 0.8
    f_beta_rm = lambda f: (1 - f) / (d0 + f * (1 - d0))

    v = STN_ampa_gaba_input_magnitude()

    for _, x, y in v:
        #     x=2.5-1
        d = {}
        for keys in s_mul:
            update(solution, d, keys)
        l += [pl(d, '*', **{'name': ''})]

        d = {}
        for keys in s_equal:
            update(solution, d, keys)

        #     misc.dict_update(d,{'nest':{'ST':{'beta_I_AMPA_1': f_beta_rm(x)}}})
        #     misc.dict_update(d,{'nest':{'ST':{'beta_I_NMDA_1': f_beta_rm(x)}}})
        #     d['node']['EA']['rate']*=0.7

        misc.dict_update(d, {'node': {'CS': {'rate': x}}})
        misc.dict_update(d, {'nest': {'GI_ST_gaba': {'weight': y}}})

        l[-1] += pl(d, '=', **{'name': 'mod_ST_inp_' + str(x) + '_' + str(y)})

    return l
def get():
    
    
    l=[]
    solution, s_mul, s_equal=get_solution_slow_GP_striatum()
    
    d0=0.8
    f_beta_rm=lambda f: (1-f)/(d0+f*(1-d0))
    
    v=STN_ampa_gaba_input_magnitude()
    
    for _, x, y in v:
#     x=2.5-1
        d={}
        for keys in s_mul: update(solution, d, keys)  
        l+=[pl(d, '*', **{'name':''})]
          
        d={}
        for keys in s_equal: update(solution, d, keys) 
        
    #     misc.dict_update(d,{'nest':{'ST':{'beta_I_AMPA_1': f_beta_rm(x)}}})
    #     misc.dict_update(d,{'nest':{'ST':{'beta_I_NMDA_1': f_beta_rm(x)}}})
    #     d['node']['EA']['rate']*=0.7
        
        misc.dict_update(d,{'node':{'CS':{'rate': x}}})
        misc.dict_update(d,{'nest':{'GI_ST_gaba':{'weight':y }}})
        
        l[-1]+=pl(d, '=', **{'name':'mod_ST_inp_'+str(x)+'_'+str(y)})    
    
    return l
def get():

    l = []
    solution, s_mul, s_equal = get_solution_slow_GP_striatum_2()

    for y in numpy.arange(1.0, -0.1, -0.25):
        for z in numpy.arange(1.0, -0.1, -0.25):
            x = 2.5
            d = {}
            for keys in s_mul:
                update(solution, d, keys)

            misc.dict_update(d, {'nest': {'GI_GA_gaba': {'weight': y}}})
            misc.dict_update(d, {'nest': {'ST_GA_ampa': {'weight': z}}})

            l += [pl(d, '*', **{'name': ''})]

            d = {}
            for keys in s_equal:
                update(solution, d, keys)

            l[-1] += pl(d, '=',
                        **{'name': 'GIGA_' + str(y) + '_STGA_' + str(z)})

    return l
示例#5
0
def get():

    l = []
    solution, s_mul, s_equal = get_solution_slow_GP_striatum()

    d0 = 0.8
    f_beta_rm = lambda f: (1 - f) / (d0 + f * (1 - d0))

    x = 2.5
    d = {}
    for keys in s_mul:
        update(solution, d, keys)
    l += [pl(d, '*', **{'name': ''})]

    d = {}
    for keys in s_equal:
        update(solution, d, keys)

    misc.dict_update(d, {'nest': {'ST': {'beta_I_AMPA_1': f_beta_rm(x)}}})
    misc.dict_update(d, {'nest': {'ST': {'beta_I_NMDA_1': f_beta_rm(x)}}})
    d['node']['EA']['rate'] *= 0.7

    l[-1] += pl(d, '=', **{'name': 'mod_ST_beta_' + str(x)})

    return l
def get():
    
    
    l=[]
    solution, s_mul, s_equal=get_solution_slow_GP_striatum()
    
    d0=0.8
    f_beta_rm=lambda f: (1-f)/(d0+f*(1-d0))
    
    
    x=2.5
    d={}
    for keys in s_mul: update(solution, d, keys)  
    l+=[pl(d, '*', **{'name':''})]
      
    d={}
    for keys in s_equal: update(solution, d, keys) 
    
    misc.dict_update(d,{'nest':{'ST':{'beta_I_AMPA_1': f_beta_rm(x)}}})
    misc.dict_update(d,{'nest':{'ST':{'beta_I_NMDA_1': f_beta_rm(x)}}})
    d['node']['EA']['rate']*=0.7
    
    l[-1]+=pl(d, '=', **{'name':'mod_ST_beta_'+str(x)})    
            
    
    return l
def get():
     
     
    l=[]
    solution, s_mul, s_equal=get_solution()
     
    d0=0.8
    f_beta_rm=lambda f: (1-f)/(d0+f*(1-d0))
     
    y=2.5
    
        
    v=numpy.arange(0.1,1.2,0.1)
    for x in v:      
        d={}
        for keys in s_mul: update(solution, d, keys)  
        l+=[pl(d, '*', **{'name':''})]
             
        d={}
        for keys in s_equal: update(solution, d, keys)  
        misc.dict_update(d,{'nest':{'ST':{'beta_I_AMPA_1': f_beta_rm(y)}}})
        misc.dict_update(d,{'nest':{'ST':{'beta_I_NMDA_1': f_beta_rm(y)}}})
                
        misc.dict_update(d,{'nest':{'GA_M1_gaba':{'weight': x}}})
        misc.dict_update(d,{'nest':{'GA_M2_gaba':{'weight': x}}})
        misc.dict_update(d,{'nest':{'GA_FS_gaba':{'weight': x}}})
        
        d['node']['EA']['rate']*=0.7
        l[-1]+=pl(d, '=', **{'name':('mod_GA_striatum_1' + str(x))
                         })   
     
    return l
def get():

    l = []
    solution, s_mul, s_equal = get_solution()

    d0 = 0.8
    f_beta_rm = lambda f: (1 - f) / (d0 + f * (1 - d0))

    # betas MS-MS
    v = numpy.arange(1.5, 3, 0.25)
    for x in v:

        d = {}
        for keys in s_mul:
            update(solution, d, keys)
        l += [pl(d, '*', **{'name': ''})]

        d = {}
        for keys in s_equal:
            update(solution, d, keys)

        misc.dict_update(d, {'nest': {'ST': {'beta_I_AMPA_1': f_beta_rm(x)}}})
        misc.dict_update(d, {'nest': {'ST': {'beta_I_NMDA_1': f_beta_rm(x)}}})

        l[-1] += pl(d, '=', **{'name': 'mod_ST_beta_' + str(x)})

    v1 = numpy.arange(0.1, 1, 0.2)
    for x in v1:

        d = {}
        for keys in s_mul:
            update(solution, d, keys)

        l += [pl(d, '*', **{'name': ''})]

        d = {}
        for keys in s_equal:
            update(solution, d, keys)

        d['node']['EA']['rate'] *= x
        l[-1] += pl(d, '=', **{'name': 'mod_EA_' + str(x)})

    v2 = numpy.arange(1.1, 2, 0.2)
    for x in v2:

        d = {}
        for keys in s_mul:
            update(solution, d, keys)

        l += [pl(d, '*', **{'name': ''})]

        d = {}
        for keys in s_equal:
            update(solution, d, keys)

        d['node']['EI']['rate'] *= x
        l[-1] += pl(d, '=', **{'name': 'mod_EI_' + str(x)})

    return l
def get():
    

    
    l=[]
    solution, s_mul, s_equal=get_solution()
    
    d0=0.8
    f_beta_rm=lambda f: (1-f)/(d0+f*(1-d0))
    
    
    # betas MS-MS
    v=numpy.arange(1.5,3,0.25)
    for x in v:
        
        d={}
        for keys in s_mul: update(solution, d, keys)  
        l+=[pl(d, '*', **{'name':''})]
          
        d={}
        for keys in s_equal: update(solution, d, keys) 
        
        misc.dict_update(d,{'nest':{'ST':{'beta_I_AMPA_1': f_beta_rm(x)}}})
        misc.dict_update(d,{'nest':{'ST':{'beta_I_NMDA_1': f_beta_rm(x)}}})

        l[-1]+=pl(d, '=', **{'name':'mod_ST_beta_'+str(x)})    
            
    v1=numpy.arange(0.1, 1, 0.2)
    for x in v1:
        
        
        d={}
        for keys in s_mul: update(solution, d, keys) 

        l+=[pl(d, '*', **{'name':''})]
          
        d={}
        for keys in s_equal: update(solution, d, keys)
        
        d['node']['EA']['rate']*=x
        l[-1]+=pl(d, '=', **{'name':'mod_EA_'+str(x)})   
    
    v2=numpy.arange(1.1, 2, 0.2)
    for x in v2:
        
        
        d={}
        for keys in s_mul: update(solution, d, keys) 

        l+=[pl(d, '*', **{'name':''})]
          
        d={}
        for keys in s_equal: update(solution, d, keys)
        
        d['node']['EI']['rate']*=x
        l[-1]+=pl(d, '=', **{'name':'mod_EI_'+str(x)})  
    
    return l
示例#10
0
def merge(*args):
    solution={}
#     s_mul=[]
#     s_equal=[]
    for f in args:
        s=f()
        misc.dict_update(solution,s) 
    
    return solution
def get():

    l = []
    solution, s_mul, s_equal = get_solution()

    d0 = 0.8
    f_beta_rm = lambda f: (1 - f) / (d0 + f * (1 - d0))

    #     v=STN_ampa_gaba_input_magnitude()[0:5]

    for _, u, w in v:

        v0 = numpy.arange(1.25, 3.75, 1.)
        v1 = numpy.arange(1.5, 4, 1.)
        v = [[x, y] for x in v0 for y in v1]
        for x, y in v:

            d = {}
            for keys in s_mul:
                update(solution, d, keys)
            l += [pl(d, '*', **{'name': ''})]

            d = {}
            for keys in s_equal:
                update(solution, d, keys)

            misc.dict_update(
                d, {'nest': {
                    'ST': {
                        'beta_I_GABAA_1': f_beta_rm(x)
                    }
                }})
            misc.dict_update(d,
                             {'nest': {
                                 'ST': {
                                     'beta_I_AMPA_1': f_beta_rm(y)
                                 }
                             }})
            misc.dict_update(d,
                             {'nest': {
                                 'ST': {
                                     'beta_I_NMDA_1': f_beta_rm(y)
                                 }
                             }})
            misc.dict_update(d, {'node': {'CS': {'rate': u}}})
            misc.dict_update(d, {'nest': {'GI_ST_gaba': {'weight': w}}})
            d['node']['EA']['rate'] *= 0.7
            l[-1] += pl(
                d, '=', **{
                    'name': ('mod_ST_beta_' + str(u) + '_' + str(w) + '_' +
                             str(x) + '_' + str(y))
                })

    return l
def get():
    
    
    l=[]
    solution, s_mul, s_equal=get_solution()
    
    d0=0.8
    f_beta_rm=lambda f: (1-f)/(d0+f*(1-d0))
    
    
    x=2.5-1.25
    d={}
    for keys in s_mul: update(solution, d, keys)  
    l+=[pl(d, '*', **{'name':''})]
      
    d={}
    for keys in s_equal: update(solution, d, keys) 
    
    misc.dict_update(d,{'nest':{'ST':{'beta_I_AMPA_1': f_beta_rm(x)}}})
    misc.dict_update(d,{'nest':{'ST':{'beta_I_NMDA_1': f_beta_rm(x)}}})
    d['node']['EA']['rate']*=0.7
    
    misc.dict_update(d,{'node':{'CS':{'rate': 830.}}})
    misc.dict_update(d,{'nest':{'GI_ST_gaba':{'weight':0.35 }}})
    
    l[-1]+=pl(d, '=', **{'name':'mod_ST_beta_'+str(x)})    
            
    
    
    
    
    return l
def get():

    l = []
    solution, s_mul, s_equal = get_solution()

    d0 = 0.8
    f_beta_rm = lambda f: (1 - f) / (d0 + f * (1 - d0))

    x = 2.5 - 1.25
    d = {}
    for keys in s_mul:
        update(solution, d, keys)
    l += [pl(d, '*', **{'name': ''})]

    d = {}
    for keys in s_equal:
        update(solution, d, keys)

    misc.dict_update(d, {'nest': {'ST': {'beta_I_AMPA_1': f_beta_rm(x)}}})
    misc.dict_update(d, {'nest': {'ST': {'beta_I_NMDA_1': f_beta_rm(x)}}})
    d['node']['EA']['rate'] *= 0.7

    misc.dict_update(d, {'node': {'CS': {'rate': 830.}}})
    misc.dict_update(d, {'nest': {'GI_ST_gaba': {'weight': 0.35}}})

    l[-1] += pl(d, '=', **{'name': 'mod_ST_beta_' + str(x)})

    return l
def get():
    
    
    l=[]
    solution, s_mul, s_equal=get_solution_slow_GP_striatum()
    
    d0=0.8
    f_beta_rm=lambda f: (1-f)/(d0+f*(1-d0))
    
    x=2.5
    d={}
    for y in [12]+ list(numpy.arange(5,55,5)):
#         x=3.4
#         y=2.25
            
        for keys in s_mul: update(solution, d, keys)  
        l+=[pl(d, '*', **{'name':''})]
          
        d={}
        for keys in s_equal: update(solution, d, keys) 
        
        ratio=12./y
        
        dd={'nest':{'GA_M1_gaba':{'weight':0.8*ratio}, 
                   'GA_M2_gaba':{'weight':0.8*ratio}}}
        misc.dict_update(d,dd)            
         
        # Decreasing from 2 leads to ...
        # Increasing from 2 leads to ... 
        dd={'nest':{'GA_FS_gaba':{'weight':2.*ratio}}}
        misc.dict_update(d,dd)           
        
        # Just assumed to be 12 ms    
        dd={'nest':{'M1_low':{'GABAA_3_Tau_decay':12./ratio},  
                   'M2_low':{'GABAA_3_Tau_decay':12./ratio},
                   'FS_low':{'GABAA_2_Tau_decay':12./ratio},     
                   }}
        misc.dict_update(d,dd)  
        
        misc.dict_update(d,{'nest':{'ST':{'beta_I_AMPA_1': f_beta_rm(x)}}})
        misc.dict_update(d,{'nest':{'ST':{'beta_I_NMDA_1': f_beta_rm(x)}}})
        d['node']['EA']['rate']*=0.7
        
        l[-1]+=pl(d, '=', **{'name':'mod_GAtau_'+str(y)})    

    
    return l
def get():

    l = []
    solution = get_solution()

    d = {}
    misc.dict_update(d, solution['mul'])
    l += [pl(d, '*', **{'name': ''})]

    d = {}
    misc.dict_update(d, solution['equal'])
    l[-1] += pl(d, '=', **{'name': 'control_sim'})

    r_EI = [1000, 1600]  #range(1000, 1200, 50)+range(1550, 1900, 50)
    r_EA = range(100, 1500, 100)
    r_CS = [180, 250]
    w_STGA = numpy.linspace(1, 0.0, 15)

    agg = [[r0, r1, r2, w] for r0, r2 in zip(r_EI, r_CS) for r1 in r_EA
           for w in w_STGA]

    for rEI, rEA, rCS, w in agg:
        rEI = float(rEI)
        rEA = float(rEA)
        rCS = float(rCS)
        w = float(w)

        d = {}
        misc.dict_update(d, solution['mul'])
        d['nest']['ST_GA_ampa']['weight'] *= w
        l += [pl(d, '*', **{'name': ''})]

        d = {}
        misc.dict_update(d, solution['equal'])
        d['node']['EI']['rate'] = rEI
        d['node']['EA']['rate'] = rEA

        misc.dict_update(d, {'node': {'CS': {'rate': rCS}}})

        s = 'rEI_{0}_rEA_{1}_rCS_{2}_STGAw_{3}'.format(rEI, rEA, rCS,
                                                       round(w, 2))

        l[-1] += pl(d, '=', **{'name': s})

    return l
def get():
    
    
    l=[]
    solution, s_mul, s_equal=get_solution()
    
    d0=0.8
    f_beta_rm=lambda f: (1-f)/(d0+f*(1-d0))
    

    v0=numpy.arange(1.25,3.75,0.5)
    v1=numpy.arange(2.5, 5.,0.5)
    v=[[x,y] for x in v0 for y in v1]
    for x, y in v:
         
        d={}
        for keys in s_mul: update(solution, d, keys)  
        l+=[pl(d, '*', **{'name':''})]
           
        d={}
        for keys in s_equal: update(solution, d, keys) 
 
        misc.dict_update(d,{'nest':{'ST':{'beta_I_GABAA_1': f_beta_rm(x)}}})        
        misc.dict_update(d,{'nest':{'ST':{'beta_I_AMPA_1': f_beta_rm(y)}}})
        misc.dict_update(d,{'nest':{'ST':{'beta_I_NMDA_1': f_beta_rm(y)}}})
         
        d['node']['EA']['rate']*=0.7
        l[-1]+=pl(d, '=', **{'name':('mod_ST_beta_'
                                     +str(x)+'_'+str(y))
                             })    

    
    return l
def get():

    l = []
    solution = get_solution()

    d = {}
    misc.dict_update(d, solution['mul'])
    l += [pl(d, '*', **{'name': ''})]

    d = {}
    misc.dict_update(d, solution['equal'])
    dd = {
        'conn': {
            'GAp_GA_gaba': {
                'fan_in': 5
            },
            'GIp_GA_gaba': {
                'fan_in': 25
            }
        },
        'nest': {
            'ST_GA_ampa': {
                'weight': 0.259
            }
        }
    }  #estimate from beta opt
    misc.dict_update(d, dd)
    l[-1] += pl(d, '=', **{'name': 'control_sim'})

    return l
示例#18
0
def get_solution_slow():
    
    solution={'mul':{},
              'equal':{}}
    # Decreasing from 0.8 leads to ...
    # Increasing from 0.8 leads to ... 
    d={'nest':{'GA_M1_gaba':{'weight':0.8/5}, 
               'GA_M2_gaba':{'weight':0.8/5}}}
    misc.dict_update(solution,{'equal':d})            
     
    # Decreasing from 2 leads to ...
    # Increasing from 2 leads to ... 
    d={'nest':{'GA_FS_gaba':{'weight':2./5}}}
    misc.dict_update(solution,{'equal':d})           
    
    # Just assumed to be 12 ms    
    d={'nest':{'M1_low':{'GABAA_3_Tau_decay':12.*5},  
               'M2_low':{'GABAA_3_Tau_decay':12.*5},
               'FS_low':{'GABAA_2_Tau_decay':12.*5},     
               }}
    
    misc.dict_update(solution,{'equal':d})           
        

    return solution
def get():
    
    
    l=[]
    solution, s_mul, s_equal=get_solution()
    
    d0=0.8
    f_beta_rm=lambda f: (1-f)/(d0+f*(1-d0))
    
    
    
    for nodes in [['M1', 'M2'],
                  ['M1', 'M2', 'FS'],
                  ['M1', 'M2', 'FS','ST', 'GA', 'GI','SN']]:
        x=2.5
        d={}
        for keys in s_mul: update(solution, d, keys)  
        l+=[pl(d, '*', **{'name':''})]
          
        d={}
        for keys in s_equal: update(solution, d, keys) 
        
        misc.dict_update(d,{'nest':{'ST':{'beta_I_AMPA_1': f_beta_rm(x)}}})
        misc.dict_update(d,{'nest':{'ST':{'beta_I_NMDA_1': f_beta_rm(x)}}})
        d['node']['EA']['rate']*=0.7
        
        for node in nodes:
            misc.dict_update(d,{'node':{node:{'edge_wrap':False}}})
            
        
        l[-1]+=pl(d, '=', **{'name':'mod_ST_beta_'+str(x)})    
            
    
    return l
def get():
    
    
    l=[]
    solution, s_mul, s_equal=get_solution()
    
    d0=0.8
    f_beta_rm=lambda f: (1-f)/(d0+f*(1-d0))
    
    
#     v=STN_ampa_gaba_input_magnitude()[0:5]
    
    for _, u, w in v:

        v0=numpy.arange(1.25, 3.75, 1.)
        v1=numpy.arange(1.5, 4, 1.)
        v=[[x,y] for x in v0 for y in v1]
        for x, y in v:
            
            d={}
            for keys in s_mul: update(solution, d, keys)  
            l+=[pl(d, '*', **{'name':''})]
              
            d={}
            for keys in s_equal: update(solution, d, keys) 
    
            misc.dict_update(d,{'nest':{'ST':{'beta_I_GABAA_1': f_beta_rm(x)}}})        
            misc.dict_update(d,{'nest':{'ST':{'beta_I_AMPA_1': f_beta_rm(y)}}})
            misc.dict_update(d,{'nest':{'ST':{'beta_I_NMDA_1': f_beta_rm(y)}}})
            misc.dict_update(d,{'node':{'CS':{'rate': u}}})
            misc.dict_update(d,{'nest':{'GI_ST_gaba':{'weight':w }}})             
            d['node']['EA']['rate']*=0.7
            l[-1]+=pl(d, '=', **{'name':('mod_ST_beta_'
                                         +str(u)+'_'+str(w)+'_'
                                         +str(x)+'_'+str(y))
                                 })    

               
    
    return l
def get():

    l = []
    solution = get_solution()

    d = {}
    misc.dict_update(d, solution['mul'])
    l += [pl(d, '*', **{'name': ''})]

    d = {}
    misc.dict_update(d, solution['equal'])
    dd = {
        'conn': {
            'GAp_GA_gaba': {
                'fan_in': 5
            },
            'GIp_GA_gaba': {
                'fan_in': 25
            }
        }
    }
    misc.dict_update(d, dd)
    l[-1] += pl(d, '=', **{'name': 'control_sim'})

    return l
def get():

    l = []
    solution, s_mul, s_equal = get_solution()

    d0 = 0.8
    f_beta_rm = lambda f: (1 - f) / (d0 + f * (1 - d0))

    v0 = numpy.arange(1.25, 3.75, 0.5)
    v1 = numpy.arange(2.5, 5., 0.5)
    v = [[x, y] for x in v0 for y in v1]
    for x, y in v:

        d = {}
        for keys in s_mul:
            update(solution, d, keys)
        l += [pl(d, '*', **{'name': ''})]

        d = {}
        for keys in s_equal:
            update(solution, d, keys)

        misc.dict_update(d, {'nest': {'ST': {'beta_I_GABAA_1': f_beta_rm(x)}}})
        misc.dict_update(d, {'nest': {'ST': {'beta_I_AMPA_1': f_beta_rm(y)}}})
        misc.dict_update(d, {'nest': {'ST': {'beta_I_NMDA_1': f_beta_rm(y)}}})

        d['node']['EA']['rate'] *= 0.7
        l[-1] += pl(d, '=',
                    **{'name': ('mod_ST_beta_' + str(x) + '_' + str(y))})

    return l
示例#23
0
def get():

    l = []
    solution, s_mul, s_equal = get_solution()

    d0 = 0.8
    f_beta_rm = lambda f: (1 - f) / (d0 + f * (1 - d0))

    d = {}
    for x in numpy.arange(3.4, 6, 0.4):
        #         x=3.4
        y = 2.25

        for keys in s_mul:
            update(solution, d, keys)
        l += [pl(d, '*', **{'name': ''})]

        d = {}
        for keys in s_equal:
            update(solution, d, keys)
        print f_beta_rm(x)
        misc.dict_update(d, {'nest': {'ST': {'beta_I_AMPA_1': f_beta_rm(x)}}})
        misc.dict_update(d, {'nest': {'ST': {'beta_I_NMDA_1': f_beta_rm(x)}}})
        misc.dict_update(d, {'nest': {'ST': {'beta_I_GABAA_1': f_beta_rm(y)}}})

        #         d['node']['EA']['rate']*=0.7

        l[-1] += pl(
            d, '=',
            **{'name': 'mod_CS_STbeta_' + str(x) + '_GA_STbeta_' + str(y)})

    return l
示例#24
0
def get():

    l = []
    solution = get_solution()

    d = {}
    misc.dict_update(d, solution['mul'])
    l += [pl(d, '*', **{'name': ''})]

    d = {}
    misc.dict_update(d, solution['equal'])
    l[-1] += pl(d, '=', **{'name': 'control_sim'})

    r_EI = range(1000, 1200, 50) + range(1550, 1900, 50)
    r_EA = range(100, 800, 100)
    r_CS = range(180, 260, 10)

    agg = [[r0, r1, r2] for r0 in r_EI for r1 in r_EA for r2 in r_CS]

    for rEI, rEA, rCS in agg:
        rEI = float(rEI)
        rEA = float(rEA)
        rCS = float(rCS)

        d = {}
        misc.dict_update(d, solution['mul'])
        l += [pl(d, '*', **{'name': ''})]

        d = {}
        misc.dict_update(d, solution['equal'])
        d['node']['EI']['rate'] = rEI
        d['node']['EA']['rate'] = rEA

        misc.dict_update(d, {'node': {'CS': {'rate': rCS}}})

        s = 'rEI_{0}_rEA_{1}_rCS_{2}'.format(rEI, rEA, rCS)

        l[-1] += pl(d, '=', **{'name': s})

    return l
def get():
    
    
    l=[]
    solution, s_mul, s_equal=get_solution_slow_GP_striatum()
    
    d0=0.8
    f_beta_rm=lambda f: (1-f)/(d0+f*(1-d0))
    
   
    d={}
    for x in numpy.arange(3.4, 6, 0.4):
#         x=3.4
        y=2.25
            
        for keys in s_mul: update(solution, d, keys)  
        l+=[pl(d, '*', **{'name':''})]
          
        d={}
        for keys in s_equal: update(solution, d, keys) 
        
        misc.dict_update(d,{'nest':{'ST':{'beta_I_AMPA_1': f_beta_rm(x)}}})
        misc.dict_update(d,{'nest':{'ST':{'beta_I_NMDA_1': f_beta_rm(x)}}})
        misc.dict_update(d,{'nest':{'ST':{'beta_I_GABAA_1': f_beta_rm(y)}}})
        
        d['node']['EA']['rate']*=0.7    
        
        l[-1]+=pl(d, '=', **{'name':'mod_CS_STbeta_'+str(x)+'_GA_STbeta_'+str(y)})    

    
    return l
def get():

    l = []
    solution = get_solution()

    for r in numpy.arange(0, 1200, 200):
        r = numpy.float(r)
        d = {}
        misc.dict_update(d, solution['mul'])
        l += [pl(d, '*', **{'name': ''})]

        d = {}
        misc.dict_update(d, solution['equal'])
        dd = {
            'conn': {
                'GAp_GA_gaba': {
                    'fan_in': 5
                },
                'GIp_GA_gaba': {
                    'fan_in': 25
                }
            },
            'node': {
                'EAp': {
                    'rate': r
                }
            }
        }
        misc.dict_update(d, dd)
        l[-1] += pl(d, '=', **{'name': 'GAr_{0}'.format(r)})

    return l
def get():

    l = []
    solution, s_mul, s_equal = get_solution()

    d0 = 0.8
    f_beta_rm = lambda f: (1 - f) / (d0 + f * (1 - d0))

    # betas MS-MS
    v = [0.1, 0.25, 0.5, 0.75]
    for x, y in [[v1, v2] for v1 in v for v2 in v]:

        d = {}
        for keys in s_mul:
            update(solution, d, keys)
        l += [pl(d, '*', **{'name': ''})]

        d = {}
        for keys in s_equal:
            update(solution, d, keys)

        misc.dict_update(d,
                         {'nest': {
                             'ST': {
                                 'beta_I_AMPA_1': f_beta_rm(2.5)
                             }
                         }})
        misc.dict_update(d,
                         {'nest': {
                             'ST': {
                                 'beta_I_NMDA_1': f_beta_rm(2.5)
                             }
                         }})
        d['node']['EA']['rate'] *= 0.7

        misc.dict_update(d, {'nest': {'MS': {'beta_I_GABAA_2': f_beta_rm(x)}}})
        for conn in ['M1_M1_gaba', 'M1_M2_gaba', 'M2_M1_gaba', 'M2_M2_gaba']:
            misc.dict_update(d,
                             {'conn': {
                                 conn: {
                                     'beta_fan_in': f_beta_rm(y)
                                 }
                             }})

        l[-1] += pl(d, '=', **{'name': 'mod_MSg_' + str(x) + '_MSc_' + str(y)})

    #beta CTX-STN

    return l
示例#28
0
def get():

    l = []
    solution = get_solution()
    '''
    From
    script_0000_rEI_1600.0_rEA_0.0_rCS_250.0_wGA_1.0-amp_0.08_1.0_stn_3.0_0
    in new_beginning beta slow (1.77)
    '''
    #     misc.dict_update(solution, {'equal':{'node':{'M2p':{'rate':2.9}}}})

    l = []
    solution = get_solution()

    d = {}
    misc.dict_update(d, solution['mul'])
    l += [pl(d, '*', **{'name': ''})]

    d = {}
    misc.dict_update(d, solution['equal'])
    l[-1] += pl(d, '=', **{'name': 'control_sim'})

    return l
示例#29
0
def get_dopMSGI_rates_beta():

    d0=0.8
    f_beta_rm=lambda f: (1-f)/(d0+f*(1-d0))

    factor_CSEI_rate=1.25
#     factor_CF_rate=1.

    solution={'mul':{},
              'equal':{}}
    
    d={'mul':{'node':{'CS':{'rate': factor_CSEI_rate}}}}
    misc.dict_update(solution,d)
    
#     d={'equal':{'node':{'EI':{'rate': 1400.*factor_CSEI_rate}}}}
#     misc.dict_update(solution,d)
    
#     d={'mul':{'node':{'CF':{'rate': factor_CF_rate}}}} 
#     misc.dict_update(solution,d) 

    d={'conn': {'GA_GA_gaba':{'fan_in0': 20}, 
                 'GI_GA_gaba':{'fan_in0': 10 }}}

    misc.dict_update(solution,{'equal':d})
    
    d={'equal':{'node':{'EI':{'rate':1400*factor_CSEI_rate}}}}
    misc.dict_update(solution,d)    


    d={'equal':{'node':{'EA':{'rate': 0.0}}}} 
    misc.dict_update(solution,d) 

    d={'equal':{'nest':{'GI':{'beta_I_GABAA_1': f_beta_rm(2)}}}}
    misc.dict_update(solution,d)
    
    return solution
def get():

    l = []
    solution = get_solution_slow_GP_striatum_2()
    d0 = 0.8
    f_beta_rm = lambda f: (1 - f) / (d0 + f * (1 - d0))

    for y in numpy.arange(1., 3., 1.):
        d = {}
        misc.dict_update(d, solution['mul'])
        l += [pl(d, '*', **{'name': ''})]

        d = {}
        misc.dict_update(d, solution['equal'])

        misc.dict_update(d, {'nest': {'GI': {'beta_I_GABAA_1': f_beta_rm(y)}}})

        l[-1] += pl(d, '=', **{'name': 'mod_GI_beta_' + str(y)})

    return l
示例#31
0
def get():

    l = []
    solution, s_mul, s_equal = get_solution()

    d0 = 0.8
    f_beta_rm = lambda f: (1 - f) / (d0 + f * (1 - d0))

    y = 2.5

    v = [1. / 10., 3. / 10, 5. / 10, 7. / 10, 9. / 10]

    for x in v:
        d = {}
        for keys in s_mul:
            update(solution, d, keys)

        misc.dict_update(d, {'conn': {'GA_M1_gaba': {'fan_in0': x}}})
        misc.dict_update(d, {'conn': {'GA_M2_gaba': {'fan_in0': x}}})

        misc.dict_update(d, {'nest': {'GA_M1_gaba': {'weight': 1. / x}}})
        misc.dict_update(d, {'nest': {'GA_M2_gaba': {'weight': 1. / x}}})

        l += [pl(d, '*', **{'name': ('mod_GA_MS_' + str(x))})]

        d = {}
        for keys in s_equal:
            update(solution, d, keys)
        misc.dict_update(d, {'nest': {'ST': {'beta_I_AMPA_1': f_beta_rm(y)}}})
        misc.dict_update(d, {'nest': {'ST': {'beta_I_NMDA_1': f_beta_rm(y)}}})

        d['node']['EA']['rate'] *= 0.7
        l[-1] += pl(d, '=', **{'name': ''})

    for x in v:
        d = {}
        for keys in s_mul:
            update(solution, d, keys)

        misc.dict_update(d, {'conn': {'GA_FS_gaba': {'fan_in0': x}}})

        misc.dict_update(d, {'nest': {'GA_FS_gaba': {'weight': 1. / x}}})

        l += [pl(d, '*', **{'name': ('mod_GA_FS_' + str(x))})]

        d = {}
        for keys in s_equal:
            update(solution, d, keys)
        misc.dict_update(d, {'nest': {'ST': {'beta_I_AMPA_1': f_beta_rm(y)}}})
        misc.dict_update(d, {'nest': {'ST': {'beta_I_NMDA_1': f_beta_rm(y)}}})

        d['node']['EA']['rate'] *= 0.7
        l[-1] += pl(d, '=', **{'name': ''})

    for x in v:
        d = {}
        for keys in s_mul:
            update(solution, d, keys)

        misc.dict_update(d, {'conn': {'GA_FS_gaba': {'fan_in0': x}}})
        misc.dict_update(d, {'conn': {'GA_M1_gaba': {'fan_in0': x}}})
        misc.dict_update(d, {'conn': {'GA_M2_gaba': {'fan_in0': x}}})

        misc.dict_update(d, {'nest': {'GA_M1_gaba': {'weight': 1. / x}}})
        misc.dict_update(d, {'nest': {'GA_M2_gaba': {'weight': 1. / x}}})
        misc.dict_update(d, {'nest': {'GA_FS_gaba': {'weight': 1. / x}}})

        l += [pl(d, '*', **{'name': ('mod_GA_str_' + str(x))})]

        d = {}
        for keys in s_equal:
            update(solution, d, keys)
        misc.dict_update(d, {'nest': {'ST': {'beta_I_AMPA_1': f_beta_rm(y)}}})
        misc.dict_update(d, {'nest': {'ST': {'beta_I_NMDA_1': f_beta_rm(y)}}})

        d['node']['EA']['rate'] *= 0.7
        l[-1] += pl(d, '=', **{'name': ''})

    return l
def get_solution():

    solution = {'mul': {}, 'equal': {}}

    #Decreasing from 0.25 leads to ...
    #Increasing from 0.25 leads to ...
    d = {
        'nest': {
            'M1_M1_gaba': {
                'weight': 0.25
            },
            'M1_M2_gaba': {
                'weight': 0.25
            },
            'M2_M1_gaba': {
                'weight': 0.25
            },
            'M2_M2_gaba': {
                'weight': 0.25
            }
        }
    }
    misc.dict_update(solution, {'mul': d})

    # GA firing rate needs to be maintained, around 12 Hz for sw in
    # dopamine depleted rats). When decreasing/increasing
    # ST-GA one need to either compensate by changing inhibition from
    # GPe and/or EA external input (assume that synapses from TA and TI
    # are of equal strength.

    # This script is first run where ST-GA GP-GA and EA individually are
    # perturbed to determine each relative influence to TA firing rate.
    # From this data then combinations fo changes that should results in
    # 12 Hz TA firing rate are created.
    d = {
        'nest': {
            'ST_GA_ampa': {
                'weight': 0.25
            },
            'GA_GA_gaba': {
                'weight': 0.25
            },
            'GI_GA_gaba': {
                'weight': 0.25
            }
        }
    }
    misc.dict_update(solution, {'mul': d})

    d = {'node': {'EA': {'rate': 200.0}}}
    misc.dict_update(solution, {'equal': d})

    # C1 and C2 have been set such that MSN D1 and MSN D2 fires at
    # low firing rates (0.1-0,2 Hz).
    d = {'node': {'C1': {'rate': 560.0}, 'C2': {'rate': 700.}}}
    misc.dict_update(solution, {'equal': d})

    # Set such that GPe TI fires in accordance with slow wave sleep
    # in dopamine depleted rats.
    d = {
        'node': {
            'EI': {
                'rate': 1400.0
            }
        }
    }  # Increase with 340, to get close to 24 Hz sw dopamine depleted rats TI
    misc.dict_update(solution, {'equal': d})

    # Decrease weight since tau decay is 5 times stronger
    d = {
        'nest': {
            'GA_M1_gaba': {
                'weight': 0.8 / 5
            },
            'GA_M2_gaba': {
                'weight': 0.8 / 5
            }
        }
    }
    misc.dict_update(solution, {'equal': d})

    # Decrease weight since tau decay is 5 times stronger
    d = {'nest': {'GA_FS_gaba': {'weight': 2. / 5}}}
    misc.dict_update(solution, {'equal': d})

    # Just assumed to be 12*5 ms
    d = {
        'nest': {
            'M1_low': {
                'GABAA_3_Tau_decay': 12. * 5
            },
            'M2_low': {
                'GABAA_3_Tau_decay': 12. * 5
            },
            'FS_low': {
                'GABAA_2_Tau_decay': 12. * 5
            },
        }
    }
    misc.dict_update(solution, {'equal': d})

    #Dopamine such that STN increase above 50-100 %
    x = 2.5
    d = {
        'nest': {
            'ST': {
                'beta_I_AMPA_1': f_beta_rm(x),
                'beta_I_NMDA_1': f_beta_rm(x)
            }
        }
    }
    misc.dict_update(solution, {'equal': d})

    # Delay ctx striatum and ctx stn set to 2.5 ms Jaeger 2011
    y = 2.5
    misc.dict_update(solution,
                     {'equal': {
                         'nest': {
                             'C1_M1_ampa': {
                                 'delay': y
                             }
                         }
                     }})
    misc.dict_update(solution,
                     {'equal': {
                         'nest': {
                             'C1_M1_nmda': {
                                 'delay': y
                             }
                         }
                     }})
    misc.dict_update(solution,
                     {'equal': {
                         'nest': {
                             'C2_M2_ampa': {
                                 'delay': y
                             }
                         }
                     }})
    misc.dict_update(solution,
                     {'equal': {
                         'nest': {
                             'C2_M2_nmda': {
                                 'delay': y
                             }
                         }
                     }})
    misc.dict_update(solution,
                     {'equal': {
                         'nest': {
                             'CF_FS_ampa': {
                                 'delay': y
                             }
                         }
                     }})

    # Dopamine effect on MS-GI
    d = {'equal': {'nest': {'GI': {'beta_I_GABAA_1': f_beta_rm(2)}}}}
    misc.dict_update(solution, d)

    # GI predominently connect to to GA
    d = {'conn': {'GA_GA_gaba': {'fan_in0': 5}, 'GI_GA_gaba': {'fan_in0': 25}}}

    return solution
def get():

    l = []
    solution = get_solution()

    d = {}
    misc.dict_update(d, solution['mul'])
    l += [pl(d, '*', **{'name': ''})]

    d = {}
    misc.dict_update(d, solution['equal'])
    l[-1] += pl(d, '=', **{'name': 'control_sim'})

    # Connectivity GPe-STN
    v = STN_ampa_gaba_input_magnitude()
    agg = []
    for _, a, b in v:
        agg += [[a, b] for _ in range(1)]

    GP_ST_delays = [[3., 5.] for _ in range(len(agg))]
    GP_ST_delays = reduce(lambda x, y: x + y, GP_ST_delays)
    agg = [[e[:] for e in agg] for _ in range(2)]
    agg = zip(*agg)
    agg = reduce(lambda x, y: x[:] + y[:], agg)

    for i in range(len(agg)):
        agg[i].append(GP_ST_delays[i])

    STN_beta_I = []
    for f in [1.]:
        STN_beta_I.append(
            reversed(list(numpy.linspace(f * 1.8, f * 2.5, len(v)))))
    STN_beta_I = zip(*STN_beta_I)
    STN_beta_I = reduce(lambda x, y: x + y, STN_beta_I)
    STN_beta_I = [[a, a] for a in STN_beta_I]
    #
    STN_beta_I = reduce(lambda x, y: x + y, STN_beta_I)

    for i in range(len(agg)):
        agg[i].append(STN_beta_I[i])

    ll = [
        {},
        {
            'a_1': .7,
            'a_2': 0.,
            'b': 0.15,
            'Delta_T': 5.6,
            'E_L': -55.6,
            'V_a': -55.6,
            'V_th': -50.0,
            'g_L': 5.,
            'V_reset_max_slope1': -50.
        },
        {
            'a_1': 1.,
            'a_2': 0.,
            'b': 0.25,
            'Delta_T': 2.8,
            'E_L': -52.8,
            'V_a': -52.8,
            'V_th': -50.0,
            'g_L': 5.,
            'V_reset_max_slope1': -50.
        },
    ]

    p_STN = [ll for _ in range(len(agg))]
    p_STN = reduce(lambda x, y: x + y, p_STN)
    agg = [[e[:] for e in agg] for _ in range(3)]
    agg = zip(*agg)
    agg = reduce(lambda x, y: x[:] + y[:], agg)

    for i in range(len(agg)):
        agg[i].append(p_STN[i])

    ll = ['normal', 'pert1', 'pert2']
    p_STN_name = [ll for _ in range(len(agg) / 3)]
    p_STN_name = reduce(lambda x, y: x + y, p_STN_name)
    #     agg=[[e[:] for e in agg] for _ in range(3)]
    #     agg=zip(*agg)
    #     agg=reduce(lambda x,y:x[:]+y[:], agg)

    for i in range(len(agg)):
        agg[i].append(p_STN_name[i])


#
#     M2_rate=[[1.0, 1.1, 1.2] for _ in range(len(agg))]
#     M2_rate=reduce(lambda x,y:x+y, M2_rate)
#     agg=[[e[:] for e in agg] for _ in range(3)]
#     agg=zip(*agg)
#     agg=reduce(lambda x,y:x[:]+y[:], agg)
#
#     for i in range(len(agg)):
#         agg[i].append(M2_rate[i])

#     ST_GA_ampa_w=[[0.75,1.] for _ in range(len(agg))]
#     ST_GA_ampa_w=reduce(lambda x,y:x+y, ST_GA_ampa_w)
#     agg=[[e[:] for e in agg] for _ in range(2)]
#     agg=zip(*agg)
#     agg=reduce(lambda x,y:x[:]+y[:], agg)
#
#     for i in range(len(agg)):
#         agg[i].append(ST_GA_ampa_w[i])

    EA_rate = [[200., 400., 600.] for _ in range(len(agg))]
    EA_rate = reduce(lambda x, y: x + y, EA_rate)
    agg = [[e[:] for e in agg] for _ in range(3)]
    agg = zip(*agg)
    agg = reduce(lambda x, y: x + y, agg)

    for i in range(len(agg)):
        agg[i].append(EA_rate[i])

    i = 0
    for a0, a1, a2, a3, a4, name, a5 in agg:

        d = {}
        misc.dict_update(d, solution['mul'])

        #         dd={'node':{'M1':{'rate':a3}}}
        #         dd={'nest':{'ST_GA_ampa':{'weight':a3*0.25}}}
        #         misc.dict_update(d,dd)
        l += [pl(d, '*', **{'name': ''})]

        d = {}
        misc.dict_update(d, solution['equal'])

        if a4:
            dd = {'nest': {'ST': a4}}
            misc.dict_update(d, dd)

        dd = {
            'nest': {
                'GA_ST_gaba': {
                    'delay': a2
                },
                'ST_GA_ampa': {
                    'delay': a2
                },
                'ST_GI_ampa': {
                    'delay': a2
                }
            }
        }

        dd = {
            'node': {
                'CS': {
                    'rate': float(a0)
                },
                'EA': {
                    'rate': a5
                }
            },
            'nest': {
                'GI_ST_gaba': {
                    'weight': a1
                },
                'ST': {
                    'beta_I_AMPA_1': f_beta_rm(a3),
                    'beta_I_NMDA_1': f_beta_rm(a3)
                }
            }
        }

        misc.dict_update(d, dd)

        s = 'CS_{0}_GPST_{1}_GPSTd_{2}_STbI_{3}_pST_{4}_EAr_{5}'.format(
            a0,
            str(a1)[0:4],
            str(a2)[0:4], a3, name, int(a5))

        l[-1] += pl(d, '=', **{'name': s})
        i += 1

    return l
def get():
    
    
    l=[]
    solution=get_solution_slow_GP_striatum_2()

    d0=0.8
    f_beta_rm=lambda f: (1-f)/(d0+f*(1-d0))
 
        
    for a,b in zip([200., 300., 300., 400., 500.],
                    [a*0.25 for a in [0.75, 0.75, 0.5, 0.5, 0.5]]):

        z=1.2
        y=0.75
        d={}
        misc.dict_update(d, solution['mul'])
        
        misc.dict_update(d,{'node':{'CS':{'rate': y}}}) 
        misc.dict_update(d,{'node':{'CF':{'rate': z}}}) 
                
        misc.dict_update(d,{'nest':{'ST_GA_ampa':{'weight':b}}})        
        
        l+=[pl(d, '*', **{'name':''})]
          
        d={}
        misc.dict_update(d, solution['equal'])   
          
         
        
        d['node']['EI']['rate']*=y
        d['node']['EA']['rate']=a

        
        misc.dict_update(d,{'nest':{'GI':{'beta_I_GABAA_1': f_beta_rm(2)}}})
          
        l[-1]+=pl(d, '=', **{'name':'all_EIEACS_'+str(a)+'_STGAw_'+str(b)})  
   


    return l
示例#35
0
def get():
    
    
    l=[]
    solution=get_solution_slow_GP_striatum_2()
    
    for y in numpy.arange(2.,29.,4.):       
        d={}
        misc.dict_update(d, solution['mul'])  
        l+=[pl(d, '*', **{'name':''})]
          
        d={}
        misc.dict_update(d, solution['equal']) 
        
        dd={'conn': {'GA_GA_gaba':{'fan_in0': y,'rule':'all-all' }, 
                     'GA_GI_gaba':{'fan_in0': 2,'rule':'all-all' },
                     'GI_GA_gaba':{'fan_in0': 30-y,'rule':'all-all' },
                     'GI_GI_gaba':{'fan_in0': 28,'rule':'all-all' }}}
        
        misc.dict_update(d, dd)
          
        l[-1]+=pl(d, '=', **{'name':'GAGA_'+str(y)+'_GIGA_'+str(30-y)})  


    d0=0.8
    f_beta_rm=lambda f: (1-f)/(d0+f*(1-d0))
    
    for y in [1.8, 2.0]:       
        d={}
        misc.dict_update(d, solution['mul'])  
        l+=[pl(d, '*', **{'name':''})]
          
        d={}
        misc.dict_update(d, solution['equal']) 
        d['node']['EI']['rate']*=y
        d['node']['EA']['rate']*=y*0.7
        
        
        misc.dict_update(d,{'nest':{'GI':{'beta_I_GABAA_1': f_beta_rm(2)}}})
    
        
        l[-1]+=pl(d, '=', **{'name':'mod_EIEA_'+str(y)})  
    
    
    for y, EA_rate in zip(numpy.arange(25,80,25)
                          numpy.arange(0.9,1.1,0.1)):
        d={}
        
        misc.dict_update(d, solution['mul'])  
        l+=[pl(d, '*', **{'name':''})]
          
        d={}
        misc.dict_update(d, solution['equal']) 

        d['node']['EA']['rate']*=EA_rate
        
        misc.dict_update(d,{'conn':{'M2_GA_gaba':{'lesion': False}}})
        misc.dict_update(d,{'conn':{'M2_GA_gaba':{'fan_in0': y}}})
        
        
        l[-1]+=pl(d, '=', **{'name':'M2GA_'+str(y)+'_EArate_'+str(EA_rate)})    
def get():
     
     
    l=[]
    solution, s_mul, s_equal=get_solution()
     
    d0=0.8
    f_beta_rm=lambda f: (1-f)/(d0+f*(1-d0))
     
    y=2.5
    
        
    w=numpy.arange(0.5, 1.2, 0.1)
    v=[0.1,0.25, 0.5]
    ll=[[v1,v2] for v1 in v for v2 in w]
    pp(l)
    for x, z in ll:
        print x,z
                  
        d={}
        for keys in s_mul: update(solution, d, keys)  
        l+=[pl(d, '*', **{'name':''})]
             
        d={}
        for keys in s_equal: update(solution, d, keys)  
        misc.dict_update(d,{'nest':{'ST':{'beta_I_AMPA_1': f_beta_rm(y)}}})
        misc.dict_update(d,{'nest':{'ST':{'beta_I_NMDA_1': f_beta_rm(y)}}})
                
                
        misc.dict_update(d,{'nest':{'MS':{'beta_I_GABAA_2': f_beta_rm(x)}}})
        for conn in ['M1_M1_gaba', 'M1_M2_gaba','M2_M1_gaba','M2_M2_gaba']:
            misc.dict_update(d,{'conn':{conn:{'beta_fan_in': f_beta_rm(x)}}}) 
                
        misc.dict_update(d,{'nest':{'GA_M1_gaba':{'weight': z}}})
        misc.dict_update(d,{'nest':{'GA_M2_gaba':{'weight': z}}})
        misc.dict_update(d,{'nest':{'GA_FS_gaba':{'weight': z}}})
        
        d['node']['EA']['rate']*=0.7
        l[-1]+=pl(d, '=', **{'name':('mod_GA_str_' + str(z)+'_MS_'+str(x))
                         })   
     
    return l
def get():
    
    
    l=[]
    solution, s_mul, s_equal=get_solution()
    
    d0=0.8
    f_beta_rm=lambda f: (1-f)/(d0+f*(1-d0))
    
   
    d={}
    x=2.5    
    for keys in s_mul: update(solution, d, keys)  
    l+=[pl(d, '*', **{'name':''})]
      
    d={}
    for keys in s_equal: update(solution, d, keys) 
    
    misc.dict_update(d,{'nest':{'ST':{'beta_I_AMPA_1': f_beta_rm(x)}}})
    misc.dict_update(d,{'nest':{'ST':{'beta_I_NMDA_1': f_beta_rm(x)}}})
    d['node']['EA']['rate']*=0.7    
    
    l[-1]+=pl(d, '=', **{'name':'mod_ST_beta_'+str(x)})    

    for y in numpy.arange(1,11,1):
        d={}
        
        for keys in s_mul: update(solution, d, keys)  
        l+=[pl(d, '*', **{'name':''})]
          
        d={}
        for keys in s_equal: update(solution, d, keys) 
        
        misc.dict_update(d,{'nest':{'ST':{'beta_I_AMPA_1': f_beta_rm(x)}}})
        misc.dict_update(d,{'nest':{'ST':{'beta_I_NMDA_1': f_beta_rm(x)}}})
        d['node']['EA']['rate']*=0.7
        
        misc.dict_update(d,{'conn':{'GI_FS_gaba':{'lesion': False}}})
        misc.dict_update(d,{'conn':{'GI_FS_gaba':{'fan_in0': y}}})
        misc.dict_update(d,{'conn':{'GI_M1_gaba':{'lesion': False}}})
        misc.dict_update(d,{'conn':{'GI_M1_gaba':{'fan_in0': y}}})
        misc.dict_update(d,{'conn':{'GI_M2_gaba':{'lesion': False}}})
        misc.dict_update(d,{'conn':{'GI_M2_gaba':{'fan_in0': y}}})        
        
        l[-1]+=pl(d, '=', **{'name':'mod_GI_M2_'+str(y)})   
    

    for y, EA_rate in zip(numpy.arange(25,125,25),
                          numpy.arange(0.9,1.3,0.1)):
        d={}
        
        for keys in s_mul: update(solution, d, keys)  
        l+=[pl(d, '*', **{'name':''})]
          
        d={}
        for keys in s_equal: update(solution, d, keys) 
        
        misc.dict_update(d,{'nest':{'ST':{'beta_I_AMPA_1': f_beta_rm(x)}}})
        misc.dict_update(d,{'nest':{'ST':{'beta_I_NMDA_1': f_beta_rm(x)}}})
        d['node']['EA']['rate']*=EA_rate
        
        misc.dict_update(d,{'conn':{'M2_GA_gaba':{'lesion': False}}})
        misc.dict_update(d,{'conn':{'M2_GA_gaba':{'fan_in0': y}}})
        
        
        l[-1]+=pl(d, '=', **{'name':'M2GA_'+str(y)+'_EArate_'+str(EA_rate)})    
            

    
    return l
def get():
    
    
    l=[]
    solution=get_solution_slow_GP_striatum_2()

    d0=0.8
    f_beta_rm=lambda f: (1-f)/(d0+f*(1-d0))
    for y in [0.75, 0.8]:
      
        d={}
        misc.dict_update(d, solution['mul'])
        
        misc.dict_update(d,{'node':{'CS':{'rate': y}}}) 
        
        l+=[pl(d, '*', **{'name':''})]
          
        d={}
        misc.dict_update(d, solution['equal']) 
    
        d['node']['EI']['rate']*=y
        d['node']['EA']['rate']*=0.0
        
        misc.dict_update(d,{'nest':{'GI':{'beta_I_GABAA_1': f_beta_rm(2)}}})
          
        l[-1]+=pl(d, '=', **{'name':'all_CSEIEA_'+str(y)})  


    for z in [1.1,1.2]:
        y=0.75
        d={}
        misc.dict_update(d, solution['mul'])
        
        misc.dict_update(d,{'node':{'CS':{'rate': y}}}) 
        misc.dict_update(d,{'node':{'CF':{'rate': z}}}) 
                
        l+=[pl(d, '*', **{'name':''})]
          
        d={}
        misc.dict_update(d, solution['equal']) 
    
        d['node']['EI']['rate']*=y
        d['node']['EA']['rate']*=0.0

        
        misc.dict_update(d,{'nest':{'GI':{'beta_I_GABAA_1': f_beta_rm(2)}}})
          
        l[-1]+=pl(d, '=', **{'name':'all_CF_'+str(z)})

    for y in numpy.arange(5.,29.,5.):       
        
        z=0.8
        d={}
        misc.dict_update(d, solution['mul'])  
        misc.dict_update(d,{'node':{'CS':{'rate': z}}}) 
        l+=[pl(d, '*', **{'name':''})]
          
        d={}
        misc.dict_update(d, solution['equal']) 
        
        dd={'conn': {'GA_GA_gaba':{'fan_in0': y,'rule':'all-all' }, 
                     'GA_GI_gaba':{'fan_in0': 2,'rule':'all-all' },
                     'GI_GA_gaba':{'fan_in0': 30-y,'rule':'all-all' },
                     'GI_GI_gaba':{'fan_in0': 28,'rule':'all-all' }}}
        
        misc.dict_update(d, dd)
         
         
        d['node']['EI']['rate']*=z
        d['node']['EA']['rate']*=0.0

        misc.dict_update(d,{'nest':{'GI':{'beta_I_GABAA_1': f_beta_rm(2)}}})
     
        l[-1]+=pl(d, '=', **{'name':'GAGA_'+str(y)+'_GIGA_'+str(30-y)}) 
        
    return l
def get():
    
    
    l=[]
    solution=get_solution_slow_GP_striatum_2()

    d0=0.8
    f_beta_rm=lambda f: (1-f)/(d0+f*(1-d0))
    for y in [1.2, 1.3]:   
    
        d={}
        misc.dict_update(d, solution['mul'])
        
        misc.dict_update(d,{'node':{'CS':{'rate': y}}}) 
        
        l+=[pl(d, '*', **{'name':''})]
          
        d={}
        misc.dict_update(d, solution['equal']) 
        
        dd={'conn': {'GA_GA_gaba':{'fan_in0': 20,'rule':'all-all' }, 
                     'GA_GI_gaba':{'fan_in0': 2,' rule':'all-all' },
                     'GI_GA_gaba':{'fan_in0': 10,'rule':'all-all' },
                     'GI_GI_gaba':{'fan_in0': 28,'rule':'all-all' }}}
        
        misc.dict_update(d, dd)

        misc.dict_update(d,{'conn':{'GI_FS_gaba':{'lesion': False}}})
        misc.dict_update(d,{'conn':{'GI_FS_gaba':{'fan_in0': 2}}})
        misc.dict_update(d,{'conn':{'GI_M1_gaba':{'lesion': False}}})
        misc.dict_update(d,{'conn':{'GI_M1_gaba':{'fan_in0': 2}}})
        misc.dict_update(d,{'conn':{'GI_M2_gaba':{'lesion': False}}})
        misc.dict_update(d,{'conn':{'GI_M2_gaba':{'fan_in0': 2}}})        


#         d['node']['EA']['rate']*=0.9
         
#         misc.dict_update(d,{'conn':{'M2_GA_gaba':{'lesion': False}}})
#         misc.dict_update(d,{'conn':{'M2_GA_gaba':{'fan_in0': 25}}})

        d['node']['EI']['rate']*=y*0.9
        d['node']['EA']['rate']*=y
#         d['node']['CS']['rate']*=y
        
#            
        
        misc.dict_update(d,{'nest':{'GI':{'beta_I_GABAA_1': f_beta_rm(2)}}})
          
        l[-1]+=pl(d, '=', **{'name':'all_EIEA_'+str(y)})  

    for a,b in zip([1.1, 1.2, 1.7, 2.3, 2.5],
                    [a*0.25 for a in [0.75, 0.5, 0.25, 0.1, 0.01]]):
        y=1.2   
    
        d={}
        misc.dict_update(d, solution['mul'])    
        misc.dict_update(d,{'node':{'CS':{'rate': y}}}) 

        misc.dict_update(d,{'nest':{'ST_GA_ampa':{'weight':b}}})        
        
        l+=[pl(d, '*', **{'name':''})]
          
        d={}
        misc.dict_update(d, solution['equal'])   
        
        dd={'conn': {'GA_GA_gaba':{'fan_in0': 20,'rule':'all-all' }, 
                     'GA_GI_gaba':{'fan_in0': 2,' rule':'all-all' },
                     'GI_GA_gaba':{'fan_in0': 10,'rule':'all-all' },
                     'GI_GI_gaba':{'fan_in0': 28,'rule':'all-all' }}}
        
        misc.dict_update(d, dd)

        
        misc.dict_update(d,{'conn':{'GI_FS_gaba':{'lesion': False}}})
        misc.dict_update(d,{'conn':{'GI_FS_gaba':{'fan_in0': 2}}})
        misc.dict_update(d,{'conn':{'GI_M1_gaba':{'lesion': False}}})
        misc.dict_update(d,{'conn':{'GI_M1_gaba':{'fan_in0': 2}}})
        misc.dict_update(d,{'conn':{'GI_M2_gaba':{'lesion': False}}})
        misc.dict_update(d,{'conn':{'GI_M2_gaba':{'fan_in0': 2}}})        


#         d['node']['EA']['rate']*=0.9
         
#         misc.dict_update(d,{'conn':{'M2_GA_gaba':{'lesion': False}}})
#         misc.dict_update(d,{'conn':{'M2_GA_gaba':{'fan_in0': 25}}})

        d['node']['EI']['rate']*=y*0.9
        d['node']['EA']['rate']*=y*a
#         d['node']['CS']['rate']*=y
        
        misc.dict_update(d,{'nest':{'GI':{'beta_I_GABAA_1': f_beta_rm(2)}}})
          
        l[-1]+=pl(d, '=', **{'name':'all_EIEACS_'+str(a)+'_STGAw_'+str(b)})  

    return l
def get():
    
    
    l=[]
    solution, s_mul, s_equal=get_solution_slow_GP_striatum()
    
    d0=0.8
    f_beta_rm=lambda f: (1-f)/(d0+f*(1-d0))
    
    
    for y in numpy.arange(1.0,-0.1,-0.5):
        for z in numpy.arange(1.0,-0.1,-0.5):
            x=2.5
            d={}
            for keys in s_mul: update(solution, d, keys)  
    
            misc.dict_update(d,{'nest':{'GI_GA_gaba':{'weight':y}}})
            misc.dict_update(d,{'nest':{'ST_GA_ampa':{'weight':z}}})
            l+=[pl(d, '*', **{'name':''})]
        
    
              
            d={}
            for keys in s_equal: update(solution, d, keys) 
            
            misc.dict_update(d,{'nest':{'ST':{'beta_I_AMPA_1': f_beta_rm(x)}}})
            misc.dict_update(d,{'nest':{'ST':{'beta_I_NMDA_1': f_beta_rm(x)}}})
            d['node']['EA']['rate']*=0.7
            
        
            l[-1]+=pl(d, '=', **{'name':'GIGA_'+str(y)+'_STGA_'+str(z)})    
    
    for y in numpy.arange(1.,6.):
        for z in numpy.arange(1.,6.):
            x=2.5
            d={}
            for keys in s_mul: update(solution, d, keys)  
            
            l+=[pl(d, '*', **{'name':''})]
        
    
              
            d={}
            for keys in s_equal: update(solution, d, keys) 
            misc.dict_update(d,{'nest':{'ST_GA_ampa':{'delay':y}}})
            misc.dict_update(d,{'nest':{'ST_GI_ampa':{'delay':y}}})
            misc.dict_update(d,{'nest':{'GI_ST_gaba':{'delay':z}}})
            
            misc.dict_update(d,{'nest':{'ST':{'beta_I_AMPA_1': f_beta_rm(x)}}})
            misc.dict_update(d,{'nest':{'ST':{'beta_I_NMDA_1': f_beta_rm(x)}}})
            d['node']['EA']['rate']*=0.7
            
        
            l[-1]+=pl(d, '=', **{'name':'STGPdelay_'+str(y)+'_GPSTdelay_'+str(z)})         
    
    for y in numpy.arange(2.5, 21., 2.5):
            x=2.5
            d={}
            for keys in s_mul: update(solution, d, keys)  

            
            l+=[pl(d, '*', **{'name':''})]
        
    
              
            d={}
            for keys in s_equal: update(solution, d, keys) 
            misc.dict_update(d,{'nest':{'CS_ST_ampa':{'delay':y}}})
            misc.dict_update(d,{'nest':{'CS_ST_nmda':{'delay':y}}})            
            misc.dict_update(d,{'nest':{'ST':{'beta_I_AMPA_1': f_beta_rm(x)}}})
            misc.dict_update(d,{'nest':{'ST':{'beta_I_NMDA_1': f_beta_rm(x)}}})
            d['node']['EA']['rate']*=0.7
            
        
            l[-1]+=pl(d, '=', **{'name':'CSSTdelay_'+str(y)})  

    for y in numpy.arange(2.5, 21., 2.5):
            x=2.5
            d={}
            for keys in s_mul: update(solution, d, keys)  

            
            l+=[pl(d, '*', **{'name':''})]
        
    
              
            d={}
            for keys in s_equal: update(solution, d, keys) 
            misc.dict_update(d,{'nest':{'C1_M1_ampa':{'delay':y}}})
            misc.dict_update(d,{'nest':{'C1_M1_nmda':{'delay':y}}})            
            misc.dict_update(d,{'nest':{'C2_M2_ampa':{'delay':y}}})
            misc.dict_update(d,{'nest':{'C2_M2_nmda':{'delay':y}}})            
            misc.dict_update(d,{'nest':{'CF_FS_ampa':{'delay':y}}})
            misc.dict_update(d,{'nest':{'ST':{'beta_I_AMPA_1': f_beta_rm(x)}}})
            misc.dict_update(d,{'nest':{'ST':{'beta_I_NMDA_1': f_beta_rm(x)}}})
            d['node']['EA']['rate']*=0.7
            
        
            l[-1]+=pl(d, '=', **{'name':'CSTRdelay_'+str(y)})  
         


    for y in numpy.arange(1, 8., 1.):
            x=2.5
            d={}
            for keys in s_mul: update(solution, d, keys)  

            
            l+=[pl(d, '*', **{'name':''})]
        
    
              
            d={}
            for keys in s_equal: update(solution, d, keys) 
            misc.dict_update(d,{'nest':{'GA_M1_gaba':{'delay':y}}})
            misc.dict_update(d,{'nest':{'GA_M2_gaba':{'delay':y}}})            
            misc.dict_update(d,{'nest':{'GA_FS_gaba':{'delay':y}}})
            d['node']['EA']['rate']*=0.7
            
        
            l[-1]+=pl(d, '=', **{'name':'GASTRdelay_'+str(y)})  

            
         
    return l
def get():
    
    
    l=[]
    solution=get_solution_slow_GP_striatum_2()

    d0=0.8
    f_beta_rm=lambda f: (1-f)/(d0+f*(1-d0))
    for y in [1.1, 1.2, 1.3]:   
    
        d={}
        misc.dict_update(d, solution['mul'])
        
        misc.dict_update(d,{'node':{'CS':{'rate': y}}}) 
        
        l+=[pl(d, '*', **{'name':''})]
          
        d={}
        misc.dict_update(d, solution['equal']) 

        d['node']['EI']['rate']*=y*0.9
        d['node']['EA']['rate']*=y
        
        misc.dict_update(d,{'nest':{'GI':{'beta_I_GABAA_1': f_beta_rm(2)}}})
          
        l[-1]+=pl(d, '=', **{'name':'all_CSEIEA_'+str(y)})  

  

    y=1.2
    d={}
    misc.dict_update(d, solution['mul'])
    
    misc.dict_update(d,{'node':{'CS':{'rate': y}}}) 
    
    l+=[pl(d, '*', **{'name':''})]
      
    d={}
    misc.dict_update(d, solution['equal']) 

    d['node']['EI']['rate']*=y*0.9
    d['node']['EA']['rate']*=0.0
    
    misc.dict_update(d,{'nest':{'GI':{'beta_I_GABAA_1': f_beta_rm(2)}}})
      
    l[-1]+=pl(d, '=', **{'name':'all_CSEIEA_'+str(y)})  


    return l
def get():

    l = []
    solution = get_solution_slow_GP_striatum_2()

    d0 = 0.8
    f_beta_rm = lambda f: (1 - f) / (d0 + f * (1 - d0))
    for y in [1.1, 1.2, 1.3]:

        d = {}
        misc.dict_update(d, solution['mul'])

        misc.dict_update(d, {'node': {'CS': {'rate': y}}})

        l += [pl(d, '*', **{'name': ''})]

        d = {}
        misc.dict_update(d, solution['equal'])

        d['node']['EI']['rate'] *= y * 0.9
        d['node']['EA']['rate'] *= y

        misc.dict_update(d, {'nest': {'GI': {'beta_I_GABAA_1': f_beta_rm(2)}}})

        l[-1] += pl(d, '=', **{'name': 'all_CSEIEA_' + str(y)})

    y = 1.2
    d = {}
    misc.dict_update(d, solution['mul'])

    misc.dict_update(d, {'node': {'CS': {'rate': y}}})

    l += [pl(d, '*', **{'name': ''})]

    d = {}
    misc.dict_update(d, solution['equal'])

    d['node']['EI']['rate'] *= y * 0.9
    d['node']['EA']['rate'] *= 0.0

    misc.dict_update(d, {'nest': {'GI': {'beta_I_GABAA_1': f_beta_rm(2)}}})

    l[-1] += pl(d, '=', **{'name': 'all_CSEIEA_' + str(y)})

    return l
def get():

    l = []
    solution, s_mul, s_equal = get_solution()

    d0 = 0.8
    f_beta_rm = lambda f: (1 - f) / (d0 + f * (1 - d0))

    y = 2.5

    w = numpy.arange(0.5, 1.2, 0.1)
    v = [0.1, 0.25, 0.5]
    ll = [[v1, v2] for v1 in v for v2 in w]
    pp(l)
    for x, z in ll:
        print x, z

        d = {}
        for keys in s_mul:
            update(solution, d, keys)
        l += [pl(d, '*', **{'name': ''})]

        d = {}
        for keys in s_equal:
            update(solution, d, keys)
        misc.dict_update(d, {'nest': {'ST': {'beta_I_AMPA_1': f_beta_rm(y)}}})
        misc.dict_update(d, {'nest': {'ST': {'beta_I_NMDA_1': f_beta_rm(y)}}})

        misc.dict_update(d, {'nest': {'MS': {'beta_I_GABAA_2': f_beta_rm(x)}}})
        for conn in ['M1_M1_gaba', 'M1_M2_gaba', 'M2_M1_gaba', 'M2_M2_gaba']:
            misc.dict_update(d,
                             {'conn': {
                                 conn: {
                                     'beta_fan_in': f_beta_rm(x)
                                 }
                             }})

        misc.dict_update(d, {'nest': {'GA_M1_gaba': {'weight': z}}})
        misc.dict_update(d, {'nest': {'GA_M2_gaba': {'weight': z}}})
        misc.dict_update(d, {'nest': {'GA_FS_gaba': {'weight': z}}})

        d['node']['EA']['rate'] *= 0.7
        l[-1] += pl(d, '=',
                    **{'name': ('mod_GA_str_' + str(z) + '_MS_' + str(x))})

    return l
def get():
     
     
    l=[]
    solution, s_mul, s_equal=get_solution()
     
    d0=0.8
    f_beta_rm=lambda f: (1-f)/(d0+f*(1-d0))
     
    y=2.5
    
        
    
    v=[1./10., 3./10, 5./10,7./10, 9./10]
    

    for x in v:                  
        d={}
        for keys in s_mul: update(solution, d, keys)  
        
        misc.dict_update(d,{'conn':{'GA_M1_gaba':{'fan_in0': x}}})
        misc.dict_update(d,{'conn':{'GA_M2_gaba':{'fan_in0': x}}})
 
        misc.dict_update(d,{'nest':{'GA_M1_gaba':{'weight': 1./x}}})
        misc.dict_update(d,{'nest':{'GA_M2_gaba':{'weight': 1./x}}})
        
        l+=[pl(d, '*', **{'name':('mod_GA_MS_' + str(x))})]
             
        d={}
        for keys in s_equal: update(solution, d, keys)  
        misc.dict_update(d,{'nest':{'ST':{'beta_I_AMPA_1': f_beta_rm(y)}}})
        misc.dict_update(d,{'nest':{'ST':{'beta_I_NMDA_1': f_beta_rm(y)}}})
        
        d['node']['EA']['rate']*=0.7
        l[-1]+=pl(d, '=', **{'name':'' }) 
    
    for x in v:                  
        d={}
        for keys in s_mul: update(solution, d, keys)  
        
        misc.dict_update(d,{'conn':{'GA_FS_gaba':{'fan_in0': x}}})
 
        misc.dict_update(d,{'nest':{'GA_FS_gaba':{'weight': 1./x}}})
        
        l+=[pl(d, '*', **{'name':('mod_GA_FS_' + str(x))})]
             
        d={}
        for keys in s_equal: update(solution, d, keys)  
        misc.dict_update(d,{'nest':{'ST':{'beta_I_AMPA_1': f_beta_rm(y)}}})
        misc.dict_update(d,{'nest':{'ST':{'beta_I_NMDA_1': f_beta_rm(y)}}})
        
        d['node']['EA']['rate']*=0.7
        l[-1]+=pl(d, '=', **{'name':'' }) 
    
    for x in v:                  
        d={}
        for keys in s_mul: update(solution, d, keys)  
        
        misc.dict_update(d,{'conn':{'GA_FS_gaba':{'fan_in0': x}}})
        misc.dict_update(d,{'conn':{'GA_M1_gaba':{'fan_in0': x}}})
        misc.dict_update(d,{'conn':{'GA_M2_gaba':{'fan_in0': x}}})
 
                
        misc.dict_update(d,{'nest':{'GA_M1_gaba':{'weight': 1./x}}})
        misc.dict_update(d,{'nest':{'GA_M2_gaba':{'weight': 1./x}}})
        misc.dict_update(d,{'nest':{'GA_FS_gaba':{'weight': 1./x}}})
        
        l+=[pl(d, '*', **{'name':('mod_GA_str_' + str(x))})]
             
        d={}
        for keys in s_equal: update(solution, d, keys)  
        misc.dict_update(d,{'nest':{'ST':{'beta_I_AMPA_1': f_beta_rm(y)}}})
        misc.dict_update(d,{'nest':{'ST':{'beta_I_NMDA_1': f_beta_rm(y)}}})
        
        d['node']['EA']['rate']*=0.7
        l[-1]+=pl(d, '=', **{'name':'' })   
     
     
     
    return l
示例#45
0
        misc.dict_update(d, solution['equal']) 

        d['node']['EA']['rate']*=EA_rate
        
        misc.dict_update(d,{'conn':{'M2_GA_gaba':{'lesion': False}}})
        misc.dict_update(d,{'conn':{'M2_GA_gaba':{'fan_in0': y}}})
        
        
        l[-1]+=pl(d, '=', **{'name':'M2GA_'+str(y)+'_EArate_'+str(EA_rate)})    
            

    for y in numpy.arange(2, 5, 2):
    
        d={}
        
        misc.dict_update(d, solution['mul'])  
        l+=[pl(d, '*', **{'name':''})]
          
        d={}
        misc.dict_update(d, solution['equal']) 
            
        misc.dict_update(d,{'conn':{'GI_FS_gaba':{'lesion': False}}})
        misc.dict_update(d,{'conn':{'GI_FS_gaba':{'fan_in0': y}}})
        misc.dict_update(d,{'conn':{'GI_M1_gaba':{'lesion': False}}})
        misc.dict_update(d,{'conn':{'GI_M1_gaba':{'fan_in0': y}}})
        misc.dict_update(d,{'conn':{'GI_M2_gaba':{'lesion': False}}})
        misc.dict_update(d,{'conn':{'GI_M2_gaba':{'fan_in0': y}}})        
               
        
        l[-1]+=pl(d, '=', **{'name':'mod_GI_M2_'+str(y)})  
def get():

    l = []
    solution = get_solution_slow_GP_striatum_2()

    d0 = 0.8
    f_beta_rm = lambda f: (1 - f) / (d0 + f * (1 - d0))

    for a, b in zip([200., 300., 300., 400., 500.],
                    [a * 0.25 for a in [0.75, 0.75, 0.5, 0.5, 0.5]]):

        z = 1.2
        y = 0.75
        d = {}
        misc.dict_update(d, solution['mul'])

        misc.dict_update(d, {'node': {'CS': {'rate': y}}})
        misc.dict_update(d, {'node': {'CF': {'rate': z}}})

        misc.dict_update(d, {'nest': {'ST_GA_ampa': {'weight': b}}})

        l += [pl(d, '*', **{'name': ''})]

        d = {}
        misc.dict_update(d, solution['equal'])

        d['node']['EI']['rate'] *= y
        d['node']['EA']['rate'] = a

        misc.dict_update(d, {'nest': {'GI': {'beta_I_GABAA_1': f_beta_rm(2)}}})

        l[-1] += pl(d, '=',
                    **{'name': 'all_EIEACS_' + str(a) + '_STGAw_' + str(b)})

    return l
def get():
    
    
    l=[]
    solution=get_solution_slow_GP_striatum_2()

    d0=0.8
    f_beta_rm=lambda f: (1-f)/(d0+f*(1-d0))

    for z in [1.05,1.1]:
        for a,b in zip([900., 1200.0 ],
                        [a*0.25 for a in [0.75, 0.5]]):
    
            for y in numpy.arange(5.,29.,5.):       
#         z=0.8
                d={}
                misc.dict_update(d, solution['mul'])  
                misc.dict_update(d,{'node':{'CS':{'rate': z}}}) 
                misc.dict_update(d,{'nest':{'ST_GA_ampa':{'weight':b}}})  
                
                l+=[pl(d, '*', **{'name':''})]
                  
                d={}
                misc.dict_update(d, solution['equal']) 
                
                dd={'conn': {'GA_GA_gaba':{'fan_in0': y,'rule':'all-all' }, 
                             'GA_GI_gaba':{'fan_in0': 2,'rule':'all-all' },
                             'GI_GA_gaba':{'fan_in0': 30-y,'rule':'all-all' },
                             'GI_GI_gaba':{'fan_in0': 28,'rule':'all-all' }}}
                
                misc.dict_update(d, dd)
                 
                 
                d['node']['EI']['rate']*=z
                d['node']['EA']['rate']=a
        
                misc.dict_update(d,{'nest':{'GI':{'beta_I_GABAA_1': f_beta_rm(2)}}})
             
                l[-1]+=pl(d, '=', **{'name':'exc'+str(z)
                                     +'_EIEACS_'+str(a)
                                     +'_STGAw_'+str(b)
                                     +'_GAGA_'+str(y)
                                     +'_GIGA_'+str(30-y)}) 
        
    return l