Tags

Louisa's Notes on XRDUA processes, thanks to Frederik Vanmeert

0. Opening the program

XRDUA is an IDL program, and it is recommended to run it in the IDL virtual machine. The IDL virtual machine can be accessed on a CLASSE computer (or in a remote session via X2Go) by opening a terminal window and typing "idl -vm".

Press the button that says "Click to Continue," then navigate to your copy of the XRDUA .sav file. There is a copy in /nfs/chess/aux/user/lmb327/xrdua_v6-5-14-1/

Select the "xrdua.sav" file and click OK.

(Alternatively, XRDUA can be downloaded here: http://xrdua.ua.ac.be/index.php?id=xrduabin You will need to unzip the package to access the main .sav file.)

1. Getting ready: calibrating your data, setting up the valid pixel mask, and setting integration parameters

These steps only need to be done once for each run with the same beam energy/experiment geometry.

1A: Calibration

It is recommended to use a pattern from a known standard such as Si, that has been averaged from at least 10 patterns from a few locations (do a linescan or a small map).
  • To average the patterns from your standard, go to Perform > Average patterns. In the popup "Select files manually?" choose Yes. Navigate to the raw .tiff files from your standard sample scan, select them all, and click OK. Give a name for the new averaged pattern in the "Selection" field, and make sure the location where it will be saved is not in the raw directory, then click OK. In the popup "(Number) files selected: proceed?" choose Yes. The average pattern should show up in the main window when finished. If it does not, go to File > Read 2D pattern to open it.
  • Estimate the beam position. Go to the Beam Position tab, and choose Use Mouse. Click on the left pattern close to the beam position.
  • Go to Options > Experimental Geometry. Make sure the X/Y pixel size ratio is correct. For the Pilatus 300K, the pixel size is 172 x 172 microns.
  • Also in the Experimental Geometry tab, enter a preliminary value for the beam energy, and an estimate for the sample-detector distance. Press OK.
    • You can improve the estimates by loading a PDF file for your standard under File > Load PDF, and tweaking the sample-detector distance in the Experimental Geometry window until the lines are close to matching your pattern.
  • Select the Debye rings you will fit for your standard.
    • The rings can be chosen manually in the Mask Setup mode (use Ellipse or Arc to put bounds on each ring). Then, go to the Calibration tab and choose Auto Set. Lastly, use the "Edit d spacings" tool to set the d-spacing value for each ring.
    • Alternatively, if you have a standard PDF, the rings can be automatically from a loaded PDF file under the Calibration tab by choosing "Auto Set with PDF".
  • Under the calibration tab, click Calibrate. You can set which items to fit and which to leave fixed (if known precisely) under the Advanced tab.
    • You will have to reject outliers. From the official documentation: "You will be asked to reject outliers from the Debye rings. The outlier criterion can be adapted by changing the number of standard deviations taken for a data point to be rejected. It is recommended to start with k=4, reject outliers and then calibrate again with k=2.5."
  • To accept the calibration results, click OK.
  • SAVE the calibration mask by going to File > Save mask.

1B. Setting valid pixels

Once you have a mask containing the correct calibration information, you will need to set the valid (nonzero) pixels. For the Pilatus 300K, there are two thick lines with no active pixels across the detector face.
  • You can start with the same standard powder pattern, or you can use a pattern from your sample. Make sure the calibration mask from part 1A is loaded (File > Load mask).
  • Get rid of any d-spacing rings in the mask left over from the calibration step: go to the "Mask setup" tab and choose "Edit mask." Delete any mask groups leftover from the calibration step.
  • Go to the "Mask Off" tab at the lower left.
    • For the Pilatus 300K, choose "Load mask image" and go to nfs/chess/aux/user/lmb327/Pilatus300K_validpixels.tiff
    • When the popup asks "Valid pixels > 0" click ok
    • Choose Apply Mask. The bars across the middle, and any dead pixels, should turn orange.
  • Save your progress with the mask at this point.

1C. Setting integration parameters

The goal is to select an area that will cover all the data you are gathering, so you can do an azimuthal integration and transform the 2D data into 1D data.
  • To figure out the Debye lengths you are interested in, it is useful to go to the Debye marker tab and note the lengths (in angstroms) of the innermost and outermost radii you want to include in your integration.
  • I like to use the "Range" tool under the "Mask Setup" tab. This lets you select a wedge or donut shape, avoiding the beamstop but covering the Debye lengths of interest. Enter the Debye lengths and Azimuthal angles of interest- you can adjust until you have selected the area you are interested in.
  • Go to Options > Corrections. Make sure that "Mask Off" is off but required, and will auto-correct on load. Click "Auto correct now" to make sure it is working.
  • Save your progress if you have not already.
Now we will do a test integration on your real data and set a few more parameters. You should load an average pattern from your sample, then load the mask you are working on with the calibration, valid pixels, and integration region.
  • Go to Perform > Azimuthal integration
    • Turn on "open in 1D editor" in the main tab
    • In the "Speed" tab, turn off error propagation and Changing bad pixels
  • Select the mask region for integration and look at the resulting pattern in the 1D editor window. If the valid pixels have been chosen correctly, then there should be no abrupt dips to zero in the spectrum (which would correspond to the non-pixel areas in the Pilatus 300K).
  • Go to Background, choose Strip and then click Subtract, to remove the background.
  • Go to Display > spectrum line to see the spectrum as points. Ideally there are ~10-20 points in each peak. If not, go back to the Perform > Azimuthal integration window and adjust the number of points, then repeat
  • When satisfied with the 1D pattern, save the 2D and 1D versions of this mask separately. You will use these for processing all the data taken at this beam energy/experiment geometry.

2. Reading in & calibrating your powder patterns

Generates a .tiff file containing all your integrated 1D powder patterns that can be viewed and examined in Explorative Mode (Batch processing window).

This process can be started while the XRD scan is still running.
  • Go to Perform > Batch processing.
  • In the upper left, select Explorative mode.
Files tab:
  • In the middle section, under the "Files" tab, make sure the "list of files" path is pointed to the raw directory where the 2D .tiffs from your experiment are stored. Make sure the ".*" field above it will select only the .tiff files from one scan. This is accomplished automatically if there is only one XRD scan per folder, but if there is more than one scan, make sure the field before the asterisk has enough of the filename to distinguish which .tiffs to load.
  • Click the "File Sorting" bar and choose "Sort with sep."
  • In the "Mask file" field, navigate to the 2D version of the mask you set up in part 1.
  • In the "Output dir" field, make sure the path is pointing to the desired folder in your analysis directory.
  • Make sure the output filename is appropriate (it will auto-fill with the name of your mask file so you will probably wish to change it).
  • "Don't check files" should be selected.
"Scan Dimensions" tab
  • In the Scan Dimensions tab, choose Map, and then enter the dimensions of the scan in mm. (0 to value for each direction).
  • The third column is the number of steps, not the step size. Divide the scan dimension by the step size, then subtract 2 for the horizontal value and 1 for the vertical value.
  • Make sure "bottom to top" and "continuous" are selected.
"Process options" tab
  • You can watch the progress of the integration by selecting "View progress." However, leaving "View progress" on while the process is running will slow the integration down over a long period of time.
When finished entering these settings, press Go. You will see the status of the integration in the lower left box. The number of files in the directory should match the total number of files your scan expects (denominator in the progress fraction on the left). If the numbers don't match, either (a) the scan is still running or (b) the dimensions (or more likely the number of steps) are not correct. You can pause the scan and make changes in the Scan Dimensions tab, then resume. You can also pause turn "View progress" off or on.

The result of this step is a .xdi workspace you can explore in XRDUA for phase identification, and a .tiff file with all the spectra that you will need if you want to do any fitting.

3. Exploring your data and setting up a model

Phase identification and fitting

4. Fitting your XRD data to extract phase maps

Slow- would benefit immensely from parallel processing

5. Exploring the results of fitting

What shows up in the Edit XDI window, and some useful tips.
  • Notes: how to extract point spectra from phase maps: Mode > Pattern, then click on image (with 1D profile editor open)
  • Saving images of reasonable resolution?

-- LouisaSmieska - 27 Jan 2017
Topic revision: r6 - 27 Jan 2017, LouisaSmieska
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding CLASSE Wiki? Send feedback