File: realtime.txt

package info (click to toggle)
brian 1.4.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, stretch
  • size: 23,436 kB
  • sloc: python: 68,707; cpp: 29,040; ansic: 5,182; sh: 111; makefile: 61
file content (25 lines) | stat: -rw-r--r-- 728 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
.. currentmodule:: brian

Realtime control
****************

A running Brian simulation can be controlled, for example using an IPython shell.
This can work either on a single computer, or over IP from another computer.
The process running the simulation calls something like::

	server = RemoteControlServer()

and the IPython shell calls::

	client = RemoteControlClient()

The shell can now execute and evaluate in the server process via::

	spikes = client.evaluate('M.spikes')
	i, t = zip(*spikes)
	plot(t, i, '.')
	client.stop()

Parameters can be changed as the simulation runs. For more details, see the
reference documentation for :class:`RemoteControlServer` and
:class:`RemoteControlClient`.