This is the final session in the DAWN Training course. By now you should be comfortable with using DAWN to view various different types of data, customising the look of plots by changing things like the title, image colour maps, trace line style, using the plotting tool system and some basic python scripting.  The aim of the final session is for the trainees to bring the own data and explore it using DAWN. This tutorial sheet covers the most common "extras" in DAWN, not included in the previous sessions.

These extras include:

 

This tutorial is not designed to be worked through in order! Pick the section you find most useful and go for it!

Workflows

Workflows are a powerful labview-esque visual programming language. There are good guides on how to use Workflows in the DAWN cheatsheets, this section of the tutorial will guide you through one of the cheatsheets, allowing the others to be explored during the class or at your leisure.

If, after this brief introduction, the Workflows are of interest to you, carry on with the Workflow Cheatsheets.  The instructors in the class will be happy to help with any problems you might have.

Running Scripts in the Python Perspective

This section is a quick guide to running scripts in the python perspective and using debug mode.

Running Scripts

The first step in running Python scripts is to open the Python Perspective, set up a new console, create a new PyDev project and you are ready to go.
 



The scisoftpy module doesn't load nexus data until it is needed and only loads what it needs. The [...] tells it to load the complete dataset into a numpy array.

import scisoftpy as dnp

import numpy as np

energy = dnp.io.load('C:\\DAWNWORKSPACELOCATION\\data\\examples\\MoKedge_1_15.nxs')['/entry1/counterTimer01/Energy'][...]

i0 =dnp.io.load('C:\\DAWNWORKSPACELOCATION\\data\\examples\\MoKedge_1_15.nxs')['/entry1/counterTimer01/I0'][...]

it= dnp.io.load('C:\\DAWNWORKSPACELOCATION\\data\\examples\\MoKedge_1_15.nxs')['/entry1/counterTimer01/It'][...]

ratio = i0/it

ln_ratio = np.log(ratio)

dnp.plot.plot(energy,ln_ratio)

If you just want to run a small section of the code, highlighting it and pressing Ctrl-Alt-Enter will send the highlighted lines to the console.

Debug Mode

Debugging allows you to stop the running of a script at specific points to check everything is proceeding as expected.  This is very useful for finding the cause of incorrect output.

The layout of DAWN will change to the debugging perspective.

The variable ratio has not been created yet, the debugger stopped the script just before this line was executed.

The interactive console and variables view are really useful for developing scripts and fixing broken code.

Experiment with writing scripts to analyse data (either the example data or your own), the instructors in the class will be happy to help with any questions/problems you might have.

HDF5 Stack To Movie

This section demonstrates the use of the dataset conversion wizard in DAWN to convert from a HDF5 image stack into a movie avi file.

None of the example files shipped with DAWN are suitable for this section so please use your own data or ask the instructors for an appropriate file.

After clicking finish a progress bar will appear on the wizard, when the wizard is finished the avi movie file should appear in the chosen output folder.

The End?

Congratulations, you have reached the end of the DAWN training sessions! You should now be familiar with most of the general data visualisation and analysis features in the current version of DAWN.

Please keep in mind these sheets for future reference, it may also be worth checking periodically for updates and new features as new versions of DAWN are released.

Thank you for participating in this training series, if you have any feedback please use the feedback form in the DAWN help menu, giving the feedback the title "Dawn Training".