Diamond Home Page
  • Diamond Home Page
  • About Us
  • For Users
  • Industry
  • Public
  • Science
  • Instruments
  • Careers
  • More
Search

On this website

About Diamond

  • About Diamond
  • About Synchrotron
  • News and Features
  • Events
  • Contact Us
  • FAQ

For Users

  • Apply for beamtime
  • User guide
  • Diamond Users Commitee
  • FAQ

Industry

  • Techniques Available
  • Industry Research
  • Industry Case Studies
  • News
  • Meet the Industry Team

Science

  • Research
  • Computing
  • The Machine
  • Publications
  • Research Expertise
  • Membrane Protein Laboratory
  • Additional Facilities

Instruments

  • All the Instruments
  • Macromolecular Crystallography
  • Soft Condensed Matter
  • Imaging and Microscopy
  • Biological Cryo-Imaging
  • Magnetic Materials
  • Structures and Surfaces
  • Crystallography
  • Spectroscopy

Careers

  • Vacancies
  • Info for applicants
  • Company Benefits
  • Apprenticeships
  • PhD Studentships
  • Work Placement

Public

  • News
  • How Diamond Works
  • Multimedia
  • Features
  • Visits Us
  • For School

Procurement

  • Non-OJEU Tender Notices
  • OJEU PINs
  • OJEU Tender Notices
  • Registration Form

Software & Tools

  • Publications Database
  • iSpyB
  • User Administration System

Main Content

Soft Condensed Matter - Small Angle Scattering
Sub-navigation
  • Small Angle Scattering
  • Beginner's Guide
  • B21
  • I22
  • DL-SAXS
  • Software for SAXS
  • Staff-Research
  • Events and Conferences
  • Contacts

In This Section

Sub Navigation
  • SAXS GDA
  • SAXS Data Reduction
  • CCP13
    • BSL
    • CORFUNC
    • FD2BSL
    • FDSCALE
    • FibreFix
    • FISH
    • FTOREC
    • HELIX
    • LSQINT
    • MusLABEL
    • SAMPLE
    • XCONV
    • XFIT
    • XFIX
    • XOTOKO
    • Fibre Diffraction Review

Instruments by Science Group

Macromolecular
Crystallography
Soft Condensed
Matter
Imaging and
Microscopy
Biological
Cryo-Imaging
Magnetic
Materials
Structures and
Surfaces
Crystallography
Spectroscopy

Science Group Leader

Robert Rambo

Email: robert.rambo@diamond.ac.uk
Tel: +44 (0)1235 56 7675

  1. Instruments
  2. Soft Condensed Matter
  3. Small Angle Scattering
  4. Software for SAXS
  5. CCP13
  6. XFIX

XFIX

XFIX: Preliminary Analysis of Fibre Diffraction Patterns

Introduction

XFIX is designed to help ascertain some important parameters of a fibre diffraction pattern with the aid of an OSF/Motif-based graphical user interface (GUI). The job of the GUI is to handle the display images, collect information specifying regions of the data and to communicate with the program FIX which performs much of the underlying data-processing.

Information such as the pattern centre, detector orientation, fibre tilt can be estimated and refined and putative unit cells can be plotted over the pattern. In addition, more general functions are available such as the capability to plot and fit integrated slices or scans through the pattern.

The XFIX Main Window

The top part of the main window is comprised of a menubar, some text fields for displaying the current file name, the current frame number, the (x,y) coordinates of the pointer, the (interpolated) value at the pointer coordinates and two arrow buttons to switch between images either side of a text field which indicates the current image number. If no file has been specified, the image number field is blank. Once a file has been specified, the first image displayed (the whole frame) is numbered zero.

The middle part contains the large scrolled image area, the magnified area, two text fields for specifying the current display thresholds, two push buttons for inverting the current palette and refreshing the display and a set of toggle buttons used to specify subsequent behaviour and use of the pointer and mouse buttons.

The bottom part contains a scrolled text window for displaying output from the processing program, FIX and commands sent to FIX by the XFIX interface.

The File Menu

  • New ...
    This allows the user to specify a file using the BSL File Selection interface. A new XFIX interface will then appear with the specified file loaded.
  • Open ...
    This allows the user to specify a file using the BSL File Selection interface. The specified file will then be loaded into XFIX.
  • Next Frame
    This loads the next frame from a multi-frame file.
  • Goto Frame ...
    This loads the frame number specified by the user from a multi-frame file.
  • Save As Postscript ...
    This saves the current image as a Postscript file.
  • Quit
    This exits the program, subject to confirmation by the user.

The Edit Menu

  • Parameters ...
    This causes the Parameter Editor dialog to appear. This interface is used to specify wavelength, sample to detector distance, detector centre and orientation, sample tilt. If a calibration ring is present on the image it may be useful to specify the calibrant d-spacing in order to calculate the sample to detector distance. Even if the default values for the wavelength and calibrant d-spacing are known to be correct, it is necessary to "OK" or "Apply" the values using this interface so that the sample to detector distance is calculated.
  • Objects ...
    This causes the Object Editor dialog to appear. This interface handles some of the items which can be collected from the data: points, rectangles, polygons and sectors. These items can be selected in the editor and will then be highlighted in image window (objects are normally labelled white on a black background; selection causes the background to become red). Selected objects will be used if estimation of the pattern centre, detector rotation or sample tilt is performed. If no objects are selected and one of these functions is requested all objects will be used.
  • Lines ...
    This causes the Line Editor dialog to appear. This interface handles lines and thicklines collected from the data. These items are labelled white on a blue background; selection causes the background to become green. Selected lines can be plotted or fitted. If no lines are selected and plotting or fitting is requested, all lines are processed.
  • Scans ...
    This causes the Scan Editor dialog to appear. This interface handles radial or azimuthal scans collected from the data. These items are labelled white on a blue background; selection causes the background to become green. Selected scans can be plotted or fitted with radial or azimuthal averaging. If no scans are selected and plotting or fitting is requested, all scans are processed.
  • Cell ...
    This interface is used to specify unit cell lengths and angles and the missetting angles of the unit cell away from the fibre axis. The cell parameters can be used to generate reciprocal lattice points which are listed and mapped onto the diffraction pattern within the specified resolution range.

The Estimate Menu

  • Centre
    The centre of the pattern is estimated using the objects defined by the Object Editor. If three or more points are available, the estimation is made by fitting a circle to the objects. If the wavelength or calibrant spacing have been specified using the Parameter Editor, the option is given to calculate the sample to detector distance.
  • Rotation
    The rotation of the pattern is estimated using a pairs of objects defined by the Object Editor. It is usually sufficient to select one pair of objects related by mirror symmetry across the meridian as the rotation can be refined later.
  • Tilt
    The tilt of the sample is estimated using a pairs of points defined by the Object Editor. It is usually sufficient to select one pair of points related by mirror symmetry (for an untilted sample) across the equator as the tilt can be refined later.

The Process Menu

  • List Objects
    This causes FIX to calculate and list the filespace, standard (i.e. centred and rotated) and reciprocal space coordinates for each object if the required parameters have been entered or determined for each calculation.
  • Plot Lines ...
    This causes selected lines to be plotted (and possibly fitted) using the XFIT interface to FIT. If no lines are selected, all lines are plotted.
  • Plot Scans ...
    This causes selected scans to be plotted (and possibly fitted) using the XFIT interface to FIT. If no scans are selected, all scans are plotted.
  • Refine ...
    This causes the Refine Dialog interface to appear. The parameters for the refinement can be chosen and clicking on "OK" starts the refinement. The refinement algorithm uses the current image as data, mapping the coordinates of the image into the four quadrants of reciprocal space in order to compare the data in the quadrants and minimize the variance between quadrants. This means that the current image should be carefully chosen (not too big, but not so small that there is little contrast in the image, not too close to the equator if sample tilt is being refined but the intensity on the image should be present on all four quadrants of the image).
  • Background
    This allows the background component of the diffraction pattern to be estimated using one of the following three methods:
    (a) Paul Langan's "roving window" method.
    (b) Calculation of a circularly-symmetric background.
    (c) Calculation of a "smoothed" background through iterative low-pass filtering based on the method of M.I. Ivanova and L. Makowski (Acta Cryst. (1998) A54, 626-631).
    These methods are described fully in the section on background estimation.

The Options Menu

  • Palette >
    This contains options for a grey scale and various colour representations of the pixel values.
  • Magnification >
    This contains options for the factor applied in the magnification window.
  • Line Colour >
    This contains options for the colour with which crosses, rectangles, sectors and circles will be drawn.
  • Lattice Point Colour >
    This contains options for the colour with which lattice points will be drawn.
  • Log Scale
    This causes subsequent threshold changes to scale the data on a logarithmic scale.
  • Interpolate
    This causes subsequent images to be interpolated to fit the current image window size. This happens automatically for zoomed images.
  • Fit Lines/Scans
    This allows subsequent plots of lines or scans to be fitted.
  • Show Lattice Points
    This causes subsequently generated lattice points to be drawn onto the current image. If there are any lattice points in memory, these will be drawn immediately.
  • Azimuthal Scan
    This causes subsequently plotted scans to be integrated radially and the integrated values to be plotted as a function of angle.
  • Radial Scan
    This causes subsequently plotted scans to be integrated azimuthally and the integrated values to be plotted as a function of radius.

The Help Menu

The HTML help documents are displayed in your current Netscape Web browser.

Image Thresholds Selection

The threshold values for displaying the current image can be set by editing the threshold text fields (labelled "High" and "Low") and hitting <return>. When an image is first loaded, the thresholds are set to the maximum and minimum values in the data for that image.

Inverting the Current Palette

The "Invert Palette" button reverses the colour scale of the current palette.

Refreshing the Image Display

The "Refresh" button can be used to redraw the image windows. This can be useful if another application has modified the colour map or if it is desired to erase circles or crosses drawn by FIX.

Data Collection Tools

To facilitate collection of various data items from the current image, a set of toggle buttons is provided which determine the behaviour of the mouse buttons and pointer.
  • Points
    "Points" mode causes the image in the magnification window to track the position of the pointer in the main image window. Points can be created by clicking the left-hand mouse button. Alternatively, tracking of the pointer can be frozen by clicking on the middle mouse button and the point can then be positioned in the magnification window using the left-hand mouse button. Tracking of the pointer can be restarted by clicking on the right-hand mouse button in either the main image or magnification windows. On creation, the point is numbered and displayed in the Object Editor.
  • Lines
    This mode allows lines to be created by holding down left-hand mouse button and dragging the pointer to select the starting point, the end point being selected in a similar way using the middle mouse button. The line is not created until the right-hand mouse button is pressed to indicate that the user is satisfied with the start and end points selected. While the pointer is being dragged, its position is tracked by the magnification window unless the tracking has previously been frozen while the interface was in "Points" mode. If this is the case, lines can also be selected from the magnification window. On creation, the line is numbered and displayed in the Line Editor.
  • Thick Lines
    This is similar to "Lines" mode except that the line is now considered to have a width and is drawn as a rectangular box. The width of the box can be adjusted by holding down the <shift> key while holding down the left-hand mouse button and dragging the pointer.
  • Rectangles
    This is essentially similar to "Lines" mode, except that the left-hand mouse button selects the top left-hand corner of the rectangle and the middle mouse button selects the bottom right-hand corner of the rectangle. On creation, the centre of the rectangle is marked with a cross and the rectangle is numbered (as an object) and displayed in the Object Editor. Centring is achieved by averaging data values along the perimeter of the rectangle to obtain a background value. This value is then subtracted from data points interior to the rectangle and the centre of gravity of the modified values is calculated.
  • Polygons
    This is similar to "Rectangle" mode except that the left-hand mouse button selects a vertex, the middle mouse button deletes the last vertex and the right-hand mouse button closes and creates the polygon.
  • Sectors
    This is essentially similar to "Rectangle" mode except that the left-hand mouse button selects the starting angle and radius and the middle mouse button selects the end angle and radius. Radii are measured from the pattern centre as defined in the Parameter Editor and angles are positive going anticlockwise on the image.
  • Scans
    This is similar to "Sector" mode except that the parameters describing the area chosen are stored so that scans can be produced: a radial scan implies averaging over an arc defined by the azimuthal range for each radius while an azimuthal scan implies averaging over radius. On creation, the scan is numbered and displayed in the Scan Editor.
  • Zoom
    This is essentially similar to "Rectangle" mode except that the rectangle chosen is blown up to the current size of the main image window using bilinear interpolation to find intermediate pixel values.

Plotting and Fitting

Lines and scans can be plotted and fitted using many of the interfaces developed for the XFIT program which utilizes PGPLOT graphics. Plotting is activated using the "Plot Lines/Scans" button in the "Process" menu. In the following description, where the word "line" is used, "scan" could be substituted.

Channel Selection

When a line is plotted the distance between the start and end points of the line is divided into a sequence of channels, the length of a channel corresponding to the size of a data pixel. The values placed into the channels are found by interpolation of the data values. The first and last channels for plotting can be entered in the Channel Dialog box which appears soon after plotting has been activated. Clicking on the "Cancel" button in the Channel Dialog box will cause XFIX to move on to the next line selected for plotting.

Plot Thresholds Selection

When the data for the line are plotted, the thresholds for the plot will be the minimum and maximum channel values present in the selected channels. If necessary, these can be altered by entering the appropriate values into the Threshold dialog box. Clicking on the "Cancel" button in the Threshold Dialog box will cause XFIX to move on to the next line selected for plotting.

Selection of the region to be used in the fit

If the data is to be fitted ("Fit Lines/Scans" has been selected in the "Options" menu), the user can choose to delimit the region to be used in the fit using the Limit Dialog box. The limits can then be selected by clicking on the plot with any mouse button. Once the limits of the region have been selected, the plot will be redrawn using only the required region.

Peak Type Selection

Six peak types are available:
 

Peak type  Key  Parameters 
Gaussian  g  3 
Lorentzian  c  3 
Pearson VII  p  4 
Voigt  v  4 
Debye Gaussian chain scattering  d  3 
Double exponential  x  4 

The selection is made by pressing the appropriate key while the focus is in the plot window. All subsequent peaks will be of the same type until a different peak type is selected. The default peak type is Gaussian.

Peak Parameters

The formulae used for the different peak types give different meanings to the descriptions width and shape. In what follows, the position of the peak is assumed to be at the origin of the x-axis, h is the height of the peak, w is the width and s is the shape. Peak widths are the full width at half maximum (FWHM) unless otherwise stated.

  • Gaussian
    y = he-4ln2(x/w)2
  • Lorentzian
    y = h/[1 + 4(x/w)2]
  • Pearson VII
    y = h/[1 + 4(x/w)2(21/s-1)]s
    When s = 1, the Pearson VII is equivalent to a Lorentzian but as s increases, the peak becomes more Gaussian in character.
  • Voigt
    The Voigt is a convolution of a Lorentzian with a Gaussian. The shape parameter, s, corresponds to the ratio of the width of the Lorentzian to the width of the Gaussian, w. Therefore, when s = 0, the resulting curve is a Gaussian of width w. This can be expressed as:
    y = h Integral e-4ln2(t/w)2/ [(x+(2ln2/w)2 + ln2s2]dt 

    An approximation is used:
    y = h [&Sigma;i=14 (Ci(s/2 - Ai) + Di(2ln2x/w - Bi)) / ( (s/2 - Ai)2 + (2ln2x/w - Bi)2) ] / [&Sigma;i=14 (Cis/2 - CiAi + DiBi) / (s2/4 - sAi + Ai2 + Bi2) ] 
    where the constants have the following values,

    i =  1  2  3  4 
    A  -1.2150  -1.3509  -1.2150  -1.3509 
    B  1.2359  0.3786  -1.2359  -0.3786 
    C  -0.3085  0.5906  -0.3085  0.5906 
    D  0.0210  -1.1858  -0.0210  1.1858 

  • Debye Gaussian Chain Scattering
    y = 2h[e-(x/w)2 - (1-(x/w)2)]/(x/w)4
    Here, w corresponds to 1/Rg if the x-axis corresponds to a q-axis. The central (guinier) region of the peak is Gaussian in character while the tail (power law) region is Lorentzian in character.
  • Double Exponential
    y = 2h/[e-x/w + e+x/s]
    This peak is asymmetric; w corresponds to the rate at which the peak grows, approaching from the left, while s corresponds to the rate of growth, approaching from the right.

Peak Parameter Selection

A peak of the current type is initialized for fitting to the data when the left mouse button is pressed. The position of the peak is determined by the X coordinate of the cursor when the button is pressed. The width of the peak is determined simultaneously by the Y coordinate of the cursor. The height of the peak is given by the Y value of the data point nearest to the peak position.

Background Selection

A polynomial of degree 4 or less, expressed as
a0 + a1x + a2x2 + a3x3 + a4x4
can be fitted as background to the data. The degree of the polynomial can be selected by using the keys <1>,...,<4> while the focus is in the plot window. The default polynomial degree is 3.

An exponential component can be added into the background by pressing <e> while the focus is in the plot window. This will add two parameters to the fit to define the exponential curve,
e1ee2x .

Once all the required peak and background parameters have been initialized, selection can be terminated by clicking on the right mouse button while the focus is in the plot window.

Controlling the fit

Some control over the fitting procedure can be excercised through the Setup Dialog box. This interface provides a list of all the parameters in the fit with their current values displayed in text fields so that they can be easily modified. There is also an option menu associated with each parameter. The following selections can be made from this menu:

  • Free - if a parameter has been previously constrained using the other options, it is released to be a free parameter in the fit.
  • Set - fix the value of a parameter to the value in the text field. The parameter is effectively removed from the fit.
  • Limit... - this causes the Limit dialog box to appear. This has a label to show you the parameter number you are limiting and a brief description of the parameter. Two text fields are available for setting limits on the value of the parameter. The parameter number can be incremented by use of the arrow buttons next to the parameter number. Activation of the arrow buttons has the effect of applying the limits to the previous parameter.
  • Tie... - this causes the Tie dialog box to appear. This has a label to show you which parameter you are tying and a brief description of the parameter. A text field is available for setting the parameter number to which the dependent parameter will be tied. A brief description of the independent parameter is updated when the apply button is activated. An option menu is available to specify the type of constraint to be applied to the dependent parameter. These are either an equality constraint or simple lattice constraints, i.e. applying (h,k) indices for hexagonal and tetragonal lattice positions or (h,k,l) indices for cubic lattice positions. These must be relative to the (1,0) or (1,0,0) positions, respectively. The parameter number can be incremented by use of the arrow buttons next to the parameter number. Activation of the arrow buttons has the effect of applying the tie constraint for the previous parameter. N.B. xfit always ties the higher parameter number to the lower one and modifies the Tie dialog and Setup dialog boxes to reflect this. It is not possible to make a compound tie constraint unless the constraint is one of equality, e.g. to tie parameter 8 to parameter 5 as the (1,1) hexagonal position and then tie parameter 5 to parameter to parameter 2 as the (2,0) tetragonal position.

The three buttons at the bottom of the Setup dialog box have the following effects:

  • PLOT - this allows you to plot the curve corresponding to the (modified) parameter set.
  • STEP - this makes <Step_its> linearized least-squares iterations. This is useful in seeing if the current model has a good chance of converging to the global minimum. The refinement may converge after a step. If the converged solution is satisfactory click on "RUN" to continue.
  • RUN - this allows the algorithm to continue to convergence or to the maximum number of iterations (<+Max_its> + number of iterations already performed).

    The algorithm is deemed to have converged when the following two conditions are fulfilled:

    1. &chi;2current < &chi;2previous
    2. &chi;2previous - &chi;2current < &chi;2current * <Chi-test>
    After the "RUN" button has been activated, the parameter entries and the buttons in the Setup dialog box will be made insensitive and the Try Again confirm dialog box will appear.

Trying Again

Clicking on "Yes" in the "Try Again" Confirm Dialog box will give you another attempt at fitting the current frame starting from the point where you select the peak types, positions, etc. The Setup Dialog box will disappear and the Information Dialog box will appear, reiterating the procedure for setting up the initial model. Clicking on "No" will cause XFIX to proceed onto the next line.

Background Estimation

There are three methods for estimating the background component of the diffraction pattern using XFIX:
(a) Paul Langan's "roving window" method.
(b) Calculation of a circularly-symmetric background.
(c) Calculation of a "smoothed" background through iterative low-pass filtering based on the method of M.I. Ivanova and L. Makowski (Acta Cryst. (1998) A54, 626-631).

These can be selected from the process menu by clicking on "background". All three methods require the user to input the pattern centre and the extent of the pattern (minimum and maximum radii in pixel units) in relation to the centre. Pixel values outside these limits will be ignored in the background estimation. If the diffraction pattern is not circular and centred around a single point, then it is possible to discard values less than a user-input minimum so that, for example, all values less than or equal to 0.0 are ignored in the background calculation. By using the BSL program from the NCD sofware suite , it is possible to mask the areas of the image that are not of interest (for example setting unwanted pixel values to a large negative value) and discarding these values in the background calculation.

The details of the different background estimation techniques are discussed below. In each case, once processing is completed, the user is prompted to view the calulated background. This will open a new XFIX interface with a 2-frame BSL file loaded (of filename specified by the user). This may take a few seconds. The first frame in this file is the estimated background and the next frame is the diffraction data with the calculated background subtracted. This provides a visual indication of the "goodness of fit" of the calculated background. The calculated background in frame 1 of the file can then processed further using any of the three background estimation techniques. In this way, different background subtraction methods can be used successively if desired. Finally, the data-background frame can be used with a data fitting program such as LSQINT to measure the reflection intensities.

It should be noted that these methods of background estimation can be very time-consuming when used with a large image (eg. 2000x200 pixels). It may often be worthwhile to scale down the dimensions of the diffraction pattern using XCONV (eg. to 200x200 pixels) to find the optimum parameters to be used in the process before operating on the full-size image.

Roving window method

The roving window background subtraction method of Paul Langan estimates the background by moving a window (of size input by the user) across the collected data. The pixel values within this window are sorted and those in the user-selected range are taken as background (except pixel values lying outside the pattern extents or specified by the user as values to discard). The average pixel value within this range is then assigned to be the estimated background at the centre of the window. Fiinally, a smoothing spline under tension is fitted to fill in the gaps between window centres. The following parameters must be input by the user:

The pattern centre in X and Y (values in pixel units).
The pattern extents taken radially from the centre (values in pixel units).
Pixel values to discard.
The window width and height (values in pixel units). The window will be of size 2*width+1 in X and 2*height+1 in Y.
The separation of the window centres in X and Y (values in pixel units).
The start and end positions in the sorted pixel list for selecting pixels corresponding to the background (expressed as a percentage of the total number of pixels in the window).
The smoothing and tension factors for the spline fitting.
The output BSL file name.

Circularly-symmetric background

A circularly-symmetric background can be formed by the radial binning of pixel values followed by averaging those pixel values lying within a specified range. This average value is assigned to the particular radius and a smoothing spline under tension is fitted to yield the estimated background. The following parameters must be input by the user:

The pattern centre in X and Y (values in pixel units).
The pattern extents taken radially from the centre (values in pixel units).
Pixel values to discard.
The increment for radial binning (in pixel units).
The start and end positions in the sorted pixel list for selecting pixels corresponding to the background (expressed as a percentage of the total number of pixels corresponding to the radial bin).
The smoothing and tension factors for the spline fitting.
The output BSL file name.

Smoothed background - Iterative low-pass filtering

This method of background subtraction is based on that of M.I. Ivanova and L. Makowski (Acta Cryst. (1998) A54, 626-631). It takes advantage of the fact that the background of a fibre diffraction pattern is typically composed of lower spatial frequencies than the diffraction maxima. Hence an iterative low-pass filter can be applied to separate the two components on the basis of their frequencies. The estimated background depends on the frequency limit of the filter in both X and Y.

The application of the low pass filter is achieved by the convolution of the observed diffraction pattern with a box car or gaussian function (the smoothing function) having an average value of unity taken over the number of pixels it occupies and a value of zero elsewhere. This function is convoluted with the real data at each pixel within the pattern limits (excluding pixels that are specified by the user as to be discarded). The result of applying this filter is an overestimated background, containing some intensity from the diffracted maxima. This overestimated background is then subtracted from the real data to leave the diffraction maxima whose intensities are now underestimated. Positive pixel values in the image resulting from this subtraction are then subtracted from the original data to yield the next estimate of the background. This is then convoluted with the smoothing function and the procedure is repeated, with images of the original data minus estimated background providing a visual indication of the "goodness of fit" of the estimated background. The procedure is illustrated graphically in one-dimension in Figure 1 below.

There are problems that exist with this method of background estimation at the edge of the pattern where information cannot be obtained for the convolution. This can lead to edge effects (typically an underestimation of the background) which become more pronounced with each cycle of filtering. In this case, it is possible to import a background calculated by another method to be used as the final background estimate at the edges of the pattern. This is then left as constant throughout each cycle of filtering. The backgrounds calculated by the different methods are then merged by fitting a smoothing spline under tension.
 
The following parameters must be input by the user:

The pattern centre in X and Y (values in pixel units).
The pattern extents taken radially from the centre (values in pixel units).
Pixel values to discard.
Whether to use a box car or gaussian as the smoothing function.
The box car size or gaussian full-width-half-maximum (FWHM) (values in pixel units).
The number of filtering cycles.
Whether to apply the smoothing function / filter at the edge of the pattern.
The background to be imported if the filter is not to be applied at the edge of the pattern.
Whether to merge the backgrounds calculated by different methods.
The smoothing and tension factors for spline fitting and the weight to be applied to the imported background in relation to the "smoothed" background.
The output BSL file name.

Once the background estimation process has been completed, the user will be prompted to view the estimated background and original pattern minus estimated background as described above. This will open a new XFIX interface ( this may take a few seconds). Once the estimated background has been inspected, the user may then choose to perform more iterations of filtering. Hence it is possible to view the estimated background after each iteration if desired.

Figure 1: An illustration of the results of applying an iterative low-pass filter to the observed diffraction data.

(a) shows the current estimate of the background. On the first iteration, this is the recorded data.
(b) shows the result of "smoothing" the current background in (a) by applying a low-pass filter (ie. by convoluting the data in (a) with the smoothing function).
(c) shows the result of subtracting (b) from the original data.
(d) shows the result of subtracting positive values in (c) from the original data. (d) is now set to the current background and the procedure is repeated.

Procedure for parameter determination using XFIX. by T. Forsyth

See following steps below. At all stages you may make measurements on the main image, or any part of it that you have zoomed in on (note there is a limit to the number of zoom boxes). Remember to change between "zoom" and "points" modes when you want to make interactive measurements from the image.

(i) Enter the wavelength & sample-detector distance under Edit/Parameters. Note that the sample-detector distance should be in pixel units. If you wish to use a calibration ring to determine this distance, see below.

(ii) Get rough values for the centre by measuring points on a salt ring, for example. If there isn't a salt ring, take four symmetry related reflections/diffraction features. Then go to Estimate/Centre. You will be asked if you want to calculate the sample-detector distance - say no unless you are dealing with a calibration ring (if so, you need to have placed the d-spacing for this ring under Edit/Parameters).

(iii) Get rough value for the rotation of sample relative to detector. Collect points in pairs, each pair containing symmetry related points on either side of MERIDIAN. Go to Estimate/Rotation.

(iv) Get rough value for the tilt of the sample relative to the x-ray beam. Collect points in pairs, each pair containing symmetry related points on either side of EQUATOR. Go to Estimate/Tilt. Remember this is a sensitive calculation (tangent changing very fast) where small measurement errors have a substantial effect. Your initial value may not be that good.

(v) Now refine the parameters (see Process/Refine). The refinement works by minimising the variance of the current selected region for all four quadrants (as defined in reciprocal space), and then using a downhill simplex algorithm for refinement. It usually works well but you have to be careful.

In zoom mode select a small(ish) box that looks promising. I have always found that the best approach is to refine centre & rotation first using a zoom box with clear features on all four quadrant, in a region that is not specifically affected by tilt. Then go to Process/Refine and activate "centre" and "Detector rotation", followed by "OK". If the selected region is not too large, the refinement will be quite quick.

 Following this choose a region of the pattern for which tilt is clearly important (usually close to meridian, fairly high in Z) and for which symmetry related data are available in all four quadrants. Go to Process/Refine and activate "Specimen Tilt" only, followed by "OK".

Once you have these, you can try to refine things together. The last step is to try detector tilt & twist.

(vi) Once you have the parameters well determined to can try the background subtraction - eg (Process/Background) and then proceed to the RZ mapping step in FTOREC.

  • Contact Us
  • About Diamond Light Source
  • Careers
  • Procurement
  • Legal notices & Cookie policy
  • Supply Chain Transparency

Diamond Light Source

Diamond Light Source is the UK's national synchrotron science facility, located at the Harwell Science and Innovation Campus in Oxfordshire.

Copyright © 2022 Diamond Light Source

 

Diamond Light Source Ltd
Diamond House
Harwell Science & Innovation Campus
Didcot
Oxfordshire
OX11 0DE

See on Google Maps

Diamond Light Source® and the Diamond logo are registered trademarks of Diamond Light Source Ltd

Registered in England and Wales at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom. Company number: 4375679. VAT number: 287 461 957. Economic Operators Registration and Identification (EORI) number: GB287461957003.

feedback