@@ -14,7 +14,7 @@ HFIR's four-circle single crystal diffractometer in SPICE format.
Introduction of Tabs
--------------------
1. **Setup and Data Access**: Configure the instrument name, data server URL and directories.
1. **Setup and Data Access**: Configure the instrument name, data server URL and directories.
- Configure the instrument name;
- Set up and test HB3A data server's URL;
...
...
@@ -22,11 +22,13 @@ Introduction of Tabs
- Configure the directory to save working result;
- Download data from server;
2. **View Raw Data**: View 2D image of counts on detector of one measurement.
2. **View Raw Data**: View 2D image of counts on detector of one measurement.
- Plot the counts of the 256 by 256 2D detector;
3. **Calculate UB**: Calculate UB matrix.
3. **Calculate UB**: Calculate UB matrix.
- Find peak in one measurement;
- Option to load Miller index directly from SPICE file;
...
...
@@ -34,232 +36,329 @@ Introduction of Tabs
- Re-index the peaks;
- Refine UB matrix with more than two peaks.
4. **Merge Scan**: Merge all the measurements in a scan.
4. **Merge Scan**: Merge all the measurements in a scan.
- Merge all measuring points in a scan to an MDEventWorkspace in HKL-frame or Q-sample-frame;
- Allow various ways to set up UB matrix
5. **Peak Integration**: Integrate peaks
5. **Peak Integration**: Integrate peaks
- Still in developmenet
6. **Survey**: Get experiments runs' information by scanning through all SPICE files in an experiment
6. **Survey**: Get experiments runs' information by scanning through all SPICE files in an experiment
- For selected scans in an experiment, list the run (i.e., Pt.) with maximum detector counts in a specific scan;
- For each listed run, the information show includes detector counts and HKL
Converting SPICE UB matrix to Mantid UB matrix
----------------------------------------------
Use Cases
---------
Assuming that SPICE UB matrix (3 x 3) is composed as
* R11, R12, R13
* R21, R22, R23
* R31, R32, R33
Here are some use cases that can be used as examples.
Then, converted to UB matrix in Mantid, it is like
* R11, R12, R13
* R31, R32, R33
* -R21, -R22, -R23
Set up reduction
++++++++++++++++
The first step to reduce data with 4-Circle GUI is to set up the reduction environment.
Reduction cannot work correctly if this step is **SKIPPED**.
Peak Integration: Normalization
+++++++++++++++++++++++++++++++
1. Go to tab *Setup & Data Access*;
2. Set up *Data Directory* and *Working Directory*;
3. An alternative way to step 2 is to push button *Load Default*;
4. Push button *Apply*. Mantid thus checks whether the setup, including source data file's URL, data directory and working directory are valid. Be noticed that the check of URL may return **timeout** error. It might be a false alarm. You might push the *Apply* button few more times.
Counts of neutron on any detector shall be normalized by its corresponding monitor
count and then be multiplied by a constant specified by user.
Peak Integration with automatic background subtraction by IntegrateEllipsoids
There is no existing algorithm in Mantid to integrate ellipsoid because1
algorithm *IntegrateEllipsoids* works only for event in unit as time-of-flight.
Usually if it is the first time to reduce data for an experiment, it is
recommended to go through the whole experiment to gather some information.
1. Go to tab *Survey*;
2. Set up experiment number on the top of application window;
3. Input the range of the scan numbers for survey. Leaving them blank will result in going through all scans of the experiment;
4. Click button *Survey*;
5. It might take a while to load and scan all the SPICE files belonged to an individual experiment. After it is finished, the result will be shown in the table.
6. Save the survey result for future by clicking button *Save*;
7. Select a row, and click button *View Peak*, application will switch to tab *View Raw Data* automatically and set the scan and Pt number from the selected row.
So far, there is only one algorithm is implemented to integrate peaks for HB3A.
Simple cuboid integration
+++++++++++++++++++++++++
Workflow to calculate and refine UB matrix
++++++++++++++++++++++++++++++++++++++++++
Here is a typical use case to calculate UB matrix after initial setup.
This is a simple algorithm for approximate the integrated peak intensity.
1. User specifies *Experiment* and pushes button *Set*
2. Users may do a new survey or load a survey result file in tab *Survey*;
3. User enters tab *View Raw Data* and inputs scan number and list all the measuring points (Pt.)
4. User views all the measurements
* User finds out the measurement with the strongest reflection and push button use
* Alternatively, user can use the survey result to find out the Pt. with the maximum counts of the scan
5. GUI shifts to tab *Calculate UB* automatically
6. User pushes button *Find Peak* with checking *Load HKL from file*
7. GUI finds the peak center and load HKL
8. User pushes button *Add peak* to add the peak to table
9. User repeats step 2 to 9 to add other peaks
10. User select the peaks that are linearly independent and pushes *Calcualte UB*
11. GUI calculates UB matrix and show the result
12. User may push *Index peak* to use the calculated UB matrix to index peaks in the table to check UB matrix;
13. User may refine the UB matrix and thus lattice parameters
a. user adds more peaks to the UB peak table;
b. user selects at least 3 non-degenerate peaks;
c. user clicks button *Refine*;
d. application refines UB matrix and outputs the refined UB matrix, refined lattice parameters and their error.
Measuring one peak usually contains around 20 Pt. in a same scan.
In most of the cases, the first and last several measurements (called as *Pt* in SPICE) are
background.
Therefore, the background for per measurement can be estimated by averaging the
summed number of counts normalized by either monitor counts or measuring time.
Estimating background
---------------------
Workflow to merge measurements in scan
++++++++++++++++++++++++++++++++++++++
For each measurment, the background :math:`B_i` is calculated as
Here is a typical use case to merge all the measuring points (Pt.) in a scan
This is an easy approximation to integrate a peak with background subtraction
by specified region of interest.
The pre-requisit is that all events are normalized by monitor counts
and scaled up by same factor (e.g, 1500).
1. Set up region of interest
Define region of interest on the detector.
1. Set up region of interest
2. Mask detectors
Mask all the detectors out of the region of interest, which is defined by the pixel ID of its upper-left corner and lower-right corner.
- define region of interest on the detector
- check whether the ROI does not exclude any peak
3. Integrate counts inside region of interest
Bla bla bla
2. Specify background Pts.
4. Estimate background
- specify the Pts. in the scan that are used to estimate background
5. Background subtraction
Subtract the background from detector's count. If the result is negative, keep it as negative.
3. Integrate peaks
- select peaks to integrate
- integrate peaks
Use Cases
---------
4. Review the integration result
5. Export to Fullprof peak integration (.int) file.
Here are some use cases that can be used as examples.
Set up reduction
++++++++++++++++
The first step to reduce data with 4-Circle GUI is to set up the reduction environment.
Reduction cannot work correctly if this step is **SKIPPED**.
UB Matrix Calcualtion and Refinement
------------------------------------
Converting SPICE UB matrix to Mantid UB matrix
++++++++++++++++++++++++++++++++++++++++++++++
1. Go to tab *Setup & Data Access*;
Assuming that SPICE UB matrix (3 x 3) is composed as
* R11, R12, R13
* R21, R22, R23
* R31, R32, R33
2. Set up *Data Directory* and *Working Directory*;
Then, converted to UB matrix in Mantid, it is like
* R11, R12, R13
* R31, R32, R33
* -R21, -R22, -R23
3. An alternative way to step 2 is to push button *Load Default*;
4. Push button *Apply*. Mantid thus checks whether the setup, including source data file's URL, data directory and working directory are valid. Be noticed that the check of URL may return **timeout** error. It might be a false alarm. You might push the *Apply* button few more times.
Peak Integration
----------------
Unlike TOF single crystal diffractometer, HB3A uses a different method to integrate diffraction peaks.
Survey experiment
+++++++++++++++++
Presently, HB3A reduction interface supports 3 types of integrations.
Usually if it is the first time to reduce data for an experiment, it is
recommended to go through the whole experiment to gather some information.
Normalization
+++++++++++++
1. Go to tab *Survey*;
Counts of neutron on any detector shall be normalized by its corresponding monitor
count and then be multiplied by a constant specified by user.
2. Set up experiment number on the top of application window;
But for HB3A, the normalization to counting *time* is more reliable because the
beam monitor may be unstable.
3. Input the range of the scan numbers for survey. Leaving them blank will result in going through all scans of the experiment;
4. Click button *Survey*;
Region of interest
++++++++++++++++++
5. It might take a while to load and scan all the SPICE files belonged to an individual experiment. After it is finished, the result will be shown in the table.
A region of interest (ROI) on the detector can be defined for each scan.
The signals in the ROI of each Pt. in a scan construct a 3-dimensional diffraction peak.
6. Save the survey result for future by clicking button *Save*;
The purpose to define the region of interest on detector is to reduce the affect of background noise.
7. Select a row, and click button *View Peak*, application will switch to tab *View Raw Data* automatically and set the scan and Pt number from the selected row.
Integration algorithm 1: simple counts summation
++++++++++++++++++++++++++++++++++++++++++++++++
Workflow to calculate and refine UB matrix
++++++++++++++++++++++++++++++++++++++++++
This algorithm is also called *simple cuboid integration*,
which is to approximate the integrated peak intensity.
Here is a typical use case to calculate UB matrix after initial setup.
Measuring one peak usually contains around 20 Pt. in a same scan.
In most of the cases, the first and last several measurements (called as *Pt* in SPICE) are
background.
Therefore, the background for per measurement can be estimated by averaging the
summed number of counts normalized by either monitor counts or measuring time.
The integrated peak intensity is
.. math:: I = \sum_i (C_i - B_i) \times \Delta X
where
* :math:`C_i` is the normalized detector counts in ROI of measurement *i*
* :math:`\Delta X` is the motor step
* :math:`B_i` is the estimated background
1. User specifies *Experiment* and pushes button *Set*
The error can be calculated as
2. Users may do a new survey or load a survey result file in tab *Survey*;
.. math:: \sigma = \sum_i \sqrt{C_i} \cdot \Delta X
3. User enters tab *View Raw Data* and inputs scan number and list all the measuring points (Pt.)
4. User views all the measurements
Estimating background
^^^^^^^^^^^^^^^^^^^^^
* User finds out the measurement with the strongest reflection and push button use
* Alternatively, user can use the survey result to find out the Pt. with the maximum counts of the scan
For each measurment, the background :math:`B_i` is calculated as