The BT7 PSD 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 instrument-specific corrections and then produce an output which can be analyze further in a general way without much reference to how the data was initially collected.
The main difference between this module and the previous BT7 Reduction module is the fact this one is designed to handle the multi-channel detector analyzer package. The previous module reduces data generated using the old single detector. The new program includes the following major capabilities:
The BT7 PSD Reduction program is a typical GUI application which consists of the following main components.
![]() |
Figure 1: BT7 PSD Data Reduction |
Using this program is quite straightforward. Essentially, data from an instrument raw file is loaded. Various instrument dependent corrections are applied some of which are based on user-specified preferences. A plot of the reduced intensity can be viewed as a function of various selectable independent variables and finally it can be exported into other DAVE program modules for further analysis.
The program is designed to use sensible defaults so it is relatively easy to get started. However, there are a minimum of two settings that must be specified by the user. First, the type of sample that was measured must be explicitly specified by the user as there is no way of determining this from the contents of the raw data file. Please see the discussion on Sample Type below. Second, a calibration parameter file must also be specified in order to properly treat the intensities measured by the position sensitive detector (PSD). Please see the discussion on PSD Calib Parameter File below. This module can only read raw BT7 files (*.bt7). The raw files can be located either on your local computer or on the network at the NCNR ftp server. Depending on the location select one of the following menu items to load your raw data file:
Data Input -> Load Sample Data -- to load files from your local computer
Data Input -> Load Sample Data (NCNR ftp server) -- to load files directly from the public NCNR ftp server
Loaded datasets appear as nodes in the tree view of the Data Browser. To display a dataset in the graphics window, select it from the Data Browser tree. A visualization will be created that reflects the currently selected user preferences such as the corrections applied and which independent variable(s) to display. To display multiple datasets, simply select them from the Data Browser tree by holding down the CTRL key while selecting or deselecting additional datasets (use the SHIFT key to select a range of datasets).
The screenshot below shows a plot of all the 5 datasets loaded in the Data Browser. These are single crystal data as seen in the Preferences section as well as the following settings: the horizontal and vertical axes are respectively set to QX and QY; the lattice parameters were taken from the data; no detector channels were masked; the maximum and minimum intensities for the plot are set to 200 and 20 respectively; etc.
![]() |
Figure 2: Visualize dataset by clicking on entries in the Data Browser tree widget. The plot shows data from all 5 selected datasets and reflects the settings shown in the Preferences. The slightly darker strips or bands shows where datasets overlap. |
You can modify or alter the behavior of the application by customizing the preferences from the
propertysheet section of the main window.
The propertysheet widget contains several rows of user customizable properties each consisting of two columns -
a label and a field. The label specifies the name of the property and field its value. In most cases the value
is specified by selecting from a predefined set while in some cases it is simply an editable text field.
For text fields, after modification, use the ENTER or RTRN key to accept the change!
A brief description of each available property is now given together with a guide on how it can be modified.
Note Changes to your preferences are saved automatically when you exit a session and restored when you start a new session! In addition, you can explicitly save the current preferences using the File->Save Preferences menu or restore the default preferences using the File->Reset Preferences (Default Values) menu. When a saved session is loaded, the preferences that were stored with that session will become current. |
Note If a loaded dataset's sample type does not match the value of Sample Type property, it will be ignored from further consideration. It cannot be plotted or exported to other DAVE modules! |
![]() |
Figure 3: You may wish to have datasets with different sample types! |
If you select 'Yes', all loaded datasets will be deleted. If you select 'No' then the new Sample Type property may
not match the existing dataset(s). As noted earlier, in cases where a loaded dataset's sample type does not match the
Sample Type field, it will be ignored!
PSD Calib Parameter file
This is a read-only text field that enables the user to see the current setting for the PSD Calibration Parameter file.
Choosing or specifying the file can be done by one of two ways. Either use the
Data Input->Load PSD Calibration Parameters file
menu or simply click on the field and then select the small arrow button that appears on the
extreme right edge of the field as highlighted in Figure 4.
In either case, a file dialog will launch for you to browse and select the calibration file.
![]() |
Figure 4: Click on the small arrow button to launch the calibration file selection dialog. You can also use the Data Input->Load PSD Calibration Parameters file menu. |
BT7 utilizes a position sensitive detector (PSD) that is actually a composite
detector consisting of 48 independent channels. The raw dataset contains the counts from these 48 channels
but in order to interpret these in a meaningful way, the efficiencies, relative scattering angles and relative
energy transfers for each detector channel must be known. This information is usually contained in a
calibration parameter file provided by the instrument scientist. Note that the calibration parameters changes
dependent on the exact instrument setup so always ensure you use the calibration file that is appropriate for
your experiment. If in doubt, contact the BT7 instrument scientist.
Apply Channel Eff Corr?
This is a droplist field that has the following options available for the user to select from:
This is a droplist field that has the following options available for the user to select from:
These represent the available choices for the scan or independent variable that can be selected
to display the data in the case of powder samples. The dependent variable is always Counts.
Note that if a selection such as TEMP is made that turns
out to be constant (i.e. not varying), the program will respond by automatically defaulting
to the Data_Index as the Scan Variable!
Horizontal Axis Variable
This property only applies to single crystal samples
This is a droplist field that has the following options available for the user to select from:
![]() |
Figure 5: The scattering diagram showing how momentum transfer and its components are defined in the program. |
These represent the available choices for the horizontal independent variable
in the case of single crystal samples. For single crystals, the processed data is a
multi-dimensional dataset with Counts as a function of two or more independent variables.
Therefore, to view the data, it is necessary to select at least two independent variables so
that an area plot can be produced. This property allows the user to specify the horizontal or
x-axis variable. The dependent variable is set to Counts.
Note that if a selection such as TEMP is made that turns
out to be constant (i.e. not varying), the program will respond by automatically defaulting
the horizontal axis to PSD Channel number!
Vertical Axis Variable
This property only applies to single crystal samples
This property is used to specify the vertical or y-axis variable.
See Horizontal Axis Variable description for details.
Units of QX, QY
This property only applies to single crystal samples
This is a droplist field that has the following options available for the user to select from:
This property is used to specify the units of the QX and QY variables.
Min Bin Width (scan var)
This property only applies to powder samples
This is a text field that enables the user to specify the minimum bin width to be applied to the independent axis variable that has been selected using the Scan Variable property. The minimum bin width essentially defines the minimum resolution for the selected independent variable. Hence the value you specify should depend on what the Scan Variable is. Note that the data is not rebinned into a constant bin width! As a guide, the default minimum bin widths are shown in the following table
Default Minimum Bin Width |     Scan Variable |
0.15 | 2Theta |
0.01 | d-space |
0.01 | |Q| |
0.50 | E |
0.50 | TEMP |
0.10 | MAGFIELD |
1.00 | Data_Index |
You are certainly free to explore other settings for the minimum bin width but be aware that you may start
noticing strange effects if your values deviate too much from the actual resolution of that variable for
your measurement! In general, the settings for 2Theta, d-space and |Q| are pretty much determined by the
detector geometry and hence you may not need to deviate too much from the defaults. However, values for
E, TEMP and MAGFIELD really depend on the details of each measurement!
Use Default Intensity Range?
This property only applies to single crystal samples
This is a droplist field that has the following options available for the user to select from:
This property will appear only if the Use Default Intensity Range? property is set to
Yes. It is a text field that enables the user to specify the minimum intensity value of the current plot.
Note that this property only affects the visualization and not the underlying data.
Max Intensity Value
This property only applies to single crystal samples
This property will appear only if the Use Default Intensity Range? property is set to
Yes. It is a text field that enables the user to specify the maximum intensity value of the current plot.
Note that this property only affects the visualization and not the underlying data.
Latt Param Source
This property only applies to single crystal samples
This is a droplist field that has the following options available for the user to select from:
This property will be editable only if the Latt Param Source property is set to
User Specified. It is a text field that enables the user to specify the lattice parameters for the sample.
All six values making up the lattice parameters must be specified in the order indicated in the label .
Use space to separate
entries. By default, if any dataset has been loaded the values read from the file will be automatically filled
in for you in this field.
A3 Correction (Phi Offset)
This property only applies to single crystal samples
This property is a text field that enables the user to specify a correction to the angle A3 relative to what is
recorded in the data file. Such a correction may be necessary if, for example, it is later realized that the
sample was misalignment during the measurement.
Remove Masked Channels?
This is a droplist field that has the following options available for the user to select from:
![]() |
Figure 6: The detector channel masking tool. The plot shows the integrated intensity in each detector channel. The grayed out channels are to be masked and the list includes channels 4, 5, 6, 16, 44, 45, 46! |
The tool displays a plot of the integrated intensity in each detector channel giving the user a basic
indication of whether there is anything unusual. The plotted data is the first
selected dataset from the Data Browser - if no dataset is selected then the first one is used. If no datasets
are loaded than the tool will not launch!
In the figure, some channels are grayed while others are not. The grayed out channels are to be masked and
are also listed in the text field at the top of the dialog.
Use the left mouse click on the plot window to toggle the state of any channel from mask to unmask or vise versa.
You can also select a range by clicking and dragging with the left mouse to select a range of
channels. When satisfied with the mask list, you can exit the tool by clicking on the
Accept Changes button to accept and use the list or the Discard Changes button to ignore
all the changes. If you accept the changes, the mask list you just created will become the new
value of the Channels to be Masked field and will be masked out if the
Removed Masked Channels property is set to "Yes".
Normalize To
This is a droplist field that has the following options available for the user to select from:
This is a text field that can be used to specify a value for the fast background correction in
counts per minute. If you are not sure or if you are simply interested in applying
another correction (eg monitor correction), then set the fast background value to zero!
Monitor Correction?
This property is active only when
Fast Bkgd Corr.? is set to "Yes".
This is a droplist field that has the following options available for the user to select from:
Monitor correction is an energy dependent scale factor that accounts for higher-order harmonics in the beam. This correction is only applied in constant-Q scans when the incident energy (Ei) varies and the graphite (PG) monochromator is in use. The correction (MC) has been measured for BT7 and modeled so it is defined as follows:
corrected counts = (raw counts - fast background) * MC
where
MC = 6.123 - 0.5963 * Ei + 2.6244x10^(-2) * Ei^2 - 4.843x10^(-4) * Ei^3 + 2.881*10^(-6) * Ei^4
The above definition only works for Ei between 5 meV and 34 meV. For Ei above 34 meV, MC is 1
and for Ei less than 5 meV, the program will raise a warning flag and no correction will be applied!
Resolution Correction?
This property is active only when
Fast Bkgd Corr.? is set to "Yes".
This is a droplist field that has the following options available for the user to select from:
This correction accounts for the change in phase space volume that results when the final neutron energy (Ef) is varying. It is implemented using the following formula
corrected counts = (raw counts - fast background) * RC
where
RC = norm / [cot(A6/2.0) * Ef^(3/2)]
and
norm = Ei^(3/2) * cot[arcsin[pi / 0.69472 * d * sqrt(Ei)]]
and
d = analyzer d spacing.
The correction is designed to be unity at the elastic position (Ei=Ef).
Det. Balance Correction?
This property is active only when
Fast Bkgd Corr.? is set to "Yes".
This is a droplist field that has the following options available for the user to select from:
Detailed balance is defined as the factor exp(-B*E/2)
where B = 1/(k*T) and k is the Boltzmann constant so that the result satisfies the
principle of detailed balance: S(Q,-E) = S(Q,E)exp(-B*E).
Allow multiple Mslice?
This property only applies to single crystal samples
This is a droplist field that has the following options available for the user to select from:
This action is available underneath the Data Output menu. It is used to export the selected dataset(s) to the Mslice module for further analysis. Mslice is an invaluable tool for analyzing and visualizing multi-dimensional data and hence comes very handy since since single crystal data from BT7 are typically multi-dimensional.
If this menu is selected but there are only powder datasets present, nothing will happen! Also, if the menu is selected but there are no datasets selected from the tree browser section, then nothing will happen. If one or more datasets are selected, then a dialog will appear as shown in Figure 7 for the user to specify which independent variables to export in addition to the intensity and error.
![]() |
Figure 7: When exporting reduced data to Mslice you need to select the independent variables to be exported along with the dependent variables (intensity and uncertainty in intensity). |
Note that because Mslice requires at least a 2-dimensional dataset, you have to select a minimum of 2 independent variables for export. If all goes successfully, the exported data will appear in a new or existing Mslice session as shown in Figure 8. Please see the Mslice use manual which is available from the Help menu in Mslice for help as to how to proceed.
![]() |
Figure 8: Main Mslice window with data from BT7 PSD Reduction already loaded and ready to by analyzed and/or visualized. |
Export Selection to Data Manager (Powder Samples)
This export action can only be performed if the processed data was treated as a powder.
This action is available underneath the Data Output menu.
It is used to export the selected dataset(s) to the DAVE Data Manager for further analysis and visualization.
Save Selection to DAVE file (Powder Samples)
This export action can only be performed if the processed data was treated as a powder.
This action is available underneath the Data Output menu.
It is used to save the selected dataset(s) to a file on disk using the DAVE (.dave) data format.
Many program modules within DAVE are able to read .dave format files. The independent variable
recorded is whatever was selected as the Scan Variable at the time of the
save action.
Save Selection to ASCII file (Powder Samples)
This export action can only be performed if the processed data was treated as a powder.
This action is available underneath the Data Output menu.
It is used to save the selected dataset(s) to a file on disk in 3 column ASCII format.
The first column is the independent variable
which would be whatever was selected as the Scan Variable at the time of the
save action. The other two columns are the counts and the uncertainty in the counts.
Fit Selection in PAN (Powder Samples)
This export action can only be performed if the processed data was treated as a powder.
This action is available underneath the Data Output menu. It is used to export powder data to PAN for fitting. It only works if the selected data to be exported is for a powder sample. The independent variable that is exported to PAN is whatever was selected as the Scan Variable at the time of the export action. Figure 9 shows an example of a fitting session in PAN. For assistance, see the PAN user manual available from the Help menu in PAN.
![]() |
Figure 9: Exported data fitted in PAN |
Printing and Exporting Graphics
After generating and customizing a plot, you may decide to print it or export it to
a variety of standard image formats. Almost all standard image formats such as GIF,
PNG, JPEG, EPS, etc are supported. The following three menus
Note Be aware that a session is completely self-contained and includes both data and application state (preferences) so when a new session is loaded, your existing session (data and preferences) will be replaced. However, you will be given the option to save the existing session if it has been modified! |