Wywołanie okienka ShapePlot w hoc
objref ShapeWindow
proc shape(){
ShapeWindow = new PlotShape() ShapeWindow.show(0)
ShapeWindow.exec_menu("Shape Plot") ShapeWindow.scale(-1,2)
fast_flush_list.append(ShapeWindow) //adding object to list of objects whose elements are notified at every step
}
PLOT_SHAPE = 1 if (PLOT_SHAPE) { shape()
}
Wywołanie:
Interfejs graficzny
xpanel("Model parameters") //Title of a new panel
variable_domain(&IAF_tau, 0, 1e99) //domain limits for the variable xvalue("Tau (ms)","IAF_tau", 1,"settau(IAF_tau)", 0, 0 )
//”prompt”, “variable”, 0/1 – no/yes checkbox, “action”,
// 0 – button appearance , 0/1 – if true, the address of variable (pointer) is used xvalue("Connection Weight","w", 1,"weight(w)", 0, 0 )
xvalue("Tstop","tstop", 1,"", 0, 0 )
xbutton("go", "go()") //the “prompt” on the button and the “action” to execute xbutton("quit","quit()")
//xpanel() //closing command
xpanel(250,300) //optionally, position of the new panel Przykladowy interfejs graficzny do modyfikacji parametrów:
IAF.tau, CONNECTION_WEIGHT i tstop:
Interfejsy graficzne cd
Wewnatrz programu (np. moduł CreateNetwork) musi zawierac procedury weight() i settau()
IAF_tau = IAF_TAU proc settau() { local i
for i=0, NumberCells-1 { neuron[i].IAF.tau = $1 }
}
w = CONNECTION_WEIGHT proc weight() { local i
for i=0, NumberConnections-1 { CellConnection[i].weight = $1 }
}
Kontrolowanie położenia okienek
objref g1
proc plotraster() {
g1 = new Graph(0)
g1.view(tstart, 0, tstop, NumberCells, 250, 20, 300, 200) idvec.mark(g1, timevec, "|")
}
Aby umiescic okienko graficzne w okreslonym miejscu na ekranie nalezy go wywołac z argumentem ‘0’, a nastepnie użyć
polecenia .view i podac zakresy, wspolrzedne i rozmiar:
xmin, ymin, xmax, ymax, x_position, y_position, x_size, y_size.
Np. dla rasterplotu:
Rozszerzenie modelu
Siec składająca się ze 100 neuronów IAF pobudzających i 25 hamujących.