ADD2. Instrumental Parameters - dQ, alpha & lor
Overview
In this tutorial you will learn how to extract instrumental parameters from reciprocal- and real-space data. As with all refinements, the correct modelling of instrumental parameters is essential if you are going to extract fully quantitative and accurate values. For PDF data we need to not only know the affect of instrumental parameters from the reciprocal space data, but also the parameters used to generate your PDF data.
Required files
XPDF_Si_Bragg.inp
XPDF_Si_Bragg.xy
Si_NIST_640c.cif
XPDF_Capillary_Bragg.xy
XPDF_Si_Qmax20_dofr.xy
XPDF_Si_Qmax25_dofr.xy
XPDF_Si_Qmax38_dofr.xy
Tutorial instructions
First we start from an provided .inp file for a Rietveld refinement of a Si standard to determine some instrumental parameters.
Open XPDF_Si_Bragg.inp in VS Code. You will see a setup for refinement of an Si standard for X-ray diffraction data collected at an X-ray energy of 76.69 keV.
Turn on
'do_errors(i.e. remove the'from the start of the line), run the refinement in TOPAS and accept the result, then review the result in VS Code.The refined values for
dQ,alphaandlorare instrumental parameters for our PDF data. The refinedpdf_bkg_filescale factor gives us an indication of the scaling of the background to our data (this may be useful when processing data to PDFs).
Next we will try to extract the same numbers from our PDF data.
Start a new refinement with the file "XPDF_Si_Qmax38_dofr.xy" (TOPAS_for_PDF > 1. PDF Data > Select Data File) and save the input file as "Si_PDF.inp".
Start the refinement from an r of 1 Å (TOPAS_for_PDF > 1. PDF Data > file preparation > start r value).
Add a 'dQ damping with Lorentzian contribution' with approximate starting values for
dQof 0.05 andlorof 0.5 (TOPAS_for_PDF > 2. Instrumental parameters > dQ damping with Lorentzian contribution).Add a 'Q-dependent broadening convolution' with an approximate starting value of 0.001 (TOPAS_for_PDF > 2. Instrumental parameters > Q-dependent broadening convolution).
Add a new phase from 'Si_NIST_640c.cif' (TOPAS_for_PDF > 3. Phase information > 3b. add new phase from CIF).
Replace 'beq 1' with a 'beq spherical with min r cutoff' peak shape, with an rcut value of 2.7 (TOPASforPDF > 3. Phase information > beq peak shape functions > beq spherical with min r cutoff).
Turn on
do_errors, send the .inp file to TOPAS (Send INP to TOPAS), run the refinement in TOPAS, click Yes to save the result, and look at the results.How do the refined results compare with those from the Bragg data?
How do the errors compare?
Is it best to refine these values from PDF or Bragg data?
Now we will perform a joint refinement on both datasets at the same time. This will use a range of shortcuts to make this type of refinement easier.
Save your previous input file "Si_PDF.inp" as "Si_Joint.inp".
Declare the parameters
dQ,lorandalphaas global parameters towards the top of the file (before where thexddfilename is declared) and fix them at the values determined in your Bragg refinement.prm !dQ 0.05275 prm !alpha 0.00449 prm !lor 0.37618Change the
dQ_lor_dampingandconvolute_alphainstrumental functions so they use these declared parameters (these will no longer be refined).dQ_lor_damping( ,dQ, ,lor) convolute_alpha( ,alpha)At the bottom of the file, add the following block of code (note the code is likely wider than is displayed on this page!). The
for xddsandfor strscan be used to declare the same information across multiple datasets and structures, respectively.for xdds { for strs { a 5.43119 b 5.43119 c 5.43119 al 90 be 90 ga 90 space_group "Fd-3m" site Si1 x 0.000000 y 0.000000 z 0.000000 occ Si 1.0 beq_spherical(beqlo,0.1,beqhi,2.0,beqradius,20) } }This replaces the need to declare the same information below where you declare
strfor the PDF data, so now all this needs to include is thestrandscalekeywords, and nothing else.Copy everything from the
xddline down to the end of the file section from your Bragg refinement (XPDF_Si_Bragg.inp) into this input file, placing it below the PDF data but before thefor xdds {...}block (thefor xdds {...}needs to remain at the bottom of the file).The details of the structure from the Bragg data are no longer needed as they are already declared within
for strs. Delete everything apart from the lines forstr,scaleand thepkshape_dQ_alpha. Edit thepkshape_dQ_alphaso it is using the global parameters declared at the top of the file (pkshape_dQ_alpha( ,dQ, ,alpha, ,lor)).Run the refinement and look at the results.
Make it easier to turn on/off the different datasets by declaring the following parameters at the top of the file, and adding e.g. '
#ifdef Bragg' or '#ifdef PDF_Qmax38' before, and '#endif' after, each of thexddblocks (everything fromxddto below the line within thestr) within the .inp.#define Bragg #define PDF_Qmax38Experiment with turning on/off these data and running the refinements.
You have also been supplied with the datasets XPDF_Si_Qmax20_dofr.xy and XPDF_Si_Qmax25_dofr.xy, which are the same data but terminated to different Qmax. Use what you have learnt to add these data to the refinement in a way that allows you to easily turn them on/off using #define. For these data, you will also need to define a Qmax Sinc function convolution with a fixed Qmax (e.g.
convolute_Qmax_Sinc( ,20)), or the resolution will not match.Run the refinement and see how it converges.
Can you get all of the data to fit at the same time?
Final comments
The proper handling of instrumental parameters is essential when refining information accross multiple files and for extracting meaningful data from both Bragg and PDF data. The use of a good standard (e.g. Si) is necessary for this to work. For PDF data, not only the traditional instrumental resolution needs to be considered, but also PDF processing parameters such as Qmax.