Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Welcome to the third in the series of training sessions on how to use the DAWN software suite. In the last two sessions we learned how to open data files, select and slice datasets for plotting and investigate the plotted data using the tools system. There will always be data processing and analysis procedures that are useful but not available in DAWN. To allow custom data processing procedures to be used with DAWN's loading and visualisation elements the python scripting interface can be used.

...

  • Expand the view menu by clicking the white down arrow at the top right of the plot view 
  • Select "Open New Plot Scripting" from the view menu
  • In the dialogue box that appears select "Python console", if python is not available see see Appendix I: Setting up python Python in DAWN
     

 

  • A python console should appear and run some configuration scripts
  • The console is now connected to the Dataset Plot view

...

Another useful feature of the plotting/python interface is the ability to draw region selections on the plot and then read these regions back into the python console. As of DAWN 1.4.1 regions of interest can be extracted from the plot without using the GUI bean. Methods such as dnp.plot.getroi() and dnp.plot.setroi() can now be used without needing a reference to the GUI bean.

Getting ROIs

Regions are stored in the GUI bean. The GUI holds a reference to the active (last clicked) ROI and a list of all ROIs.

...

nroi.spt = [100.,50.]

nroi.name = "My Roi" 

  • Add the new ROI to the ROI list, update the list in the GUI bean and push the bean to the plot:

...