Changes for page Widget PhasePlane
Last modified by ldomide on 2023/03/08 17:28
From version 11.1
edited by ldomide
on 2023/01/09 19:47
on 2023/01/09 19:47
Change comment:
There is no comment for this version
To version 1.6
edited by teodoramisan
on 2023/01/03 12:52
on 2023/01/03 12:52
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
-
Attachments (0 modified, 0 added, 2 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. ldomide1 +XWiki.teodoramisan - Content
-
... ... @@ -4,9 +4,9 @@ 4 4 5 5 == Purpose == 6 6 7 -It is a Jupyter Widget intended for the visualization of the interactive phase-plane for TVB math models ([[https:~~/~~/docs.thevirtualbrain.org/api/tvb.simulator.models.html#module-tvb.simulator.models>>https://docs.thevirtualbrain.org/api/tvb.simulator.models.html#module-tvb.simulator.models]]).7 +It is a Jupyter Widget intended for the visualization of the interactive phase-plane. 8 8 9 -It provides **//sliders//**for setting:9 +It provides sliders for setting: 10 10 11 11 * ((( 12 12 The value of all parameters of the Model. ... ... @@ -21,7 +21,7 @@ 21 21 The noise strength, if a stochastic integrator is specified. 22 22 ))) 23 23 24 -and **//dropdown lists//**for selecting:24 +and dropdown lists for selecting: 25 25 26 26 * ((( 27 27 Which state-variables to show on each axis. ... ... @@ -42,7 +42,7 @@ 42 42 43 43 == Requirements and installation == 44 44 45 -Before installing the tvb-widgets library containing the PhasePlane widget, the following python librar yand Jupyter extensions should be installed:45 +Before installing the tvb-widgets library containing the PhasePlane widget, the following python libraries and Jupyter extensions should be installed: 46 46 47 47 * **Libraries:** 48 48 ** [[ipympl>>https://github.com/matplotlib/ipympl#installation]] ... ... @@ -61,47 +61,3 @@ 61 61 ((( 62 62 pip install tvb-widgets 63 63 ))) 64 - 65 -== API usage == 66 - 67 -First, the correct matplotlib backend must be set, which enables the interaction with the PhasePlane widget, by running the following command: 68 - 69 -(% class="box" %) 70 -((( 71 -%matplotlib widget 72 -))) 73 - 74 -Then, the PhasePlaneWidget (from the tvb-widgets API), the package lab (from tvb simulator) and the display function should be imported: 75 - 76 -(% class="box" %) 77 -((( 78 -{{{from tvbwidgets.api import PhasePlaneWidget 79 -from tvb.simulator.lab import * 80 -}}} 81 - 82 -{{{from IPython.core.display_functions import display}}} 83 -))) 84 - 85 -The widget can be initialized with the required parameters (Model and Integrator) as it shows below: 86 - 87 -(% class="box" %) 88 -((( 89 -{{{w = PhasePlaneWidget(model=models.Generic2dOscillator(), 90 - integrator=integrators.HeunDeterministic())}}} 91 -))) 92 - 93 -Finally, to display and interact with the PhasePlane widget, the **//get_widget//**// //method is used inside the //**display **//function: 94 - 95 -(% class="box" %) 96 -((( 97 -{{{display(w.get_widget(plot_size=(6,7))) 98 -}}} 99 -))) 100 - 101 -The outcome will be something like in the image bellow. 102 -You can explore the inputs in the TAB on the left, and click on the canvas in the right to select initial conditions for evaluating the Model equations from that point onward (no structural connectivity, as is the eq are solved for a single node, in isolation). 103 - 104 -[[image:Screenshot 2023-01-09 at 20.39.52.png||alt="PhasePlaneWidget" style="float:left"]] 105 - 106 - 107 -[[image:Screenshot 2023-01-09 at 20.42.00.png||alt="PhasePlaneDifferentModel" style="float:left"]]
- Screenshot 2023-01-09 at 20.39.52.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.ldomide - Size
-
... ... @@ -1,1 +1,0 @@ 1 -932.0 KB - Content
- Screenshot 2023-01-09 at 20.42.00.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.ldomide - Size
-
... ... @@ -1,1 +1,0 @@ 1 -703.9 KB - Content