123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- #!/usr/bin/tclsh
- #ToDo
- # ShowWeights (without Tom)
- # ShowWeights at SetTrialNr (driven from simulation)
- # switch between facilitatory and normal inhibition (set default to normal)
- # WeightSum
- # switch between linear and quadratic
- # choose Stimulus Set (radio button)
- # ShowSelectivity
- package require Tk
- package require BWidget
- wm minsize . 350 400
- set SimDataDir $argv
- puts "SimDataDir=$SimDataDir"
- set SimulationName minimal
- set LibSimcontrolPath "$env(HOME)/prog/objsim/src"
- source "$LibSimcontrolPath/libsimcontrol.tcl"
- source "$env(HOME)/prog/objsim/scripts/getSimLayout.tcl"
- TestLibSimcontrol
- #SetSimDirAndFileNames som02
- set ::SimConfigFile ${::SimDataDir}backup_settings
- puts "Config file = $SimConfigFile"
- set ::SimDir "$::env(HOME)/prog/objsim/$::SimulationName/"
- set ::SimOptionsFile ${::SimDir}options_${::SimulationName}.cfg
- proc SetTrialNr {nr} {
- set ::TrialNr $nr
- ShowListWeights ${::LBname}
- }
- proc ShowSim {} {
- set ShowOptions {}
- if {$::SimOptions(NeuronType) == 0} {
- append ShowOptions ",CutSpikes=$::CutSpikePot "
- }
- set Command "csim_showsimspikes, dirname=\"$::SimDataDir\", /sec $ShowOptions \n"
- # set Command "csim_showsimspikes, dirname=\"$::SimDataDir\", /sec \n"
- puts $Command
- puts $::idl $Command
- }
- proc TestParaEntry {} {
- puts $::InputStrength
- puts $::LearnRate
- puts $::CheckVar
- }
- ####################StartOfMainProgram
- OpenIDL
- ReadSimConfigFile
- # pack [button .dummy -command "ReadIDL" -text "ReadIDL"]
- # pack [button .showsim -command "ShowSim" -text "ShowSim"]
- labelframe .but0 -width 1500 -height 100 -borderwidth 4 -relief sunken -text "SimControl" -padx 10 -pady 5
- pack .but0 -pady 10
- set curframe .but0
- # pack [button ${curframe}.test -command "ShowWM1" -text "ChangeWeightFile"] -side left
- # pack [button ${curframe}.test2 -command "ShowWM1" -text "ChangeWeightFile"] -side left
- #pack [button ${curframe}.change -command "ShowWM1" -text "ChangeWeightFile"] -side left
- frame ${curframe}.startstop
- pack ${curframe}.startstop -pady 3
- set curframe1 ${curframe}.startstop
- labelframe ${curframe}.setparameter -text "Set Simulation Parameters" -padx 5 -pady 3
- pack ${curframe}.setparameter -pady 5
- set curframe1 ${curframe}.setparameter
- set ResultsWindowName .simresultswin
- frame ${curframe}.results3 -borderwidth 1 -relief sunken
- pack ${curframe}.results3
- set curframe1 ${curframe}.results3
- pack [checkbutton ${curframe1}.show -text "Show Simulation Results" -variable VisibleSimResults -command [list ShowHideWin ${::ResultsWindowName} VisibleSimResults]] -side top
- ShowResultsWindow $ResultsWindowName
- set LayoutWindowName .simlayoutwin
- pack [checkbutton ${curframe1}.show2 -text "Show Network Layout" -variable VisibleSimLayout -command [list ShowHideWin ${::LayoutWindowName} VisibleSimLayout] ] -side top
- ShowLayoutWindow $LayoutWindowName $SimDataDir
- set OptionsWindowName .simoptionswin
- pack [checkbutton ${curframe1}.show3 -text "Show Options" -variable VisibleSimOptions -command [list ShowHideWin ${::OptionsWindowName} VisibleSimOptions] ] -side top
- ShowOptionsWindow $OptionsWindowName
- set SimOutputWindowName .simoutputwin
- pack [checkbutton ${curframe1}.show4 -text "Show Simulation Output " -variable VisibleSimoutputWindow -command [list ShowHideOutputWin ${::SimOutputWindowName} ::VisibleSimoutputWindow] ] -side top
- ShowSimoutputWindow $SimOutputWindowName
- ShowHideWin ${::SimOutputWindowName} ::VisibleSimoutputWindow
|