You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 24 Next »

IMASViz is a tool developed within Integrated Modelling  Analysis Suite (IMAS) for the purposes of visualizing static and dynamic IMAS data, stored within IMAS Interface Data Structures (IDS). While the tool itself is already available for use it is still under active development, and various features, GUI improvements etc. are still being implemented. 

The tool has been migrated recently to Python 3 and utilizes the next Python packages:

  • matplotlib - provides plotting functionalities,
  • wxPython - provides graphical user interface customization, and
  • wxmPlot - provides plot customization.

The tool is available on ITER git repository (access permission is required) under Visualization/VIZ project.

Direct link to the repository: https://git.iter.org/projects/VIS/repos/viz/browse


The tutorial below is executed on the Gateway.

1.1.1.
Loading required modules for executing IMASViz

In a new terminal, execute the following command in order to load the required modules for using IMAS_VIZ:

module load cineca imasenv/3.15.1 imas-viz 

1.1.2. Getting started: Running IMASViz

In the previously opened terminal, simply type the following command:

viz


The main GUI interface window of IMAS_VIZ should display, similar to the figure below:

IMASViz main GUI

1.1.3. Loading 'magnetics' IDS from an IMAS local data source example

In the previously opened IMSViz main GUI interface:

  1. Select the tab 'Local data source'
  2. Enter the following parameters as shown in the figure below:

    User name: g2lfleur
    IMAS database name: test
    Shot number: 52344
    Run number: 0


    The data source is a pulse file located in the ~public/imasdb/test directory of user g2lfleur. 


  3. Click button Open
    A navigation tree should open with a list of all IDSs. Available IDSs for the given shot are displayed in blue.
    The tree will allow browsing data for the specific shot number which is displayed by the root node (IDSs(52344)).

  4. Right click on 'magnetics' IDS and select the command 'Get magnetics data (default to occurrence 0)'
    The 'magnetics' IDS is displayed as new nodes in the tree. Nodes of an IDS are organized according to the IMAS
    data dictionnary. 

1.1.4. Plotting a 1D array

  1. Navigate through the 'magnetics' IDS and search for the node 'ids.magnetics.flux_loop[0].flux.data'



  2. Right-click on the node 'ids.magnetics.flux_loop[0].flux.data'
  3. From the pop-up menu, select the command 'Plot ids.magnetics.flux_loop[0].flux.data'
    The plot should display as in the image below.

 

Each plot window has a menu for printing (File menu), saving and exporting data (File menu) or customizing the plot (Options menu).

Any part of the plot can be zoom-in using the mouse (Options menu to zoom out).

1.1.5.
Adding a 1D plot to an existing figure

  1. From the previous navigation tree, navigate to the node 'ids.magnetics.flux_loop[16].flux.data'
  2. Right-click on the node 'ids.magnetics.flux_loop[16].flux.data'
  3. From the pop-up menu, select the command 'Add plot to existing figure' and 'Figure0' in the attached submenu
    The plot should display as in the image below.

1.1.6. Comparing foat 1D arrays between 2 shots

  1. Open the shot 52682

    User name: g2lfleur
    IMAS database name: test
    Shot number: 52682
    Run number: 0
  2. Load occurrence 0 of 'magnetics' IDS

  3. Navigate through the 'magnetics' IDS of shot 52682 and search for the node 'ids.magnetics.flux_loop[0].flux.data'

  4. Right-click on the node 'ids.magnetics.flux_loop[0].flux.data'
  5. From the pop-up menu, select the command 'Add plot to existing figure' and 'Figure0' in the attached submenu
    The plot should display as in the image below. 


1.1.7. Selecting 1D arrays, plotting the selection

  1. Navigate the tree of shot 52682 and search for the node 'ids.magnetics.bpol_probe[0].field.data'
  2. Right-click on the node 'ids.magnetics.bpol_probe[0].field.data'
  3. From the pop-up menu, select the command 'Select ids.magnetics.bpol_probe[0].field.data'
    The selected node turns into red.
  4. Navigate the tree of shot 52682 and search for the node 'ids.magnetics.bpol_probe[9].field.data'
  5. Right-click on the node 'ids.magnetics.bpol_probe[9].field.data'
  6. From the pop-up menu, select the command 'Select ids.magnetics.bpol_probe[9].field.data'
    The selected node turns into red.



  7. Right-click one of the selected nodes
  8. From the pop-up menu, select the command 'Plot all selected signals to a new figure'



Selections list are proper to each shot navigation tree; selections list are not concatenated between different shots. 

1.1.8. Plotting 1D arrays as a function of coordinate1 along the time axis

  1. Load the equilibrium IDS from shot 52682
  2. Navigate the tree of shot 52682 and search for the node 'ids.equilibrium.time_slice[0].profiles_1d.f'



  3. Click on the + symbol  at the right of node 'ids.equilibrium.time_slice[0].profiles_1d.f' to expand it.
    You should get the image below. Note that coordinate1 = 'ids.equilibrium.time_slice[itime].profiles_1d.psi'
    for this FLT_1D data array.



  4. Right-click now on the node 'ids.equilibrium.time_slice[0].profiles_1d.f'
  5. From the pop-up menu, select the command 'Plot ids.equilibrium.time_slice[0].profiles_1d.f to a new figure'
    The plot should display as in the image below.

    The data are represented as a function of coordinate1 for the first time slice.




  6. Click on the time slider and release the mouse at index value 41
    The time slider allows you to move along the time axis. You should obtain the image below.

1.1.9. Plotting 1D arrays as a function of the time along coordinate1

  1. From the previous shot 52682 tree, right click now the node 'ids.equilibrium.time_slice[0].profiles_1d.f'
  2. From the pop-up menu, select the command 'Plot ids.equilibrium.time_slice[0].profiles_1d.f as a function of time'
    The plot should display as in the image below.

    The data are represented as a function of time for a given coordinate1 value.



  3. Click on the time slider and release the mouse at index value 19.
    The slider allows you to move along the coordinate1. You should obtain the image below.
    The title of the plot gives the coordinate1 value which is selected by the slider. The label of the
    plot is the short name of the quantity which has been selected in the tree (equilibrium.time_slice[itime] has
    been removed from the label).

1.1.10. Creating a multiple plots configuration

  1. Load the magnetics IDS (see above 'Loading 'magnetics' IDS from an IMAS local data source example')
  2. Navigate through the 'magnetics' IDS of shot 52682 and select the node 'ids.magnetics.flux_loop[0].flux.data'
  3. Navigate through the 'magnetics' IDS of shot 52682 and select the node 'ids.magnetics.flux_loop[5].flux.data'
  4. Navigate through the 'magnetics' IDS of shot 52682 and select the node 'ids.magnetics.flux_loop[15].flux.data'
  5. Navigate through the 'magnetics' IDS of shot 52682 and select the node ''ids.magnetics.bpol_probe[0].field.data'
  6. Navigate through the 'magnetics' IDS of shot 52682 and select the node ''ids.magnetics.bpol_probe[40].field.data'
  7. Navigate through the 'magnetics' IDS of shot 52682 and select the node ''ids.magnetics.bpol_probe[80].field.data'
    At this stage we have 6 FLT_1D arrays selected

    Currently, up to 6 plots only can be plotted simultaneously. This limitation will be removed in the future.


  8. Right-click on one of the selected node
  9. From the pop-up menu, select the command 'Plot all selected signals to a multiplot frame'




  10. In the menu, select Options/Save plots configuration and type 'Magnetics_flux_loop_bpol_probes' as a name for the configuration, click the OK button



    The configuration has been saved as a file in your $HOME/.imasviz directory (i.e Magnetics_flux_loop_bpol_probes.cfg file)

1.1.11. Applying a multiple plots configuration to a new shot

  1. Open the shot 52344 if it is not already opened

    User name: g2lfleur
    IMAS database name: test
    Shot number: 52344
    Run number: 0
  2. From the Options menu of the navigation tree of shot 52344, select the command 'Apply multiple plots configuration'



  3. Click on the 'Apply configuration button'
    The new multiplot should dispalyed as the image below.





The time taken by the command 'Apply multiple plots configuration' is short (few seconds) if all the required IDSs have been loaded previously. If not, the command needs to load 
all IDSs (from which the data to be plotted are fetched) before to plot the data.
The plots order depends on the order in which the data selection has been performed. First selected data will be the first plots in the multiplot window.

1.1.12. Executing the equilibrium overview plugin

  1. Open the shot 52344 if it is not already opened
  2. Right-click the equilibrium node while maintenaing the shift button pressed
  3. The list of available plugins should display

    Currently, only the equilibrium overview plugin is available
  4. Execute the command 'Equilibrium overview...' to launch the plugin
  5. Click the 'Run' button to scan over the different equilibrium time slices




  • No labels