DAVE is an integrated environment for the reduction, visualization and analysis of inelastic neutron scattering data. It is built using IDL (Interactive Data Language) from ITT Visual Information Solutions (formally Research Systems, Inc.) which is a cross-platform application development tool with built-in graphics. All efforts have been made to ensure that DAVE is supported on Linux, Windows and MacOS X. It is available at no cost to users in two forms. The first is as a binary executable with an embedded IDL runtime license which can be used by anyone running on any of the three supported operating systems. In addition, for those who have an IDL development license, the complete source code for DAVE is also available.
This chapter is intended to present a gentle introduction to some of the key features in
DAVE by running through an illustrative tutorial session. The tutorial will touch on some
of the basic functionality that will be encountered during a typical use of the software.
In most cases a user would normally need to load one or more datasets, whether raw or
reduced, from a data file. Then they may wish to view the data, perform basic arithmetic
operations on them or more advanced analysis. At some point, it may be necessary to: save a
dataset after it has been modified in some way, generate an exported image in one of the
many supported image formats, print a visualization, save the entire session into a project
file and return to it at a later time. This tutorial will briefly describe how to quickly
perform these tasks.
The Main Application Window
Follow the instructions outlined in Obtaining and Installing DAVE to install and launch DAVE for your specific platform. After launch, the following main application window will be displayed.
![]() | |
DAVE: main application window |
The main window is a standard widget application with menus. It has a simple layout that is designed to provide easy access to the datasets that are currently loaded into the program, a means of quickly visualizing the data and a list of existing visualizations that have been created. The main interface can therefore be viewed in terms of the following components:
First, the DAVE Working directory needs to be introduced. The working directory is used by DAVE to read or write processed or reduced data. By default, the working directory would be set to your home directory as defined by your operating system. For example, if your computer username is "myUserName" then on Linux your working directory would typically default to "/home/myUserName" and on Windows to "C:\Documents and Settings\myUserName". However, you can alter the default working directory by modifying your application preferences. Use the
File => Preferences...
menu option to initiate the action. The Preferences dialog is displayed which contains a tree widget to the left and a property sheet to the right.
![]() |
![]() |
Preferences dialog: default values | Preferences dialog: modified |
In the tree widget, make sure the General DAVE Settings option is selected in the left pane tree widget. In the property sheet, various properties and their current settings are shown. To change the default value for the working directory, click on the Working directory field. A button with a bitmap should appear to the right of the field. Clicking on this button should bring up a floating Edit... button - click on it as well to launch a directory browser from which you can select a new working directory. In my case, I selected the directory as indicated in the modified Preferences dialog above. Click on the OK button in the directory browser and then in the Preferences dialog to accept the change. A full description of the other configurable preferences are described later.
Loading Data
Data to be loaded into DAVE fall into one of two general categories - raw or reduced data. Raw data is typically instrument specific and is best handled by the data reduction module for that instrument, if available. Reduced or processed data can be loaded as long as it is exist in one of the file formats
that is supported. Supported file formats include ASCII (column, group, SPE) and DAVE (.dave).
For the purposes of this tutorial, we will make use of examples data files that are included as part of DAVE. These files are also available from the DAVE download page. Download he34_x05.dat and he34_bkgd.dat or copy them from the auxiliary directory located in your DAVE installation directory. These files should be placed in your DAVE working directory as defined in the preferences dialog described above.
To load a supported data from a supported file format, you have to use the appropriate menu entry underneath the Data Input/Output top-level menu. To load data from an ASCII (column, group or SPE) file, use the following procedure:
![]() |
File selection dialog |
If the steps outlined earlier were followed, then the two ASCII files he34_x05.dat and he34_bkgd.dat should be visible in the file selection dialog. If they are not, then browse to the location where they were saved in.
![]() |
Wizard for reading ASCII column data: step 1 of 3 |
The dialog shows the data columns read from the file with options to specify how the columns are separated, comments to ignore and the line number where the real data starts. The first line in the data file contains comments/axes labels so we want to start reading data from line 2. So enter 2 in the Data Starts at Line: field - the comment line should disappear from the data shown. Click on the Next>> button at the bottom right of the dialog to continue to step 2.
![]() |
Wizard for reading ASCII column data: step 2 of 3 |
The step 2 dialog allows you to indicate the number of valid data columns and the delimiter used between the columns. The default values for both are correct so click on the Next>> button to proceed.
![]() |
![]() |
Wizard for reading ASCII column data: step 3 of 3 |
In step 3, you should assign sensible labels to the data columns which will be used later in plotting. Also you can alter the data type for any column that appears incorrect on inspection. The default column names are shown on the left screedshot. Use the mouse to select each of the 3 fields from the top left of the dialog. For each field, enter a column name in the Name field located slightly to the right and press the Enter when complete. Note that non-alphanumeric and special characters (space, comma, brackets etc) are not allowed to be used in column names!. When done, the three fields should have the labels shown in the right screenshot. Click on the Finish button to complete the wizard. An entry will be created in the Data Browser tree in the main window (see below).
![]() |
New dataset entries in the Data Browser tree |
ASCII datasets usually contain a plottable dataset only so expanding he34_x05 or he34_bkgd should reveal the 3 columns of data each represented by a leaf node. The plottable data consists of:
Reduced data generated by the data reduction modules in DAVE and stored using the internal DAVE format (*.dave) contain additional information such as treatment history and instrument specific details. Expanding the dcs_example node should reveal a slightly more complicated structure consisting of other branches. The plottable dataset within dcs_example is stored in the folder Experimental Data and expanding this should reveal four entries:
![]() |
Dataset tree hierarchy. Properties of selected item shown in data property area in the right |
Note that nodes containing plottable datasets (dependent + independent data) usually have an associated (if 1D - one independent variable) or
(if 2D - two independent vriables) icon. Therefore, it can be easily determined from the screenshot that he34_bkgd contains a 1D dataset whereas the Experimental Data container within dcs_example contains a 2D dataset.
Selection of any node within the data browser tree will cause the property sheet to be updated with the properties of that item as shown in the screenshot above where the Energy Transfer item is selected. One property worth noting for the selected item is the data's Axis Type property which has the value "X". The Axis Type property specifies how any data should be treated in a visualization and has the following values and meanings:
Value of Axis Type property | Meaning in a visualization |
X | First independent axis data (x-axis) |
Y | Second independent axis data (y-axis) |
Data | Dependent axis data (z-axis) |
Error | Error in dependent axis data |
Thus, the Energy Transfer data is intended to be used as the first independent or x-axis in a plot of the dataset. Explore with other data items in the plottable data container to see what their Axis Types are.
Another very useful property is the data's Type which is very useful in matching the data with a visualization parameter as discussed below. The Energy Trasnfer data has Type "IDLVECTOR".
Creating a basic visualization from a plottable dataset is quite straightfoward in DAVE. The general procedure involves a few steps:
![]() |
Selecting visualization type |
Make sure you select the Plot visualization.
When a visualization type is selected, the editor property sheet is updated to reflect the choice - visualization parameters appropriate for the chosen visualization are displayed. For example, if you select the Plot visualization type, a total of seven visualization parameters will be displayed - three of these are specified in normal fonts while the remaining four are grayed out. The normal font parameters indicate those parameters that are typically used in the creation of the selected visualization. In addition, some normal font parameters have an asterix (*) next to their names - these are required parameters. Thus, for the Plot visualization the Y parameter - the dependent variable - is required.
Note also that the Parameter Details section is updated with the list of parameters for the selected visualization and the types of data that are acceptable to each parameter.
To create a visualization, you have to associate data to be visualized with visualization parameters. At minimum, data MUST be associated with required parameters otherwise you will be unable to proceed with the creation of the visualization. For plottable datasets, it is quite straightfoward to assign data to visualization parameters.
![]() |
![]() |
Before (left) and after (right) assigning data to visualization parameters by clicking the ![]() |
![]() |
New visualization option |
Once data is assigned to the visualization parameters, it is possible to create a new visualization by clicking on the New Visualization button. (Note that if one or more required parameters are not assigned, this button will be inactive.) DAVE responds by creating the specified visualization in a new window. In the example, the following Plot visualization is created in its own window.
![]() |
Newly created Plot visualization |
The visualization window has a simple layout that consists of a menu and toolbar section, a graphics window and a status area at the bottom.
![]() |
Modify visualization parameters option |
![]() |
Options to add visualization to an existing visualization window |
![]() |
New plot added to existing visualization - both share a common dataspace |
![]() |
The Visualization Browser provides a hierarchical tree view of all existing visualizations |
For each Visualization Window (containing graphics), there will be a corresponding node of the same name in the Visualization Browser. Currently, we should have one Visualization Window to match the he34_x05 node in the Visualization Browser tree. The branches and leaves underneath the node represent the main components of the visualization. Each visualization contains at least one view (View_1 in this case) and the view contains a visualization layer in which all the visual components of the visualization are located. The Data Space and Annotation Layer are located within the visualization layer. The entries in the Data Space represent the standard visual components in the Visualization Window view. Plot represents the first line plot that was created and Plot 1 the second line plot that was added.
Note it is good practice to use the return key after you finish entering text into any text field widget. |
![]() |
Modified plot using visualization property sheet |
Note In general, a visual component within a visualization can be selected by either selecting it from the display directly or from the visualization browser tree. |
![]() |
Plot with legend |
For this tutorial we will go through a simple exercise of scaling the background data and then subtracting it from the sample + background. As a result of self-shielding, the level of background in the sample run is much reduced. To a first approximation this can be corrected using a self-shielding correction factor. It has been determined that a self-shielding correction factor of 0.38 is required to scale the background intensity. To scale the background data, do the following
![]() |
Scale operation dialog |
Dialog simply displays a property sheet showing the properties that can be used to modify the operation. Change the Scalefactor property value to 0.38. Select the OK button to accept and execute the operation. The background intensity should now be scaled by 0.38 and this would be reflected in any visualization using the bakground intensity after an automatic update. Your Visualization Window should now look like this:
![]() |
Backgroung intensity has been scaled by 0.38 |
Note Use the Ctrl or Shift keys together with the left mouse button to select multiple items in a tree widget. |
![]() |
Subtract operation dialog |
Ensure that the Dataset 1 (input/output) field is asigned the value "he34_x05" and that Dataset 2 (input) is asigned the value "he34_bkgd". This is important because the subtraction is performed and the results saved using
Dataset 1 = Dataset 1 - Dataset 2
Click the OK button to accept and execute the operation.
Note If you do not wish to proceed with an operation, use the Cancel button to dismiss the operation dialog. |
![]() |
After background subtraction |
![]() |
Print Preview dialog. |
These tasks will typically be performed using the dialog:
In step 1 of the export wizard, choose the option to export to a file. | ![]() |
Graphics export wizard |
In step 2 of the export wizard, you have to select the component of the visualization to export. The tree representation here is identical to that shown in the Visualization Browser. Usually, you would want to export the entire scene so you select the top-level node (he34_x05 in this case) as indicated in the screenshot. | ![]() |
Graphics export wizard |
In the final step of the export wizard,
|
![]() |
Graphics export wizard |
The exported image can be viewed with an external program and should look like this:
![]() |
Exported JPEG image |
Saving Datasets and/or Project
Note It is not possible to independently save a component of a dataset - the entire dataset has to be saved. DAVE will pop-up an error dialog if an attempt is made to select and save a component. |
![]() |
Menu item to activate saving a dataset. Since the he34_x05 dataset is selected, it would be saved as a DAVE dataset once the highlighted menu is activated. |
From the main application window, select the File => Save Project menu or the
![]() |
![]() |
Note If the current project's name is anything other than "Untitled", the file dialog will not be displayed unless the Save Project As menu was used. |
![]() |
The saved project name "He34.disv" is reflected in any DAVE application window title, replacing "Untitled". |
Note All datasets and visualizations are saved with a project. However, the undo/redo buffer is not maintained between DAVE sessions. |