argdict = {'maxi':60,'mini':20,'freq':4} # this is probably overkill
CONTOG=0#1.000000e+00
ALL = 0 # 1 for Fig 4C6

p_init = dict({})

p_init['gnmda'] =0e-6 #nmda
p_init['cmg'] = 1.2 #1.2 for NMDA, 0 for 'AMPA' or light activated channels
p_init['cafrac']=0

p_init['ecl'] = -60 # Chloride reversal for GABAa

p_init['gabaamp']=0
p_init['gababamp']=0
#3640
p_init['regamp']=0#5e-3 # this is producing inputs where it should not
p_init['freq'] = 50
p_init['number']=0

p_init['nmdaamp']=0

p_init['won']=50
p_init['woff']=2950
p_init['fon'] =100
p_init['foff']=100

p_init['knmda']=4

p_init['deexcite']=0
p_init['inhibit']=0
p_init['noise']=1
p_init['pausedur'] = 500
p_init['ncells']=1
p_init['syntype']='gabaa'

p_init['von'] = -60
p_init['voff'] = -50

p_init['regtype']='gabaa'

p_init['kass'] = 0 # ashift of Kv4
p_init['kasv'] = 0 # shift in slope of Kv4

p_init['both']=1
p_init['kchip']=0.22#0.5*(1-CONTOG)# Kv4 with slow kinetics
p_init['fchip']=0.78#0.4+0.5*CONTOG # Kv4 with fast kinetics (for viral deletion the total conductance may change)

p_init['taukv4'] = 1 # scale factor for max inactivation time constant of slow kv4 (1 = 250 ms) (25 ms at hyperpolarized voltages)
#


p_init['na_shift'] = 0.0 # mshift positive decreases excitability
p_init['na_hshift'] = 0#-5.0 # hshift
p_init['na_sshift'] = 0.0

p_init['ra'] = 1 # 1 = 100 ohm-cm
# making the cell smaller works?


p_init['glna'] = 2.25
p_init['glk'] = 3 #+(1-CONTOG) # 1 = 10 uS/cm2
p_init['kmark'] = 0 # use markov potassium (post manuscript code)


p_init['capump'] = 0.4# CA pump
p_init['gka'] = 0.6 # combination of peak conductance of 1, qhalf = -65 (5 kasv) creates peak currents in real morphologies comparable to Jochen's data
p_init['gcal'] = 0.5 # L type

#p_init[16] = -0
p_init['ais_na'] = 3 # less is more
#p_init[12] = 0
#p_init[14] = 5 #3
p_init['gcat'] = 1.0*CONTOG # CaV3
#0.5
catbuff = 0.0 # 1 means CaT is not coupled to SK
taukv4 = 1 # 25 ms inactivation time constant
capval =1 #
ashift = -10
SCALE =1





p_init['chop'] = 1
p_init['dst'] = 300  #'distal' distance

p_init['rtype']='nexp' # poisson is actually recursive poisson.  Don't use it


phi_h = 1.5 # speed scale factor for CaT
p_init['cm'] = 1
p_init['scale'] =1


p_init['ratio'] = 1 # fraction of NaV that is slow inactivating

p_init['gnahh'] =15.0*(1+CONTOG) #poorly named
p_init['nafrac'] = 0.0

p_init['ampa_ratio'] = 0.3

p_init['bal_shift'] =0
  #  0.6 - 0.5*(CONTOG+ALL)#-0.5 # 0.6 0.1
p_init['ghcn'] = 0.5*(CONTOG+ALL)#+0.3 # 0, 0.5

p_init['gkca'] =(0.5+0.5*(CONTOG+ALL))#0.4+0.6*CONTOG#+0.3 # 0.2, 1
p_init['dca'] = 0.0  #reduced mobility allows for larger calcium swings



p_init['control'] = 0
p_init['all'] = 0


p_init['nspeed'] = 2

p_init['gkhh'] =2+2.5*CONTOG+ALL*1.5#1.5 4
p_init['nshift']=0#-5*CONTOG #
p_init['nslope'] = 16


p_init['size'] =500*(1+1*CONTOG) # conventional size lowered a bit so that failure remains at 100 pA ramp

p_init['slow'] =(1-CONTOG)*0.33+(2.5*CONTOG)# 1 = 40 1/s 3 (120/s) matches Ding data, 2 (80 /s) matches NMDA data.
# stimulus parameter

p_init['idel'] = 2000 # 
p_init['idur'] = 4000 # width of V-ramp
p_init['basal'] = (-25e-3) # initial hyperpolarizing holding step for bidirectional ramp

p_init['iamp'] =0#(100.0e-3)  #translates to 50, 100 pA for 300, 600 um change this and in dep_fun so that the basal is the special case
p_init['offset'] = 0
p_init['i2amp'] =0
p_init['i2dur']=10



p_init['catdist'] = 50
p_init['tmhalf'] = -52
p_init['thhalf'] = -81
p_init['tphi'] = 1.5
p_init['catbuff']=0
#p_init[26] = .0