Adrian R. Rennie
Department of Physics,
Uppsala University,
Sweden
Go to: Introduction, Program Description, Hints, Final Remarks.
Return to: Adrian R. Rennie Homepage
Although small-angle scattering is traditionally thought of as a tool for the study of size and shape of non-interacting particles and macromolecules, many studies are now concerned with concentrated systems. In these samples there may be particles at a sufficiently high concentration that interactions are significant. Indeed it is the study of inter-particle and intermolecular potentials that is the primary aim of some studies. In the study of soft materials there may be strong interactions but it is rare that extensive order as observed in conventional crystalline solids is found. The approach of crystallography is only rarely appropriate to SANS studies of colloids. Although many models can be developed to describe colloids and polymers only a few are easy to exploit as analytical functions to fit structural data.
For spherical particles it is possible to consider the scattered
intensity I(Q) that varies as the momentum transfer Q as the product
of three terms:
I(Q) = B . P(Q) . S(Q)
where P(Q) is the form factor that describes the size and shape of
individual particles, S(Q) is known as the structure factor or
interference factor and describes the interparticle correlations.
The factor B will be determined by the contrast and number of
scattering objects.
The program PYSHELL that is described in this note has two distinct uses that may be combined. It can be used to calculate the scattering from spherical particles with an effective 'hard sphere' potential. The form factor, P(Q), of the particles assumes a core-shell morphology with different contrasts between the inside and outside. The shell can be considered as being formed of a fixed component and solvent. The program can thus be used to study the effects of contrast variation in which the solvent is changed. If there are no interactions present, it is possible to omit the calculation of the structure factor entirely.
The calculation of S(Q) for spherical particles is described in
the article by N. W. Ashcroft and J. Lekner Physical Review
145, 83-90 (1966). They provide an algorithm for
the calculation of a structure factor that corresponds to the
radial distribution function G(r) proposed by Percus and Yevick for
hard spheres. The calculation of the form factor for
spherical core-shell particles arises in a fairly straight forward
way by calculating the amplitudes for successive particles of
different size and scattering length density. The amplitude for
the total particle can be calculated from combination of these
amplitudes. The coherent intensity is then calculated as the square
of the resulting amplitude. This is described, for example, in the
paper by I. Markovic and R. H. Ottewill
Colloid and Polymer Science, 264 , 65-76 (1984).
If the the amplitude for a paricle of radius R is given by A(QR) then
the scattering for a core-shell particle with an outer radius
R1 and an inner radius R2
is calculated as follows:
P(Q) = A2(Q) = { r1
( A(QR1) - A(QR2))
+ r2
A(QR2) }2
where r1 and r2
are the scattering length densities of the shell and the core
respectively (taken as a difference to that of the surrounding medium).
The expression for A(QR) is simply:
A(QR) = 3 (sin QR - QR cos QR ) / (QR)3
which gives the usual expression for the scattered intensity from a
sphere for the case R1 is equal to
R2 or if the scattering length density of
the shell is equal to that of the medium (r1
equal to zero).
Some care is often necessary in simple interpretation of scattering from dense systems of spherical particles as there are rapid changes in both S(Q) and P(Q) in similiar ranges of QR. Under these conditions, it is not possible always to assume that the position of the maximum in I(Q) will correspond to a maximum in P(Q). Polydispersity may considerably vary the intensity near the minima in P(Q). Some of these difficulties are discussed in Microstructure of Colloidal Dispersions under Flow A. R. Rennie and S. M. Clarke in 'Dynamics of Complex Fluids' M. J. Adams, R. A. Mashelkar, A. J. Pearson and A. R. Rennie (Eds.) Imperial College Press, London (1998). Some applications of this calculation can also be found in the work described by S. M. Clarke A. R. Rennie and R. H. Ottewill in 'Light Scattering Studies of Dispersions under Shear' Advances in Colloid and Interface Science 60, 95-118 (1995). It is straightforward to include the calculation of some polydispersity in P(Q) but the general problem of calculating interactions between polydisperse particles is complex and general solutions are not available.
The interactions between colloidal particles are certainly not always well-described by those of hard spheres. In many systems charge stabilisation will give rise to long-range interactions. Under a few circumstances, it may be useful to approximate the calculation of these interactions by spheres that are much larger than the particles but in general it will be desirable to use calculations of macro-ion interactions such as those of the rescaled mean-spherical approximation by Hayter and Penfold. Other programs such as SQCON and MSHELL include these calculations.
The program PYSHELL includes the possibility of computing the
broadening of the scattering due to instrumental resolution. This
can be very important when there are strong interactions or the
particles are very monodisperse. It is generally easier to
convolute a known instrument resolution with a model and fit the
measured total scattering intensity than to try to deconvolute the
data or extract S(Q) numerically from I(Q). Although it might
appear superficially attractive to measure P(Q) with a dilute
sample for which S(Q) is adequately close to 1 over the entire range
of Q and divide the scattering from more concentrated dispersions
by this result as follows:
S(Q) = I(Q) / B . P(Q).
The broadening due to resolution that would be convoluted with
both measurements of I(Q) and P(Q) may lead to significant errors as it
would not simply cancel on division in the above equation.
The recomended procedure would be to use the data for a dilute sample
to establish some fit parameters that are then used (and held
constant as appropriate) in subsequent fits to data from more
concentrated samples. The program PYSHELL always calculates
I(Q).
Go to: Introduction, Program Description, Hints, Final Remarks.
This program will allow interactive graphical fits to SANS data of core-shell particles interacting as hard spheres. It uses the FITFUN (http://www.ill.fr/Computing/fitfun.htm) library developed at the ILL by Ron Ghosh. The interactions are calculated according to Ashcroft and Lekner for the Percus-Yevick model. Some instrument resolution and polydispersity can be included in the calculations.
The data to be analysed is assumed to be in a the standard
format for ILL averaged data. This is described in documentation
at the ILL -
ILL SANS Treated Data Formats http://www.ill.fr/data_treat/sanstreateddata.html.
Some information on how to convert data from other facilities can
found in the following references:
http://www.ill.fr/data_treat/sanstreat.html#foreign
http://www.ch.kcl.ac.uk/kclchem/staff/arr/convert.htm
Although the implicit assumption is made that the data comes from
SANS experiments, the experienced user will find that the program
can also be applied to X-ray and light scattering results if suitable
allowance is made for the different contrast.
The data will normally consist of header information, and then a table of Q, I(Q), ErrI(Q). It is important that some errors should be provided as the program will set to zero weight in the least-squares fit all points with zero error. This is to allow fitting of data sets where masking or shadows of a beam stop have systematically altered the data.
The model is described by the following parameters:
The resolution is calculated assuming that there are components of instrument broadening arising from both the wavelength spread and the finite angular resolution. The scattering is calculated by averaging the calculated I(Q) over a range of Q values appropriate to the width of the resolution function. The resolution is assumed to be a Gaussian function with a width that varies with Q. One component arises from the spread in wavelength and will be effectively constant with Q but the effect of angular divergence will vary with Q.
The resolution is defined by the following parameters:
Although much of this information can be found in some data files, it is common that the correct values have not been stored and it is useful to verify that the data is sensible. If studies are made of well defined spherical particles, the resolution may be very important in modifying the sharp fringes that might otherwise be observed.
Strictly the calculation of resolution broadening in this way is only appropriate to 'pin-hole' scattering cameras with a monochromatic beam. On other instruments such as time-of-flight SANS, the resolution will not take the same form. Indeed as the scattering at given Q arises from many wavelengths, it is not possible to calculate the 'resolution function' without the knowledge of the scattering distribution. In practice a reasonable approximation to the resolution may be obtained by suitable adjustment of the parameters. Data from Bonse-Hart double crystal cameras or slit geometries (e.g. Kratky cameras) will require separated desmearing routines.
This program is currently available for Silicon Graphics Unix and for PC's that run DOS (or DOS prompts from Windows 3.1, Windows 9x, Windows NT, 2000 etc.). The programs are functionally similar but under Windows/DOS the program will only work with full screen mode. Currently version 3.1 of pyshell is available for both PC and Unix.
The program will require that certain environment variables are set.
In particular the
PGPLOT graphics library as used at the
ILL will require devices for
screen and hard copy output to be defined. Some advice on the use
of the program on a PC can be found with the description of the
standard ILL SANS treatment programs that are available for PC's. This
information is in the following ILL Technical Report:
R. E. Ghosh, S. U. Egelhaaf, A. R. Rennie A Computing Guide for
Small-Angle Scattering Experiments Institut Laue-Langevin, Grenoble,
France ILL98GH14T (1998) available as a
PDF file.
Aspects specific to use of programs under DOS or Windows are
summarised as notes on the WWW at
http://www.ill.fr/data_treat/pcsans.html. The original
documentation about the PGPLOT library can be found at the following
location:
http://astro.caltech.edu/~tjp/pgplot/.
The program will require the fonts in grfont.dat. The Windows/DOS version of the program requires a run-time library DOSXMSF.EXE and the fonts to be in the current path. These are described in the documention listed in the previous paragraph.
Go to: Introduction, Program Description, Hints, Final Remarks.
When starting to fit data it is often advantageous to use a simple model and to fit the simplest (clearest) data. Choose a contrast that has a well defined structure or a system with known parameters. It is sometimes expedient to vary the parameters manually at first to get some idea of their relative significance and appropriate orders of magnitude.
The program will run much faster if there is no resolution or polydispersity included in the model. On slow computers this may significantly alter the performance as extra loops of model calculation have to be made for each of these terms.
Save the parameters at regular intervals with the S command. Although there is some attempt to protect the program, some combinations of values can cause the calculation to crash. If the values are saved, it will avoid having to enter them all again.
Within the main loop of the program, the command Help
will provide instructions on operation of the FITFUN routines. More
information can be found on the command structure and the fitting
algorithms in R E Ghosh ‘Fitfun 96’ ILL Technical Report ILL89GH08
and some notes at the following WWW location:
FITFUN (http://www.ill.fr/Computing/fitfun.htm).
Sometimes it may be desirable to calculate a defined model rather than fit a model to a data set. It is possible to do this indirectly by creating a dummy data set (possibly containing only a first and last point) and performing a simple calculation with the F 0 command. The model will be displayed at the data points. This difficulty can be overcome by setting a small fit range with the O (Only) command and an extended plotting range with the command X Xmin Xmax.
The data from a model calculation or (a fit) can be exported by using the option to save the model at the end of the program. This writes the data in the form of a standard input file. An alternative procedure is to use the W command within the fitting procedure that produces simple ASCII output of the data and the model.
This section describes a few common problems that are mostly related to use of PC versions and obtaining screen or hard copy displays.
(a)Printing Graphics
It may be necessary to modify the command files that run the programs if
non-postscript printers are used. For a HP laserprinter or deskjet try:
SET PGPLOT_ILL_DEV_2=/HJ
The postscript output can be altered to different formats (e.g. number of
plots per page or orientation). See the information on the graphics library
for full details.
(b)Display Problems
On some PC systems it may be necessary to define the graphics system and a
line of the following form should be added to the the .BAT files:
SET PGPLOT_VIDEO=VGA16
(or SGA16 or VGA25 or SGA25).
(c) If the program does not find the fonts the directory of grfont.dat is not
in the current path and blank plots will appear. Check that all the
environment variables are correctly set with the command:
SET
which will then show all the current variables (for the DOS window if running
under windows).
Go to: Introduction, Program Description, Hints, Final Remarks.
Copies of this program can be made available for academic, non-profit use by contacting the author at the address given below.
It is hoped to extend the documentation to give a more complete description of the calculation of S(Q) and the use of this program as time permits!!
No responsibility can be taken for the correct function of this program. Please check the operation very carefully. The author would be pleased to hear of any errors.
I am very grateful to Dr Ron Ghosh of the ILL, Grenoble for his assistance and for making available his library of programs.
Go to: Introduction, Program Description, Hints, Final Remarks.
Return to: Adrian R. Rennie Homepage
Please address any comments or report any errors to:
Professor Adrian R. Rennie
Copyright Adrian R. Rennie - 1998, 2002, 2005 Last Modified 26 october 2005