XRD Data Analysis
12 Nov 2009
Yes
-  

 

 

Using GudrunX to analyse X-ray data

No
GudrunX screenshot
 

​Introduction

GudrunX is an in-house program which has been developed to perform the necessary data reduction steps to convert raw X-ray data into a structure factor.  GudrunX​ allows corrections to be made for effective density, absorption, multiple scattering, Compton scattering and bremsstralung.  In addition GudrunX offers the option of using various sharpening factors.

Installing Gud​runX

Once you have obtained the GudrunX zip from the main Gudrun page​, extract the files onto your PC.  You should also ensure that the latest version of Java is installed.

Inside the main folder you will find the GudrunX.bat file required to start the program (assuming you are using Windows), the various files needed to help it run, and several sub folders.  These folders are:

  • bin, which contains external binaries necessary for the operation of GudrunX
  • RawData, where the raw .XRDML can be saved
  • Run, where the input file and the output files GudrunX generates can be stored.

Once you have extracted the files onto your PC, you will need to ensure that Gudrun is looking for files in the correct places.  You will need to edit the file 'GudrunX_window.syspar' using a text editor.  The first two lines refer to executable files in the GudrunSourceX folder, and you must ensure that these have the correct directory.

For example:

C:\Gudrun\bin\calc_corrsx_in_out.exe;
C:\Gudrun\bin\tophatsub.exe;

The subsequent lines point to files in the Gudrun directory and do not need to be edited.  Now you should save the file, and open GudrunX by clicking on the GudrunX.bat file.  Check the alterations to the .syspar files have been successful by going to the "System" menu and selecting "Set system parameters", and review the output in the window which appears.

Setting Up an Input File​

When GudrunX is opened, it defaults to displaying information from the XRDstartup_windows.txt file.  This contains information for the instrument, beam, normalisation and sample background and should be set up correctly to let you get started.  

Instrument panel: This panel is primarily used to give Gudrun the various files it needs to run, and the location of the input file (in C:\GudrunX or C:\GudrunX\run for example) and the location of the raw data files.  GudrunX requires three files from the GudrunX folder to run

  • Cross section file:          CrossSec_XCOM.txt, 
  • Form factor file:              f0_WaasKirf.txt 
  • Compton scattering file: CrossSec_Compton_Bayuzi.txt
Instrument panel 

Instrument panel - View full-size image

Beam panel: Nothing should need to be changed on this panel, although you should ensure that the bremsstralung file is correctly located.

Beam panel 

Beam panel - View full-size image

Normalisation panel: This is the first panel which you will have to edit to ensure the data GudrunX outputs is in the form you require.  Two options for the sharpening are given, Sum(cifi2) or Sum(cifi)2.  You should choose the method which you prefer.  If in doubt, consult your instrument scientist.

The Breit-Dirac factor should be a number between 2 and 3.  It has limited impact on the resultant S(Q), so leave as 2.5 unless you have a good reason for altering it.  You can also change the method of normalisation, but the Krogh-Moe/Norman method is recommended.

Normalisation panel 

Normalisation panel - View full-size image

Sample background panel:  This is the final panel which will be opened on starting GudrunX.  An initial sample background file will be given, but you should alter this to the empty diffractometer file given to you after your experiment.  You should reduce the background factor to somewhere between 0.85 and 0.95.

Background panel 

Background panel - View full-size image

 

Once you are happy with the settings in the first four panels, the sample and sample holder panels can be added through Edit→'Insert SAMPLE' or 'Insert CONTAINER'.  These tabs can then be renamed through Edit → Rename.

Although the sample tab should appear in the list before the container tab, the latter is much simpler to edit.  Both panels require:

  • .XRDML file names (the location of the files should be set in the instrument panel)
  • Sample composition
    • Element symbol,
    • Form factor symbol- usually the element symbol unless you wish to use ionic form factors,
    • Composition - amount of each element either as a fraction (0.333 and 0.667) or formula unit (1 and 2).
    • q and delta - always zero
  • Inner and outer dimension of the material
  • Sample height, 2 cm unless an unusual XRD configuration was used
  • Effective density and tweak factor
  • Total cross section- select 'Tables'

Container Panel: When setting up the container information, the inner and outer radius of the capillary is required.  The first value is the radius of the capillary, and the second includes the thickness of the capillary wall.  For a 0.5mm capillary supplied by ISIS the values would be 0.025 and 0.026.  

The density of the capillary is well known, but it should be considered that when the capillary is full, some scattering from the capillary will be lost.  To account for this the container tweak factor should be increased from 1.0.  This will have the effect of reducing the amount of scattering ​from the container that is removed from the sample data.  As a guide, this value should be between 1.2 and1.4.  

Inspection of the amount of signal in T(r) at 1.6 Å will give a good guide to how the tweak factor should be altered.  See related links for more information.

Container panel 

Container panel - View full-size image

Sample panel: The sample panel also requires an effective density for your sample.  Ideally a measurement of this should be made while loading the capillary but if this was not done, and good starting point would be to enter the actual sample density and set the tweak factor to ~2 (50% packing).  Depending on the sample the packing fraction could be lower than 25%.

When adding a new sample tab, make sure that the number of iterations is greater than 1, otherwise F(Q) will not alter. 

GudrunX is not as straightforward to use as Gudrun, and some experimentation with the parameters should be expected to get a good fit.  The majority of this parameters are in the sample panel and they are:

  • Effective density,
  • Flourescence - a particular problem for elements in the same row as Ag,
  • Multiple scattering,
  • Polarisation - should be left as 0,
  • Compton scattering - should be left as 1,
  • Bremsstralung - should have a number around 0.55

Sample panel 

Sample panel - View full-size image

Once you have some initial values in GudrunX, you should first check that all the files needed can be found Run → 'Check files exist' and then the program can be started Run → 'Run GudrunX'.  GudrunX will then go through several iterations to scale the experimental data with the calculated form factor for the sample, after the various corrections have been applied.  Once the program has finished, the newly calculated Sample calibration factor will be given on the sample panel, and the output files can be viewed.

It can take a lot of work to get your data looking right - patience is required!  Information on how to view and improve the outputs for GudrunX will now be discussed.

Viewing Outputs​

Once GudrunX has been successfully run, the data can be viewed in gnuplot.  A program for plotting the data can be run from GudrunX through Plot → 'Generate gnu plotting file

In the plotting window you can add files, specify the y data which you would like to plot and alter the pen colour.  

Plotting data 

Plotting data - View full-size image

 The output files from GudrunX which need to be viewed to assess the quality of the S(Q) are 

  • .subcan - this file contains many rows of data but the 1st y data set gives the experimental data (red), the 2nd contains the form factor data (green) to which the experimental data is scaled, and the 6th is the calculated bremstralung (blue).
subcan file 

subcan file - View full-size image

  • .soq- this file contains the sharpened S(Q) data and the statistical error. 
soq file

soq file - View full-size image

  • .gofr - if the option to calculate g(r) is selected, then a very rough g(r) is given in this file.  This can be quickly used to assess the quality of the data.
gofr file 

gofr file - View full-size image

The data shown here has been well corrected, S(Q) oscillates around zero and there is no positive or negative residual peak from the silica capillary in G(r).  Your first attempt will probably not look this good, and experimentation and patience is required to improve the outputs.  To improve S(Q), the most likely variables which will need altering are the effective density and the multiple scattering.  If you cannot extract a good S(Q) by altering these two values, then consider varying the level of fluorescence (increasing it from zero) and the bremsstrahlung correction (altering it from the starting value of 0.55).  These changes should be done with caution. 

You should not change the compton scattering factor or the polarisation.

If there is a noticeable peak at ~1.6 Å which should not be present, vary the amount of container scattering which is being subtracted from the experimental data.  If your data contains elements which will result in bond lengths similar to those of Si-O, this correction will be more difficult to perform, and you should be cautious when interpreting the data.  For advice, contact your instrument scientist.​



Contact: