## Description of DAVE software package

Software Categories in DAVE 1.x

Key Elements in DAVE 2.x

### Software Categories in DAVE 1.x series

In the DAVE 1.x series, the available features could be arranged into four broad categories: data reduction, data analysis, data visualization and miscellaneous utilities. A brief listing of features under these categories were as follows:

#### Data Reduction

Although there are some similarities, each neutron scattering instrument is fairly unique as a whole. Usually, it is necessary to convert the raw, instrument specific, data produced by the instrument into a quantity, the scattering functions, that depends only on the physics of the sample under investigation. Since the instruments are unique the corrections that must be applied to the raw data is instrument specific. Hence each instrument requires it's own data reduction program. Data reduction support for the following NCNR/PSI instruments are provided:

- Triple Axis spectrometers: SPINS, BT2, BT7 and BT9
- Filter Analyser: FANS
- TOF chopper spectrometers: FCS, DCS
- Back Scattering spectrometers: HFBS
- Spin Echo spectrometers: NSE
- FOCUS direct geometry spectrometer at PSI, Switzerland
- MARS backscattering spectrometer at PSI, Switzerland

#### Data Analysis

The process of examining the data, the scattering function usually, in order to explain or understand the underlying science is referred to as data analysis. The following data analysis functionality are available:

- General-purpose least-squares fitting of 1D/2D data using 1D model functions
- General-purpose least-squares fitting of 2D data using 2D model functions
- A large selection of model functions (1D and 2D) are included
- Possible to specify user-defined functions (1D only)
- Ability to include instrumental resolution function in the model functions
- Fitted parameters and results can be analyzed and saved as ASCII data and/or hardcopy plots

#### Data Visualization

Data visualization functionality provides ways of viewing experimental data and also making comparisons between different datasets. Available features include:

- User configurable multi-line/symbol plots
- User configurable area (contour, image) and surface plots
- Ability to rebin, scale, and shift individual datasets
- Make 1D slices/cuts of 2D data
- Merge/combine multiple 1D/2D datasets into a single 2D dataset
- Print or generate hardcopy output in postscript and other image (jpeg/png/bmp/tiff) formats

#### Miscellaneous tools

Miscellaneous tools include all program modules in DAVE that cannot be clearly classed in the above three categories is. There are many such tools included in DAVE and following list illustrates a sample only:

- Neutron cross sections table for all elements and isotopes
- Tool for calculating neutron cross section for any arbitrary compound/molecule
- Instrument specific tools useful for experiment planning
- Data tools for examining raw/DAVE files
- Utility to calculate neutron vibrational lineshape from a Gaussian 98 logfile
- Spurion calculator for determining the location of spurious inelastic peaks for Triple Axis spectrometers
- Eigenvalue and hindered rotational dynamics calculator for molecular rotors (hydrogen, methyl systems)
- Self-shielding corrections calculator
- Digitizer for extracting data points from a plot or image

### Key Elements in DAVE 2.x series

The DAVE 1.x series essentially consisted of several major, relatively independent, application modules that shared a common launch pad and application preferences. Only one dataset could be loaded at any one time in the main application and this dataset could be shared with any application module at its launch. This posed a serious limitation on the addition of modules that could operate on two or more persistent datasets.

In the DAVE 2.x series, a major effort has been made to design an application which is much more integrated and takes advantage of the iTools application framework in IDL. The iTools framework makes extensive use of object oriented programming (OOP) and consists of a set of classes and associated utilities that are designed to facilitate the development of sophisticated applications containing standard features including:

- creation of visualization graphics
- mouse manipulations of visualization graphics
- annotations
- management of visualization and application properties
- undo/redo capabilities
- data import and export
- printing
- data filtering and manipulation
- interface element event handling

Using the iTools as a foundation, we have been come with a radically different radically different design approach consisting of the following key elements.

#### Project Space

A user session with the DAVE application always occurs within the concept of a project. A project can be saved and the application closed. A project can be resumed when the application is restarted. The save action should preserve all data and other useful application state information so that the user is able to return to the project at some later time. This functionality gives users the option of analyzing and or visualizing related datasets together and then saving the results in a project. Multiple projects can, of course, be created based on criteria such as experiment or instrument type.

#### Data Reduction

In DAVE2, as in DAVE1, special modules are provided for performing data reduction, that is converting raw data into the scattering function. Data reduction covers a broad set of tasks which are typically instrument specific and consequently, the data reduction modules will be unique and designed to meet the needs of particular instruments.

#### Data Input/Output

Support for the following data file formats are provided in DAVE.

- Raw file format for all supported instruments - input only
- ASCII (Multi-column, Group format, SPE, etc) - input/output
- DAVE format (processed data in IDL's .sav format) - input/output
- DAVE NeXus format (processed data) - input/output (not yet available)

#### Data Manager

The Data Manager is responsible for providing the interface through which the user can interact with all data that is currently loaded in the application. The interface is a tree widget that provides a hierarchical view that is used to organize data structures and information. The nodes and branches of the tree view can be expanded or collapsed depending on the level of detail that is required for the components of the dataset under examination.

#### Visualization Manager

The Visualization Manager provides the base functionality required for user interaction with the visualizations that have been created in the system. Visualizations are visual representations of data such as line plots, images and surface displays. Because multiple visualizations can be created, it is necessary to provide a means for the user to manage them effectively and intuitively. The interface for this is also a tree widget that enables a hierarchical arrangement of complex information without compromising on the amount of detail that can be included.

#### Data Visualization

Visualizations provide a graphic representation of the data and there is a limited number of ways in which this can be done. DAVE2 provides comprehensive support for all types of visualizations - thanks to the extensive features already present in the iTools framework. The list of supported visualizations include the following.

- Line Plot - line plots of data with one independent variable.
- 3D Line Plot - line plots of data with two independent variables.
- Contour displays.
- Image displays.
- Surface displays.
- Volume displays (not yet implemented).

Supersets of these individual visualizations such as image-contour, surface-image and surface-contour are also possible.

#### Data Analysis

Most data analysis features are encapsulated into iTools components known as operations. Operations are well defined components that can be used to modify data, visualizations or application state. The number of data analysis tasks is extensive and what follows is an incomplete list of currently available or planned features.

- Single dataset operations such as rebin, scale, x or y data shift, etc.
- Operations requiring two datasets such as subtract, multiply and divide datasets.
- Operations requiring two or more datasets such as add, combine datasets
- Slice/cut data along x and y axes, integrating along a user specified range in either direction.
- Least-squares fitting - 1D model
- Least-squares fitting - 2D model
- Fourier transform
- Single crystal samples: support for tof data - calculate projections of data onto a scattering plane.
- Diffuse scattering support.

#### Miscellaneous Tools

These are independent, self-contained tools that are useful for performing tasks in DAVE that cannot be categorised as data reduction, analysis or visualization. In addition to the tools that were already available in DAVE 1.x, the following are also planned

- Triple Axis Experiment Planning:
  - Visual effects of horizontal and vertical focusing of monochromating crystals
  - Visualize accessible instrument phase space and reciprocal space of sample
- Resolution Function Calculator for Triple Axis Spectrometers
- Multiple scattering calculator
- Multi-phonon calculator