// genesis include TanakaNeuron.g float normdt = 0.0001 float finedt = 1e-05 float roughdt = 0.001 float plotdt = 0.1 float Cabasal = 0 /* default value */ echo "# Usage" echo "# do_flash {peakCa} {duration} // e.g. do_flash 2.5 5" echo "# flashall // do all simulation with loops" setfield /kinetics/PLA2/AA CoInit 0 setfield /kinetics/PLA2/AA slave_enable 4 function do_flash (peakCa, duration) float peakCa float duration str filename /* Equilibrium at the basal state for 1 sec */ /* initialze */ setfield /kinetics/CaInput CoInit 0 setfield /kinetics/CaInput Co 0 setfield /kinetics/ramp kf 0 reset setclock 0 {finedt} setclock 1 {finedt} setclock 3 {plotdt} MAXTIME = 1 step {MAXTIME} -time /* t = 0 -> 0.1 */ /* Apply ramp Ca */ setclock 0 {finedt} setclock 1 {finedt} setclock 3 {plotdt} setfield /kinetics/ramp kf { {peakCa - Cabasal}/duration } MAXTIME = duration step {MAXTIME} -time /* Quit ramp Ca */ setclock 0 {finedt} setclock 1 {finedt} setclock 3 {plotdt} setfield /kinetics/CaInput CoInit 0 setfield /kinetics/CaInput Co 0 setfield /kinetics/ramp kf 0 MAXTIME = 1 step {MAXTIME} -time /* After Ca ramp */ setclock 0 {normdt} setclock 1 {normdt} setclock 3 {plotdt} MAXTIME = {100 - duration} step {MAXTIME} -time setclock 0 {roughdt} setclock 1 {roughdt} setclock 3 {plotdt} MAXTIME = 5900.1 step {MAXTIME} -time do_save_named_plot /graphs/conc2/AMPAR.Co {"simresult/TanakaFig9AwithoutNoise/TanakaFig9AflashpeakCa" @ {peakCa} @ "for" @ {duration} @ "sec_AMPAR.plot"} echo "saved as peakCa = " {peakCa} "and duration = " {duration} end function flashfine (duration) float duration do_flash 0 {duration} do_flash 0.1 {duration} do_flash 0.2 {duration} do_flash 0.3 {duration} do_flash 0.4 {duration} do_flash 0.5 {duration} do_flash 0.6 {duration} do_flash 0.7 {duration} do_flash 0.8 {duration} do_flash 0.9 {duration} do_flash 1 {duration} do_flash 1.1 {duration} do_flash 1.2 {duration} do_flash 1.3 {duration} do_flash 1.4 {duration} do_flash 1.5 {duration} do_flash 1.6 {duration} do_flash 1.7 {duration} do_flash 1.8 {duration} do_flash 1.9 {duration} do_flash 2 {duration} do_flash 2.1 {duration} do_flash 2.2 {duration} do_flash 2.3 {duration} do_flash 2.4 {duration} do_flash 2.5 {duration} do_flash 2.6 {duration} do_flash 2.7 {duration} do_flash 2.8 {duration} do_flash 2.9 {duration} do_flash 3 {duration} do_flash 3.1 {duration} do_flash 3.2 {duration} do_flash 3.3 {duration} do_flash 3.4 {duration} do_flash 3.5 {duration} do_flash 3.6 {duration} do_flash 3.7 {duration} do_flash 3.8 {duration} do_flash 3.9 {duration} do_flash 4 {duration} do_flash 4.1 {duration} do_flash 4.2 {duration} do_flash 4.3 {duration} do_flash 4.4 {duration} do_flash 4.5 {duration} do_flash 4.6 {duration} do_flash 4.7 {duration} do_flash 4.8 {duration} do_flash 4.9 {duration} do_flash 5 {duration} do_flash 5.1 {duration} do_flash 5.2 {duration} do_flash 5.3 {duration} do_flash 5.4 {duration} do_flash 5.5 {duration} do_flash 5.6 {duration} do_flash 5.7 {duration} do_flash 5.8 {duration} do_flash 5.9 {duration} do_flash 6 {duration} do_flash 6.1 {duration} do_flash 6.2 {duration} do_flash 6.3 {duration} do_flash 6.4 {duration} do_flash 6.5 {duration} do_flash 6.6 {duration} do_flash 6.7 {duration} do_flash 6.8 {duration} do_flash 6.9 {duration} do_flash 7 {duration} do_flash 7.1 {duration} do_flash 7.2 {duration} do_flash 7.3 {duration} do_flash 7.4 {duration} do_flash 7.5 {duration} do_flash 7.6 {duration} do_flash 7.7 {duration} do_flash 7.8 {duration} do_flash 7.9 {duration} do_flash 8 {duration} do_flash 8.1 {duration} do_flash 8.2 {duration} do_flash 8.3 {duration} do_flash 8.4 {duration} do_flash 8.5 {duration} do_flash 8.6 {duration} do_flash 8.7 {duration} do_flash 8.8 {duration} do_flash 8.9 {duration} do_flash 9 {duration} do_flash 9.1 {duration} do_flash 9.2 {duration} do_flash 9.3 {duration} do_flash 9.4 {duration} do_flash 9.5 {duration} do_flash 9.6 {duration} do_flash 9.7 {duration} do_flash 9.8 {duration} do_flash 9.9 {duration} do_flash 10 {duration} echo "I've done!" end function flashall flashfine 0.5 flashfine 1 flashfine 5 flashfine 15 flashfine 30 end