March 2008, Last modified 31 October 2015
The special feature of this program is that it can average the reflectivity from up to three regions with different surface structures. This permits direct calculation of reflectivity when the lateral extent of 'patches' and 'holes' is large compared with the coherence length. (If the dimensions are small then it is possible to simply average the scattering length densities across the surface in the various layers). The program is an extension of drydoc which allows similar uniform models for a uniform interface.
A similar program that includes the imaginary part of the scattering length density, xspots, has been written to treat the case of X-rays where absorption can be significant.
This program provides a means of making interactive, graphical fits to neutron reflection data using multilayer models calculated using optical matrix methods. The parameters may be changed manually to explore the effect of different structural models or varied using a least squares algorithm. A simple structure with up to eight layers can be modelled.
It is assumed that there are similarities in the different regions such that the layer structure, if present is identical. The layers are defined and then the maximum number of layers used for the calculation is defined for each of 3 regions. The fractional coverage of each of the first two regions is input as parameters (labelled FReg1 and FReg2). The fractional coverage of the third region, FReg3 is given by:
FReg3 = 1 - (FReg1 +FReg2).
Note that there are no constraints on the values of FL1 and FL2 and if a scale factor is used in the model there will be correlations as these are simple multiplicative factors.
The program is intended for operation with Windows and can optionally be run with a GUI. The current version of is prepared using the MinGW Fortran compiler. The current version of spots is 1.8 .
The program is written in FORTRAN and uses the FITFUN fitting package and PGPLOT (T. J. Pearson, Caltech) graphics as modified by R. E. Ghosh from the ILL, Grenoble, France.
Installation It is recommended to run the program using clickfit and the utility 'Prop' available from the ILL. Instruction for download and use of Prop are available from the ILL WWW site.
Information about other fitting programs that will treat profiles, multiple data sets and other specific problems is available on the web at: http://www.reflectometry.net/refprog.htm
Instructions on the use of FITFUNS can be found in the documentation at the ILL, Grenoble.
The main options for the program are chosen from a 'Prelude' dialogue box that allows selection of the data format, number of layers, use of resolution function etc.
The default choices in the prelude can be changed by editing the appropriate .fcl file. Once the choices are made, the main program is controlled from a different interactive window:
The individual variables can be selected with a mouse and a new dialogue box appears that allows new values for parameter and the step size to be given. Other functions can be selected from the buttons or pull down menus. When display of data or a fit is calculated, it is shown in a separate graphics window:
Ten ASCII data formats can be read in the current version. These are:
The data format is selected in either the opening dialogue or the Clickfit 'Prelude'. A fuller description of the data formats is available at http://www.reflectometry.net/refdata.htm. The four column data set input has been added in August 2007. The 4th column provides information about Q resolution of the data.
In studies of complicated systems make sure that the model for the bare substrate fits the data measured for that system before proceeding to more complex systems. It is useful to build up from simple models (few layers) to more complex models (many layers) when trying to fit data. Check that the model is compatible with all contrasts before proceeding.
Resolution can be included in different ways: the normal function would be to assume a constant dQ/Q. A further option is either constant dQ or a combination of terms that have fixed values of dQ/Q and dQ. This resembles a function that approximates to fixed slits at various angles is available for scans made in this way (using the old version of D17 at the ILL.) Data from D17 is no longer normally collected in this way. Old versions of the program allowed definition of resolution in terms of the slit sizes etc but this. is no longer included in current versions.
If resolution is read from the input data file it is assumed to be the width parameter, σ of a Gaussian resolution function.
The roughness for the substrate and subsequent layers is given in Ångstrom. The roughness should always be substantially less (roughly a factor of 5) than the thickness of either adjacent layer. The calculation is not physically meaningful when the roughness is large.
The default options in this program is for equal weighting of the deviations for all the data points in the fits. This is often found to be more satisfactory than weighting by the errors which are frequently not appropriately chosen. Systematic errors and variation in the resolution may be large compared with the random errors particularly at large reflectivity (small Q).
The 'Extras' menu option 'Special function' or the 'Post fit' button allows access to two additional functions. These are (a) the capability to write the calculated model as an ASCII data file (with an arbitrary range and up to 512 data points) and (b) write a file that contains the profile modeled at the interface (a bsd file). For thsi program the description of the maximum 8 layers is always provided and the actual number for each region should be noted from the parameters for the number of layers in each region.
Do NOT try to fit automatically parameters that are intrinsically integer such as the number of layers in the various regions.
The program assumes that data for scattering length density is provided in units of 1 x 10-6 Å-2. If the momentum transfer, Q, in the input data files is in Å-1 then the thickness of layers must be given in Å.
The following summary of definitions may be useful:
The following diagram indicates this arrangement schematically for the simplified case of two regions (Flay1 + Flay2 = 1) and hence Flay3 = 0.
The roughness for the top material and subsequent layers is given in Angstrom.
The last parameters, the ranges for fitting and the limits for graphs are saved in a parameter file if the 'Save' option is used. These are the defaults when the program is restarted.
Further customisation of the defaults is possible by editing the clickfit configuration file that is used to start the program. An example (spots.fcl) is shown below:
vers|1.0 prog|spots.exe prpt|spot prld|wntle|spots-prelude prld|title|Spots - A.R. Rennie Version 1.8 30 October 2015 prld|Give data weighting 0-none;1-statistical |float|0| 0 | 1 | prld|Data type .dat 0; RAL 1; Afit 2; NIST 3; .TXT (ANSTO) 4; .OUT (ILL) 5; New .his 6; .mft 7; 3-col no header 8; mantid .mft 9 |float|9| 0 | 9 | prld|Fit data as R*Q**4 0-no, 1 yes |float|0| 0 | 1 | prld|Include resolution 0-none; 1 const dQ/Q; 2 const dQ; 3 dQ/Q + dQ; 4 input from data file |float|0| 0|4| prld|Resolution: for dQ/Q constant give % resolution |float|5.0|.1|30| prld|Resolution: for Delta-Q constant give value (A-1)|float|0.01| 1e-5 | 0.1 | prld|help|refprel.hhh rcmd|wntle|Reading new data rcmd|title|Reading reflectivity data rcmd|Data filename.ext|filer|a28708.dat| rcmd|help|refread.hhh main|wntle|spots - fitting a profile model with large patches to reflection data hcmd|wntle|About... hcmd|title|spots - Fit with a gui hcmd|View file/View helpfile |filed|spots.hhh jcmd|wntle|model output jcmd|title|Write out model for later comparison with data jcmd|Write out reflectivity file (1) or Interface as BSD file (2) |float|1|1|2| jcmd|Reflectivity file: Minimum Q value A-1 |float|0.0|0|4 jcmd|Reflectivity file: Maximum Q value A-1 |float|0.4|0|4 jcmd|Reflectivity file: Number of points in output |float|50|0|512 jcmd|Filename for output (with extension)|filew|spots.dat jcmd|Title for reflectivity results|text|Output from spots rstx|attempt restart function (dummy at present - rsta control name)
The default data types, resolution and even input data file name can be altered by editing the file.
Some information on updates may allow users to decide whether they need to download a ne version of the program.
A variant of this program is xspots that calculates with data that includes the imaginary part of the scattering length density and xmspots that can include simultaneous fits to multiple data sets.
A description of the methods used in these calculations is given in the Rutherford Appleton Laboratory Report: 'Adaptation of Methods in Multilayer Optics for the Calculation of Specular Neutron Reflection' by J. Penfold, No. RAL-88-088. Other details on the calculation of reflectivity profiles can be found in the books by O. S. Heavens, 'Optical Properties of Thin Solid Films', Dover and J. Lekner, 'Theory of Reflection', Nijhof.
Professor Adrian R. Rennie
Department of Physics, Uppsala University, Uppsala, Sweden
Program and documentation: © Copyright A. R. Rennie Last updated 31 October 2015