Versions Compared

Key

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

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.

...

  • Start DAWN, close all open files and switch to the DExplore perspective (if you don't remember how to do this, consult the previous tutorial pages)
  • Go to the Window menu, Preferences, type python in the filter box and select Interpreter - Python from the PyDev node
  • If no interpreter is shown go to Appendix I: Setting up Python in DAWN

  • When the python interpreter is configured, Open the pow_M99S5_1_0001.cbf used previously
  • Draw a box region of interest (ROI) on the plot

...

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:

...

  1. How do you set the default plot name using scisoftpy?
  2. What line of code would you type to get the third dataset from the data list in the data bean?
  3. What command can you use to create a dataset of random data?
  4. In the data bean, datasets are stored in a list. What are ROIs stored in, in the GUI bean?
  5. What other methods are there in the view menu to help with scripting?

...

Anchor

...

SettingUpPythonInDAWN
SettingUpPythonInDAWN
Appendix I: Setting up python in DAWN

  • If you are not already there go to the PyDev Python interpreter preferences:
  • Go to the Window menu, Preferences, type python in the filter box and select Interpreter - Python from the PyDev node

...