This is the first in a series of training sessions to use the DAWN software suite. The aims of this tutorial are :

1. Running DAWN

Diamond Linux Workstations

On a Linux workstation within Diamond, type:

 

[user@workstation ~]$ module load dawn

Loading 64-bit Oracle instantclient, version 11.2
Loading 64-bit python, version 2.7.2
Loading 64-bit numpy, version 1.6.1
Loading 64-bit scipy, version 0.10.0
Loading the DLS compute cluster environment. Please report any issues to linux.manager@diamond.ac.uk

*****************************************************************
**        DAWN (Data Analysis WorkbeNch) module loaded         ** 
*****************************************************************
   To start the application, type "dawn &"
   For further options, type "dawn --help"
****************************************************************

[user@workstation ~]$ dawn &

Anywhere else...

Dawn does not need to be installed, it just needs to be unzipped and run.

Go to: http://www.dawnsci.org/ and head to the download section. Versions for Linux and Windows, x32 and x64 are available. A version for Mac is also available but not supported.

The download is a zip file containing Dawn. Extract the contents of the zip file to a sensible location (for example C:\Dawn). The executable file for Dawn can be found in the extracted folder (DawnDiamond-version number).

 

2. The Welcome Screen

The first time DAWN is started it opens with the welcome screen showing (if this is not the first time DAWN has started, it will start in the same configuration it was closed in, if this is the case, follow the next set of instructions to return to the welcome screen):

When using DAWN you can return to the welcome screen at any time by pressing the home button.

The Welcome screen contains lots of useful information on how to use DAWN, including links to the web page and youtube channel. DAWN is like a collection of different data analysis programs organised in Perspectives.

This should bring up a list of all the perspectives available in DAWN.

The tools this set of tutorials cover are:

Exercise 1. Click an icon to open one of the perspectives, then find the home button in the toolbar and click to return to the welcome screen. Click the perspectives panel to return to the list of perspectives.

3. Browsing Data

The goal of the first in this series of training sheets is to use the two generic data viewing perspectives (Data Browsing and DExplore) to visualize different types of data (images, surfaces, traces...) from different types of files (Nexus/hdf5, tiff, img....) and become comfortable with using and changing the versatile interface DAWN provides.

 

You will be greeted with a largely blank screen with lots of empty tabs, don't worry about that for now.

Opening A File

Find the Project Explorer tab on the left hand side of the screen (it should be the only one that isn't blank).

This opens the powder diffraction image for display.

The Project Explorer is like a favorites page for your data, you can link to folders of data on your local computer to this tab without making duplicates of the data.

Make a new data project

MyData should now be displayed in the Project Explorer

Data can also be opened directly from the file system using the File Navigator tab, or by dragging and dropping directly from a file explorer

Exercise 2. Use the File Navigator to open some data.

Exercise 3. Open some data by directly dragging it into the DAWN plot

Exercise 4. Add a folder to the Data Project by dragging the folder and dropping it in with the example data (choose to link rather than copy)

Editors and views - Plot/Text/Data/Tree

Now lets return to the diffraction image we have displayed.

On double-clicking the file some new tabs appeared and many of the previously blank views now show information. Before we dive in to opening and viewing different types of data lets take a minute to discuss some nomenclature that should make the rest of the tutorial more understandable.

Perspectives

The Data Browsing tool you are currently looking at (and all the other tools mentioned, like DExplore, Workflows....) are technically called Perspectives. In DAWN, a perspective is simply a collection of different tab views designed to help perform a certain task, be it to view and image, or write a python script. Many of these views appear in multiple perspectives and if you see a view in one perspective that looks the same as in another, there is a good chance they will work the same way.

The Editor

Most perspectives show an editor tab, one for each file open. The editor is the tab view that appears when you open a file (it has the name of the file at the top of the tab).  DAWN has different editors for images, nexus files, dat files, python scripts... many different things.  You don't need to worry about which editor you are looking at, DAWN automatically chooses the best editor for the type of file you want to open. (The name "Editor" is a bit odd considering the data files you open cannot be edited. When python source code or a workflow moml file is opened, on the other hand, these also appear in an editor and can be edited).

Views

Pretty much everything that is not an editor is a view. You can identify a view by the name it shows at the top of its tab.

Exercise 5. Locate the Editor and the Meta data, Value, Progress, and Console views in the Data Browsing perspectives, click on the tab to see what each view contains (most will be empty at this stage)

See how a new editor has appeared containing a blank plot and the Meta data view has changed to the Data view. The Data view contains a list of every data set found in the .dat file.

Take another look at the editor.  You should notices some tab pages at the bottom which say Plot, Text, Data and Info. Switch between these tabs to see what they show.

Dat File Editor

 

You should see a single trace plotted, as shown above.

Nexus File Editor

Nexus files (and HDF5 files) can contain many different data sets of different types, shapes and sizes.  The files are often shown as a tree, with different nodes containing different data or metadata information.

 
The Rapid2D/data data set has 4 dimensions [1,1,512,512]. Since two of these dimensions are 1 the data set is shown as a 2D image, which in this case is what we expect to see. Just because a data set is 2D (or greater) does not mean it is an image, what if we wanted to view this data as a trace?

 

Exercise 6. Change the plotting method using the actions in the Data view , then return to showing the 2D image.

Exercise 7. In the example data, go to the saxs folder and open more .nxs files and view the data inside. This folder contains nxs and h5 files, what do they each contain? Look at the size of the files, where does the data live? Where does the metadata live?

Customizing Perspectives

After using Dawn for a while, the screen can get quite busy. Its very easy to have lots of views open making it difficult to see the wood for the trees.

The user interface in DAWN is highly customizable. Any views you are not using can be closed or hidden. Important views can be maximized. Views you need can be opened, even if they are not part of the perspective. If you want a view to be part of a perspective you can make your own custom perspective with the view added.

Hopefully by now you should have made a horrible mess of the perspective. If not, try harder.



Exercise 8. Close the Console view. Bring it back using the Window menu instead of reseting the perspective.


If you find you are using a particular set of views in a perspective you can save that arrangement as your own bespoke perspective so it always resets to have your most used views where you expect them.

4. The Plot -  Basics

When DAWN opens and image it automatically displays a default plot and automatically adjusts the contrast/brightness of the image. The plot can be customized by using the settings action.

Navigating the plot

The above toolbar actions can be used to zoom and pan around the image.

Image tool bar actions

The view menu - Colormaps

There are more options for adjusting the image in the view menu

Trace tool bar actions

5. DExplore

On a basic level DExplore does most of the things the Data Browsing perspective does. Differences include:

 

Exercise 8. Open some of the data files used previously in this tutorial in DExplore. Plot different data sets, in different ways, and do some slicing.


There are some fundamental differences between the way the Data Browsing perspective and DExplore work. As time goes by and you learn to do more advanced things in DAWN the differences become more obvious. For basic data viewing either perspective should work fine.

6. Help and Cheatsheets

Exercise 9. Close DAWN and start it again, do you see the Welcome screen?

Congratulations you have made it to the end of the first tutorial, if you would like to learn more (without jumping ahead to the next tutorial), feel free to browse the help menu contents or look at the cheat sheet sections(Help-> Cheatsheets...) for more training on how to use DAWN.

Also don't miss the DAWN science YouTube Channel for video guides on using DAWN: http://www.youtube.com/user/DAWNScience

7. Feedback (optional)

The help menu in DAWN has a feedback form so you can alert us if DAWN crashes or behaves in an unexpected way.

If you like, send us a feedback (Title the summary DAWN TRAINING), telling us how you found the training worksheets (were they clear? Too much/Too little information?).  Feel free to tell us what kind of data you are interested in (images/traces/both) and what visualization and analysis tool you like/dislike and what you feel is missing.

Test Yourself

  1. Where do you get dawn on (a) A Diamond Linux workstation, (b) A windows PC
  2. What is the icon for the "Show Welcome Screen" toolbar action?
  3. Describe one way of adding a folder to the project explorer.
  4. What is a perspective?
  5. What is the difference between an editor and a view?
  6. What tabs would you find in a nexus editor that you wouldn't find in a dat file editor?
  7. What happens when you make a view a Fast View?
  8. How do you reset a perspective and what does it do?
  9. Name one colormap.
  10. What is the Icon for panning in a plot?
  11. Where can you change the color of a trace?

Appendix I - Refreshing Example Data

If you have no extra data or links to folders in your current example data, delete the folder (and remove project content from disk).