## FANS Data Reduction

The Main Application Window

Loading and Viewing Datasets

User Preferences

Masking Detectors

Fitting Fast Background

Printing or Exporting Graphics

Saving or Exporting Datasets

Session Management

The FANS Data Reduction program is part of the Data Analysis and Visualization Environment (DAVE) application suite. Since neutron scattering instruments are usually unique in some way, it is typical to have a custom reduction program to handle the data generated from each instrument supported in DAVE. In a reduction module a user is able to load the instrument raw file, perform all necessary instument-specific corrections and then produce an output which can be analyse further in a general way without much reference to how the data was initially collected.

### The Main Application Window

The FANS Reduction program is a typical GUI application which consists of the following main components.

FANS Data Reduction

#### Menus

Menus can be accessed from a menu bar. The File menu provides printing, session and preferences management menu items. Data loading into the application is accomplished through the Data Input while exporting or saving data menu items are located underneath Data Output. In addition, the toolbar is used to expose menus that are expected to be used more frequently.

#### Data Browser

When raw FANS instrument data are read into the application, they are represented as entries in the tree widgets located in the top left section the main window interface - this is the Data Browser. Datasets are loaded as either sample, background or fast background types and are located in three separate tabs in the Data Browser which are respectively labeled Sample, Background or Fast Bkgd. Note that because it is not possible to automatically determine whether a dataset is sample, background or fast background, it is the user's resposibility to ensure that the correct menu item is used to read in the dataset so it is correctly labeled subsequently.

#### Plot Window

The application is dominated by a Plot or Graphics window in which data visualization is presented. Plots are generated whenever a dataset is selected from the Data Browser section. The plots are fully customizable and annotations such as text can even be added.

#### Preferences

There are several options available to customize the application's behavior ranging from the energy unit to use to how multiple datasets are to be handled. These options are grouped together into a single property sheet located just below the Data Browser. The Preferences section enable the user to make changes while easily keeping track of the current settings.

#### Status Bar

The Status Bar section provides feedback to the user. It is split into a left and a right text box. The feedback provided in the left text box may be instruction or basic status information. The right text box provides the x and y coordinates of the mouse location in the plot or graphics window. The coordinates are either in data or pixel units depending on whether the mouse is directly above a plot or not.

### Loading and Viewing Datasets

This module can only read raw FANS files (*.bt4). When loading a dataset you must decide how it should be used (sample, background or fast background) since there is no way to automatically determine the dataset type from the file. Based on intended dataset type, select from one of the following menu items:

Menu to Select | Dataset type | Data Browser tab
Data Input -> Load Sample Data | sample | Sample
Data Input -> Load Backgroud Data | background | Background
Data Input -> Load Fast Background Data | fast background | Fast Bkgd

Loaded datasets appear as nodes in the tree view of the Data Browser section under the tab matching the dataset type as shown in the table above.

To display a dataset in the graphics window, select it from the Data Browser tree. Switch between the tabs to display data from Sample, Background or Fast Bkgd data. The screenshot below shows a plot of a single sample dataset.

Visualize dataset by clicking on entry in the Data Browser tree widget

### User Preferences

You can modify or alter the behaviour of the application by customizing the preferences from the property sheet section of the main window. A brief description of each available property is given next.

Note Any changes to your preferences are saved and will be pessistent even between sessions! However, when a previous session is loaded, the preferences that were stored with that session will become current.

##### Energy Units

This option enables you to toggle the energy units of the x-axis between meV and cm-1 (wavenumbers) One meV is equivalent to 8.065541 cm-1. When you select a different energy unit, the graphics window will be updated with the new unit.

##### Sum Sample Data?

Use this option to specify whether or not to sum Sample datasets. Obviously this only apples when multiple sample datasets are loaded.
When two datasets are summed, it means the counts are averaged where their energy values overlap or appended where they do not. The result is also normalized to the monitor counts of the first dataset. Note that when multiple datasets are loaded, they are either treated individually if this option is set to No or they are all summed if option is set to Yes - it is not possible to selectively sum a subset of the loaded datasets. Therefore, if multiple Sample datasets are loaded but only a subset are to be included in a sum then you must delete the datasets that should not be summed. To delete, right click on the dataset(s) and select the Delete option from the context menu.

When this option is changed, the graphics window is updated immediately to reflect the change.

##### Sum Bkgd Data?

Use this option to specify whether or not to sum Background datasets. Obviously this only apples when multiple background datasets are loaded.
When two datasets are summed, it means the counts are averaged where their energy values overlap or appended where they do not. The result is also normalized to the monitor counts of the first dataset. Note that when multiple datasets are loaded, they are either treated individually if this option is set to No or they are all summed if option is set to Yes - it is not possible to selectively sum a subset of the loaded datasets. Therefore, if multiple Background datasets are loaded but only a subset are to be included in a sum then you must delete the datasets that should not be summed. To delete, right click on the dataset(s) and select the Delete option from the context menu.

When this option is changed, the graphics window is updated immediately to reflect the change.

##### Sum Fast Data?

Use this option to specify whether or not to sum Fast Background datasets. Obviously this only apples when multiple fast background datasets are loaded.
When two datasets are summed, it means the counts are averaged where their energy values overlap or appended where they do not. The result is also normalized to the monitor counts of the first dataset. Note that when multiple datasets are loaded, they are either treated individually if this option is set to No or they are all summed if option is set to Yes - it is not possible to selectively sum a subset of the loaded datasets. Therefore, if multiple Fast Background datasets are loaded but only a subset are to be included in a sum then you must delete the datasets that should not be summed. To delete, right click on the dataset(s) and select the Delete option from the context menu.

When this property is changed, the graphics window is updated immediately to reflect the change.

##### Rem Masked Dets

If this property is set to Yes then the detectors specified in the Masked Detectors list (next property) will be removed from further consideration.

##### Masked Detectors

Use this property to specify detectors to be masked or removed from further consideration. This property will be inactive unless the Rem Masked Dets property above is set to Yes. To make changes to this property, click on the field to the right of the label and then select the triangular button that appears at the extreme right of the field. A separate dialog will be displayed. Follow the instructions in Masking Detectors to modify the detectors to be masked.

##### Fast Fit Func

Use this property to specify the function to be used for fitting the fast background data.

##### Fast Fit params

Use this property to perform a least-squares fit of the fast background data to the function specified by the Fast Fit Func property above. This property will be inactive if there is no fast background dataset loaded. To activate the fit, click on the field to the right of the label and then select the triangular button that appears at the extreme right of the field. A separate dialog will be displayed. To proceed, follow the instructions in Fitting Fast Background.

##### Sub Bkgd?

If this property is set to Yes, then the background dataset, if loaded, will be subtracted from the sample dataset when calculating the final result. This property will be inactive if there is no background dataset loaded.

##### Sub Fast Bkgd?

If this property is set to Yes, then the fast background fit, if present, will be subtracted from the sample dataset when calculating the final result. This property will be inactive if there is no fast background dataset loaded.

##### Rescale Data?

Use this property to specify whether or not to rescale the data to a different monitor count as specified by the New Monitor Scale property below.

##### New Monitor Scale

Use this property to specify a new monitor scale to be used for calculating the final result. When this property is changed the graphics display will be updated immediately.

##### Overplot Fast Fit?

If this property is set to Yes then the fast background fit, if present, will be plotted together with the fast background dataset. Obviously this will only have an effect when viewing a fast background dataset.

##### Overplot Bkgd?

If this property is set to Yes then the background dataset, if loaded, will be plotted together with the sample dataset. The background dataset will only be overplotted when viewing a sample dataset.

### Masking Detectors

### Fitting Fast Background

### Printing or Exporting Graphics

### Saving or Exporting Datasets

### Session Managemens