AFSCALE - SCALE FILMS IN A PACK

INTRODUCTION

AFSCALE's function is to scale intensity measurements on the the successive films in a pack (up to six) into a single intensity for each reflection. AFSCALE itself deals with the non-wavelength overlapped spots(singlets), a similar program UNSCRAM uses the inter-film scaling coefficients found by AFSCALE to `unscramble' the intensities of wavelength overlapped reflections (multiplets). The main author of the program was I.J. Clifton, Daresbury Laboratory.

List of sections:

Running the Program
Using AFSCALE
Input and Output Files
Commands

RUNNING THE PROGRAM

Use the command 'laue afscale'

The program runs in an interactive manner and prompts the user for input as needed.

USING AFSCALE

On entry AFSCALE asks for a .ge1/.ge2 file name (without the extension) and it is essential to load (see Load command description below) a victoreen coefficients file (.vc) even if the coefficients available are very approximate.

The normal strategy would then involve, for each film pair A/B, B/C etc. the following steps:

  1. Use the 'Define' command to select reflection pairs to be used.

  2. Use the 'Fit' command to evaluate the three $\alpha$ coefficients.

  3. Use the 'Plot', 'Scale' and/or 'Rsym' commands to assess the fit.

This sequence would normally be repeated several times with variations in the 'Define' command until a satisfactory fit is obtained. Then when all film pairs have been thus fitted, output (using the command 'Output') of scaled and merged intensities is requested. Also the refined Victoreen coefficients may be saved in a file using the 'Write' command.

INPUT AND OUTPUT FILES

The input files are as follows:

  1. The .ge1/ge2 pair of files

  2. A victoreen coefficients file
The output files are:
  1. A scaled intensities output file (type = .afout)

    This is a card image file with one record per reflection (scaled but unmerged, and unsorted data) containing the items: h k l lambda theta intensity sig(intensity) x and y in format (3I5,2F10.5,2I10,2F8.3).

  2. An updated victoreen coefficients file (optional)

COMMANDS

Introduction

AFSCALE's main menu has the following commands:

Define

Selection criteria allows the spot rejection parameters described above to be changed. It also allows the user to select which adjacent pair of films to scale together.

Load

Loads film factors and sets up initial coefficients for the Victoreen inter-film scaling functions, see below.

Fit

Victoreen calls a routine to refine the coefficients of the Victoreen inter-film scaling functions to fit the data that has been selected. The Victoreen has the form of K exp( a lambda**3) but normally K should be 1.0.

Plot

Draws graphs of the data, lambda against inter-film intensity ratio, with the current Victoreen function superimposed. Postscript output is avalable to enable hard copy plots to be produced.

Scale

Calculates scaling R-factors (i.e. the closeness between (scaled) measurements on different films).

Rsymm

Calculates symmetry R-factors. The user has to choose which index to use for the symmetry comparison, e.g. `h' means each spot of index (h k l) is compared with the spot (-h k l).

Output

Writes out a file containing scaled-together intensities for the six films. Obviously, it should be used towards the end of a run when the scale factors for all films have been derived. Selection criteria on intensity and sigma can be applied, but the data chosen for output are independent of the selection criteria set in the 'Data' option. Only singlet spots are output. The output file is in a format suitable for input to the programs LAUENORM and LAUESCALE which may be used for determining the wavelength normalisation curve.

Write

Film factors writes to a file (default file type .vc) a set of refined Victoreen coefficients for use with other film packs or for input to UNSCRAM.

List of subsections in this section:

The Define Command
The Load Command
The Fit Command
The Plot Command
The Scale Command
The Rsymm Command
The Output Command
The Write Command

The Define Command

This sets up the rejection criteria and then reads in the singlets to be used for refining the Victoreen function. The adjacent pair of films to be compared have to be specified by giving the number of the first film, e.g.`3' means that C (film 3) and D (film 4) are to be compared. The program refers to the two films as `X' and `Y', but for clarity the scaling process will be described below in terms of A to B scaling.

As each singlet is read in from the .ge1 file, the following rejection criteria can be applied:

The above two tests can be ignored by `not rejecting unmeasurable spots'.

The program stores I_a, I_b, (I_a/I_b)**(cos(2*theta), (h,k,l), cos(2*theta), d_hkl and the weight 'w' to be used in fitting. 'w' is either 1 (`unit weights') or
  w = (sigma(I_a)**2/I_a**2 + sigma(I_b)**2/I_b**2) * (I_a**2/I_b**2)

The Load Command

Load film factors from a victoreen coefficients file (default type = .vc) e.g. as output by the 'Write' command and sets up the initial coefficients for the Victoreen inter-film scaling functions.

Alternatively, the user can calculate coefficients from the known absorption curves of aluminium and copper. This is done either by typing in, for each interfilm gap, the type of metal foil (Al or Cu) and its thickness, or by simply using ready-calculated parameters. These ready-calculated parameters (at the moment) are for the sequences:

  F   F   150muAl  F  150muAl  F  150muAl  F  38muCu  F
  F   F   200muAl  F  200muAl  F  200muAl  F  38muCu  F

The Fit Command

This calls a routine to find the least-squares minimum of the functions described below.

The routine works as follows: it is supplied with a starting vector x and a vector-valued function

f(x) = f1(x), f2(x), ..., fm(x)
implemented as a Fortran FUNCTION. The routine adjusts x to minimize
              M
     F(x) = Sigma [fi(x)]**2
             i=1
In AFSCALE's case, x is just the 'a' parameter of the Victoreen function.

Normally, the function minimized is:

  fi(a) = (I_a/I_b)**cos(2*theta) - w*K*exp(a*lambda**3)
If `experimental fitting options' are used, the function is:
  fi(a) = |W(I_a-I_b*K*exp(a*lambda**3)**(1/cos(2*theta))|**p/2
where 'p' is a user-specified `power for each term' and 'W' is either 'w' (i.e. a unit weight or a 1/sigma**2 type weight) or 1/I_a.

The Plot Command

This command draws graphs of the data, lambda against inter-film intensity ratio, with the current Victoreen function superimposed. Postscript output is avalable to enable hard copy plots to be produced if required

The Scale Command

AFSCALE's 'Scale' command generates tables of R-factors broken down into intensity, wavelength and resolution bins. The data used for the R-factors is that selected by the most recent 'Define' command.

The scaling R-factors in the bins are defined as:

   R_scale(bin) = Sigma_bin(|Ia - s*I_b|) / Sigma_bin(Iave)
where
   s = (K*exp(a*lambda**3))**(1/cos(2*theta))
There is also an analysis against wavelength of the numbers of spots above and below the current Victoreen curve.

The Rsymm Command

AFSCALE's 'Rsymm' command generates tables of R-factors broken down into intensity, wavelength and resolution bins. The data used for the R-factors is that selected by the most recent 'Define' command.

The symmetry R-factor is based on comparisons between the intensities of symmetry-equivalent points. Because in general such symmetry-equivalent pairs will diffract at different wavelengths, the wavelengths of each pair of spots have to be closer than a limit, the `wavelength mismatch limit' chosen by the user, for the pair to be included in the R-symm statistics. For an R-symm comparison on 'h', the program calculates for each allowed pair(h, k, l) (-h, k, l)

   Iave = (I(hkl) + I(-hkl))/2

Sigma_bin(|I(hkl)-Iave| + |I(-hkl)-Iave|) Rsymm(bin) = ----------------------------------------- Sigma_bin(Iave)

The Output Command

For each spot the six intensity and sigma values are re-read from the .GE file and processed in the following way.

The Write Command

This command is used to write the current (e.g. refined) values of the Victoreen coefficients to a file (default type = .vc).



John W. Campbell
CCLRC Daresbury Laboratory
Last update 21 Aug 1996