xopen("_reset.hoc")
stim1.dur=1000

//for Figure4A in Carter's paper
sprint(input_file,"./stim_files2/stimxout_s0_prep000_DANO.txt")
chnmdawt(0)

set_naf(0)
set_nap(0)
set_nafd(0)
set_napd(0)

set_caL(0)
set_caL13(0)
set_can(0)
set_caq(0)
set_car(0)
set_cat(0)

IClamp[0].amp=0


stim1.del=10000
saveplots("./data3/Carter4_down.txt")
stim1.del=0
saveplots("./data3/Carter4_up.txt")


//for Figure5 in Crater's paper
sprint(input_file,"./stim_files2/stimxout_s0_prep000_DANO.txt")
xopen("_reset.hoc")

champawt(0)

set_naf(0)
set_nap(0)
set_nafd(0)
set_napd(0)

set_caL(0)
set_caL13(0)
set_can(0)
set_caq(0)
set_car(0)
set_cat(0)

IClamp[0].amp=0

nmda_mg(0.02)
stim1.del=10000
saveplots("./data3/Carter5_down_Mgfree.txt")
stim1.del=0
saveplots("./data3/Carter5_up_Mgfree.txt")

nmda_mg(1)
stim1.del=10000
saveplots("./data3/Carter5_down.txt")
stim1.del=0
saveplots("./data3/Carter5_up.txt")





//calcium spike under inhibition
//O’Donnell P, Grace AA 1993
//Moyer
xopen("_reset.hoc")
stim1.amp=0.3
stim1.del=200
stim1.dur=500
stim4.del=10000

set_kaf(G_KAF*0.6)
set_kafd(G_KAFD*0.6)
set_kas(G_KAS*0.4)
set_kasd(G_KASD*0.4)
set_krp(G_KRP*0.5)
set_naf(G_NAF*0.25)
set_nafd(G_NAFD*0.25)
saveplots("./data3/CaSpike.txt")