simeval_minimal.tcl 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. #!/usr/bin/tclsh
  2. #ToDo
  3. # ShowWeights (without Tom)
  4. # ShowWeights at SetTrialNr (driven from simulation)
  5. # switch between facilitatory and normal inhibition (set default to normal)
  6. # WeightSum
  7. # switch between linear and quadratic
  8. # choose Stimulus Set (radio button)
  9. # ShowSelectivity
  10. package require Tk
  11. package require BWidget
  12. wm minsize . 350 400
  13. set SimDataDir $argv
  14. puts "SimDataDir=$SimDataDir"
  15. set SimulationName minimal
  16. set LibSimcontrolPath "$env(HOME)/prog/objsim/src"
  17. source "$LibSimcontrolPath/libsimcontrol.tcl"
  18. source "$env(HOME)/prog/objsim/scripts/getSimLayout.tcl"
  19. TestLibSimcontrol
  20. #SetSimDirAndFileNames som02
  21. set ::SimConfigFile ${::SimDataDir}backup_settings
  22. puts "Config file = $SimConfigFile"
  23. set ::SimDir "$::env(HOME)/prog/objsim/$::SimulationName/"
  24. set ::SimOptionsFile ${::SimDir}options_${::SimulationName}.cfg
  25. proc SetTrialNr {nr} {
  26. set ::TrialNr $nr
  27. ShowListWeights ${::LBname}
  28. }
  29. proc ShowSim {} {
  30. set ShowOptions {}
  31. if {$::SimOptions(NeuronType) == 0} {
  32. append ShowOptions ",CutSpikes=$::CutSpikePot "
  33. }
  34. set Command "csim_showsimspikes, dirname=\"$::SimDataDir\", /sec $ShowOptions \n"
  35. # set Command "csim_showsimspikes, dirname=\"$::SimDataDir\", /sec \n"
  36. puts $Command
  37. puts $::idl $Command
  38. }
  39. proc TestParaEntry {} {
  40. puts $::InputStrength
  41. puts $::LearnRate
  42. puts $::CheckVar
  43. }
  44. ####################StartOfMainProgram
  45. OpenIDL
  46. ReadSimConfigFile
  47. # pack [button .dummy -command "ReadIDL" -text "ReadIDL"]
  48. # pack [button .showsim -command "ShowSim" -text "ShowSim"]
  49. labelframe .but0 -width 1500 -height 100 -borderwidth 4 -relief sunken -text "SimControl" -padx 10 -pady 5
  50. pack .but0 -pady 10
  51. set curframe .but0
  52. # pack [button ${curframe}.test -command "ShowWM1" -text "ChangeWeightFile"] -side left
  53. # pack [button ${curframe}.test2 -command "ShowWM1" -text "ChangeWeightFile"] -side left
  54. #pack [button ${curframe}.change -command "ShowWM1" -text "ChangeWeightFile"] -side left
  55. frame ${curframe}.startstop
  56. pack ${curframe}.startstop -pady 3
  57. set curframe1 ${curframe}.startstop
  58. labelframe ${curframe}.setparameter -text "Set Simulation Parameters" -padx 5 -pady 3
  59. pack ${curframe}.setparameter -pady 5
  60. set curframe1 ${curframe}.setparameter
  61. set ResultsWindowName .simresultswin
  62. frame ${curframe}.results3 -borderwidth 1 -relief sunken
  63. pack ${curframe}.results3
  64. set curframe1 ${curframe}.results3
  65. pack [checkbutton ${curframe1}.show -text "Show Simulation Results" -variable VisibleSimResults -command [list ShowHideWin ${::ResultsWindowName} VisibleSimResults]] -side top
  66. ShowResultsWindow $ResultsWindowName
  67. set LayoutWindowName .simlayoutwin
  68. pack [checkbutton ${curframe1}.show2 -text "Show Network Layout" -variable VisibleSimLayout -command [list ShowHideWin ${::LayoutWindowName} VisibleSimLayout] ] -side top
  69. ShowLayoutWindow $LayoutWindowName $SimDataDir
  70. set OptionsWindowName .simoptionswin
  71. pack [checkbutton ${curframe1}.show3 -text "Show Options" -variable VisibleSimOptions -command [list ShowHideWin ${::OptionsWindowName} VisibleSimOptions] ] -side top
  72. ShowOptionsWindow $OptionsWindowName
  73. set SimOutputWindowName .simoutputwin
  74. pack [checkbutton ${curframe1}.show4 -text "Show Simulation Output " -variable VisibleSimoutputWindow -command [list ShowHideOutputWin ${::SimOutputWindowName} ::VisibleSimoutputWindow] ] -side top
  75. ShowSimoutputWindow $SimOutputWindowName
  76. ShowHideWin ${::SimOutputWindowName} ::VisibleSimoutputWindow