//genesis initialize.g /* functions defined in this script ============================================================================= FUNCTION NAME ARGUMENTS ============================================================================= loadgraphics ============================================================================= */ // ========================================================================== // initiate graphics at beginning of simulation // ========================================================================== function loadgraphics // activate XODUS // give it color xcolorscale hot // ===================================================== // create main control panel // ===================================================== create xform /output/main_control [489,5,340,125] -title \ "CPG--by S. Crook" pushe /output/main_control create xbutton reset [3%,20,30%,25] -script reset -title RESET create xtoggle overlay [35%,20,30%,25] -title "OVERLAY" -script \ "overlaytoggle " create xbutton stop [67%,20,30%,25] -title STOP -script stop create xbutton quit [3%,47,30%,25] -title QUIT -script \ "quitbutton " create xbutton help [35%,47,30%,25] -title HELP -script \ "xshow /helpmenu" create xbutton defaults [67%,47,30%,25] -title DEFAULTS -script \ "resetdefaults" makeconfirm quit "Quit?" "quit" "cancelquit " 500 400 create xdialog step [3%,74,46%,30] -script "stepbutton " \ -title "STEP (msec)" -value 300 create xdialog stepsize [51%,74,46%,30] -title "dt (msec)" -script \ "setstepsize " -value {getclock 0} // write positive Vm to disk create asc_file /VmL1 setfield /VmL1 flush 1 leave_open 1 useclock /VmL1 1 addmsg /L1/soma /VmL1 SAVE Vm create asc_file /VmR1 setfield /VmR1 flush 1 leave_open 1 useclock /VmR1 1 addmsg /R1/soma /VmR1 SAVE Vm create asc_file /VmL2 setfield /VmL2 flush 1 leave_open 1 useclock /VmL2 1 addmsg /L2/soma /VmL2 SAVE Vm create asc_file /VmR2 setfield /VmR2 flush 1 leave_open 1 useclock /VmR2 1 addmsg /R2/soma /VmR2 SAVE Vm pope xshow /output/main_control // ====================================================== // create graphics, settings, and connection toggle forms // ====================================================== create xform /output/graphics [5,5,100,145] -title Graphs xshow /output/graphics create xform /output/settings [125,5,100,145] -title Settings xshow /output/settings create xform /output/connections [245,5,100,145] -title Connections xshow /output/connections create xform /output/inputs [365,5,100,145] -title Inputs xshow /output/inputs end