Skip to content
Frank Heberling edited this page Aug 23, 2013 · 14 revisions

Modeling resonant interface diffraction data in the python interface structure refinement GUI

As non-resonant structure factors are a necessary prerequisite for resonant data modeling, CTR data and a good CTR model need to be loaded to the Main Control and Parameter Panel of the GUI as described here before you can start to work on resonant data. Modeling resonant and non-resonant surface diffraction data is a highly iterative process, especially if the resonant element has a big impact on the CTR model. Therefore it is anyway most convenient to model both types of data in the python interface structure refinement GUI.

Once the non-resonant Model is in a good shape you can swith to the Resonant Data Panel and type the Resonant Element into the corresponding text box. The atomic number, Z, should be filled in automatically. Then you specifiy the edge-energy (e0 + e0shift, used to produce f1f2 data). After that you load the .f1f2 file you wish to use to compute resonant amplitudes and phases, by choosing Read .f12f2 file in the RIDS Files menu. How such a file can be obtained is described here.

In the next step you Read resonant data files by choosing the corresponding option from the RIDS Files menu. The file expected here should be a text file listing the file names of all the resonant data files ( .rsd files ) you wish to load. E.g. "resonant_data.txt" containing:

 rasd00_0.36.rsd
 rasd00_0.54.rsd
 rasd00_0.74.rsd
 rasd00_0.94.rsd
 ...

For every imported scan a line should appear in the right part of the Resonant Data panel. Clicking on the button labeled with the file name produces a plot of the corresponding RIDS scan and a optimal fit based on your f1f2 data and the non-resonant structure factor according to your CTR model. Clicking the check box " plot data background corrected " allows you to decide whether you want these plots to show raw data or background corrected data. Besides the file name button the best fit resonant amplitude, AR, and resonant phase, PR, are written together with their standard deviations. The following two check boxes allow you to choose if you want to consider a dataset in a Fourier synthesis ( UIF ) or for structure refinement ( UIR ). The two text boxes on the right show AR_m and PR_m values corresponding to your structural model. They are updated after each refinement run.

Initial positions and parameters of resonant atoms in the structure model are defined in the surface file. The parameters influencing them need to be listed in the parameter file and can be handeled in the Parameters panel, exactly as for the non-resonant atoms.

Absorption correction calculations are so far only implemented for the thin film cell geometry. If you check the corresponding box you need to provide water film thickness (in meter), the concentration of the resonant element in the solution (in mol/m**3), and the Kapton film thickness (in meter). Once you press the Calculate absorption correction button, all resonant data and AR and PR values are adjsuted, and all following operations will be performed on absorption corrected data (you can of course switch back).

The coolest thing about resonant interface diffraction is that it allows straight forward Fourier Synthesis of the resonant element's electron density distribution at the interface. As we are dealing with non-integer HKL positions of the Fourier components the size of the cell used for Fourier Synthesis may be larger than one unit cell. The cell size for Fourier Synthesis and how deep below the surface this cell starts (in unit cells) can be defined in the text boxes above the Calculate Fourier Synthesis button. Text boxes on the right allow you to define the resolution with which the electron density in the specified cell is synthesised. Pressing the Calculate Fourier Synthesis button will launch calculation and produce an extra Fourier frame with various options to depict the electron density. (Note: Fourier Synthesis is still an area under construction. Especially normalization of the electron density distribution is still an issue, but relative electron density should be correct. For absolute electron density values you may compare the projection of electron density on the surface normal to the graph produced by Plot edens on the Main Controls panel (this one is correct). So far the projections of electron density onto various planes are all orthogonal. For non-orthogonal unit-cells images will be distorted.)

Modifications to the checkboxes: check to refine data, uncheck for AR and PR and check to use layered resonant element model are special issues and only recommended for experienced users.

The Ar(Q) Pr(Q) button produces a plot of specular resonant data (RAXR data) and a continuous plot of the AR and PR modulation along the 00L direction according to the structural model. Qmax specifies up to which L value this plot is calculated and shown.

Run Refinement launches a structure refinement of resonant atoms based on resonant data. Parameters to adjust are chosen from the Parameters Panel. Optimization is performed using a Simplex algorithm as for CTR data.

Calculate resonant parameter statistics calculates standard deviations of the parameters modifying resonant atoms and used for refinement, based on their influence on the resonant data. (In contrast, parameter statistics in the Main Control panel and Parameters panel are calculated according to the influence of a parameter on the CTR data.)

(Note: Uncertainties calculated here are usually very small, which is due to the large number of data points in resonant scans currently considered in the calculation. The true number of independent points in a resonant scan is probably much smaller (maybe just two, Ar and Pr ?!?). This will make uncertainties much larger. I'm happy about any suggestions how to deal with this.)

Once you are done with modelling, the write RIDS data command from the RIDS Files menu dumps all resonant data and model curves, best fit and model AR + PR values, and continuous AR + PR along the specular rod into a file. For plotting in other software or for further analysis.

Save the current parameters using Write Parameter File from the Write Files menu to be able to get back to the same structure.

Clone this wiki locally