Changes for page Widget PSE
Last modified by teodoramisan on 2023/07/21 14:55
From version 6.1
edited by teodoramisan
on 2023/03/24 16:05
on 2023/03/24 16:05
Change comment:
There is no comment for this version
To version 2.1
edited by teodoramisan
on 2023/03/24 15:34
on 2023/03/24 15:34
Change comment:
Uploaded new attachment "launch.png", version {1}
Summary
-
Page properties (3 modified, 0 added, 0 removed)
-
Attachments (1 modified, 0 added, 1 removed)
-
Objects (0 modified, 0 added, 2 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,0 @@ 1 -Widget PSE - Parent
-
... ... @@ -1,1 +1,0 @@ 1 -Collabs.tvb-widgets.WebHome - Content
-
... ... @@ -1,94 +1,0 @@ 1 -== Widget PSE == 2 - 3 - 4 -Source code: [[https:~~/~~/github.com/the-virtual-brain/tvb-widgets>>https://github.com/the-virtual-brain/tvb-widgets]] 5 - 6 -== **Purpose** == 7 - 8 - 9 -It is composed of two separate Jupyter Widgets(PSE Launcher and PSE Visualizer) intended for the visualization of launching custom simulations. The launcher works locally for now, but in the future a HPC launch will be available. 10 - 11 -The simulation can be customized by: 12 - 13 -* Getting a list of connectivities given as API 14 -* Setting up parameters and ranges 15 -* Selecting multiple metrics 16 - 17 -== **Inputs** == 18 - 19 -* PSELauncher(Simulator, List_of_Connectivities) 20 -* PSEVisualizer(Filename), the file will contain all the customized parameters from the launcher 21 - 22 -== **Requirements and installation** == 23 - 24 -Before installing the tvb-widgets library containing the PSE widgets, the following python library and Jupyter extensions should be installed: 25 - 26 -* Libraries 27 -** [[plotly>>https://plotly.com/python/getting-started/#installation]] 28 -* Extensions 29 - 30 -(% class="box" %) 31 -((( 32 - jupyter labextension install @jupyter-widgets/jupyterlab-manager 33 - 34 - jupyter labextension install jupyter-matplotlib 35 -))) 36 - 37 -Then, to install the tvb-widgets library, just type: 38 - 39 -(% class="box" %) 40 -((( 41 -pip install tvb-widgets 42 -))) 43 - 44 -== **API usage ** == 45 - 46 -First, the correct matplotlib backend must be set, which enables the interaction with the PSE widgets, by running the following command: 47 - 48 -(% class="box" %) 49 -((( 50 -%matplotlib widget 51 -))) 52 - 53 - Then, the PSELauncher and PSEWidget(from the tvb-widgets API) and the package lab(from tvb simulator) should be imported: 54 - 55 -(% class="box" %) 56 -((( 57 -from tvbwidgets.api import PSELauncher, PSEWidget 58 -from tvb.simulator.lab import * 59 -))) 60 - 61 - The launcher widget can be initialized with the required parameters (simulator and the list of connectivities) as it shows below: 62 - 63 -(% class="box" %) 64 -((( 65 -sim = simulator.Simulator(connectivity = connectivity.Connectivity.from_file()) 66 -conn_66 = connectivity.Connectivity.from_file("connectivity_66.zip") 67 -conn_68 = connectivity.Connectivity.from_file("connectivity_68.zip") 68 -conn_76 = connectivity.Connectivity.from_file() 69 -launch = PSELauncher(sim, [conn_66, conn_68, conn_76]) 70 -))) 71 - 72 -The outcome will be something like in the image bellow. 73 -You can create a customized simulation by choosing different values for parameters, by setting ranges for them and by selecting the metrics for the simulation. 74 - 75 -[[image:setup_parameters.png||alt="setup_parameters"]] 76 - 77 -Then, a file name has to be inserted in the indicated box(for storing the data) and as a last set-up, a launch type has to be chosen. 78 - 79 -[[image:launch.png||alt="launch"]] 80 - 81 -A file with the name you specified will be generated. 82 - 83 -Then, the PSEVisualizer can be called with the required parameter(file_name) as it shows below: 84 - 85 -(% class="box" %) 86 -((( 87 -pse = PSEWidget("test.h5") 88 -))) 89 - 90 - The outcome will be something like in the image bellow. 91 - 92 - There will be a representation for every metric that was chosen before, in the launcher. The widget has some features for the type of visualization, the change of color and the option for choosing between metrics. 93 - 94 -[[image:result.png||alt="result"]]
- launch.png
-
- Size
-
... ... @@ -1,1 +1,1 @@ 1 -2 36.9KB1 +257.6 KB - Content
- result.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.teodoramisan - Size
-
... ... @@ -1,1 +1,0 @@ 1 -893.5 KB - Content
- XWiki.DocumentSheetBinding[0]
-
- Sheet
-
... ... @@ -1,1 +1,0 @@ 1 -Collaboratory.Apps.Article.Code.ArticleViewSheet
- XWiki.DocumentSheetBinding[1]
-
- Sheet
-
... ... @@ -1,1 +1,0 @@ 1 -Collaboratory.Apps.Article.Code.ArticlePreviewSheet