Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Launch IMASViz tool as explained in section 1. Getting Started
  2. From the main GUI, select the Scripting tab. An IMASViz embedded Python3 Shell will open.




  3. In Scripting window write the following code:

    Code Block
    api = Browser_API()
    datasourceFactory = DataSourceFactory()
    datasource = datasourceFactory.create(52682,0,'g2lfleur','test','NATIVE')
    Warning

    When typing api = Browser_API(), do not forget the parenthesis at the end of the command! No error will be displayed, however, other following commands (using api object) will fail!

    Tip
    While editing code in the Script window, you can recall a command by pressing CTRL button + UP ARROW once or several times to get previously edited commands.


    By running this code a data source object, attached to the shot 52682 in the test database of user g2lfleur, will be created.

     

...

  1. Create a multiplot configuration using the GUI (see tutorial, 5. Scripting (advanced)3. Plotting 1D arrays) with the name 
    Magnetics_flux_loop_bpol_probes

  2. Run the following code:

    Code Block
    api = Browser_API()
    datasourceFactory = DataSourceFactory()
    datasource = datasourceFactory.create(52344,0,'g2lfleur','test','NATIVE')
    view = api.CreateDataTree(datasource)
    multiPlotConfiguration = api.GetMultiplotConfigurationPath('Magnetics_flux_loop_bpol_probes')
    api.ApplyMultiPlotConfiguration(view, multiPlotConfiguration )


    An image similar to the one below should be displayed.

...