Title                  :THE DIFFRACTION SUITE
Keywords               :CBED, HOLZ, KINEMATICAL APPROXIMATION
Computer               :DEC VAX 11/730-785, DEC PDP 11/2-11/73
Operating System       :VAXVMS
Programming Language   :Fortran 77
Hardware Requirements  :TEKTRONICS 4010 TERMINAL OR SUITABLE EMULATOR
Author(s)              :JOHN F. MANSFIELD (919)-248-1800
Correspondence Address :THE MICROELECTRONICS CENTER OF NORTH CAROLINA
                       :PO BOX 12889, RESEARCH TRIANGLE PARK, N.C. 27709.
Documentation          :
_____________________________________________________________________________








                             THE DIFFRACTION SUITE

             THE ELECTRON MICROSCOPY CENTRE FOR MATERIALS RESEARCH
                     DIFFRACTION PATTERN PLOTTING ROUTINES

                                       BY

                               JOHN F. MANSFIELD


               ELECTRON MICROSCOPY CENTRE FOR MATERIALS RESEARCH
                           MATERIALS SCIENCE DIVISION
                          ARGONNE NATIONAL LABORATORY
                            ARGONNE, ILLINOIS  60439

                         FOR CURRENT ADDRESS SEE ABOVE

















---------------
* Work supported in part by the U.S.  Department of  Energy,  BES-Materials
  Sciences, under Contract W-3l-l09-Eng-38.



                                 CONTENTS

     1       INTRODUCTION . . . . . . . . . . . . . . . . . . . . 1
     2       USING THE DIFFRACTION SUITE  . . . . . . . . . . . . 2
     2.1       Creating The Phase File  . . . . . . . . . . . . . 2
     2.2       Listing The Data In The Phase File . . . . . . . . 4
     2.3       Plotting Zero Layer Zone Axis Patterns . . . . . . 5
     2.4       Plotting Direct Disc HOLZ Lines Only . . . . . . . 7
     2.5       Plotting HOLZ Lines And Zero Layer Together  . . . 9
     2.6       Choosing The Terminal Type . . . . . . . . . . .  12
     2.7       Using The Printer Option And Labelling The HOLZ 
               Lines  . . . . . . . . . . . . . . . . . . . . .  13
     2.8       Performing Repeated Plots  . . . . . . . . . . .  15
     2.9       Obtaining Hardcopy Of The Plots  . . . . . . . .  15


     APPENDIX A      GENERAL CRYSTALLOGRAPHIC FORMULAE


     APPENDIX B      THE EMPTY LATTICE CONSTRUCTION


     APPENDIX C      LISTING OF THE DATA FILE TERMIN.DAT


     APPENDIX D      PROGRAM LISTING


     APPENDIX E      CONVERSION MATRIX FOR RECIPROCAL LATTICE VECTORS


     APPENDIX F      A SELECTED BIBLIOGRAPHY OF CONVERGENT-BEAM
		     DIFFRACTION


     APPENDIX G      SOURCE CODE COMPILATION AND LINKING

                                                                Page 1


     1  INTRODUCTION

          This program plots simulated electron diffraction patterns of any
     general  triclinic  crystal.   It  is  designed  primarily  to aid the
     analysis of convergent  beam  electron  diffraction  (CBED)  patterns.
     There  are  three  ways which the program may plot patterns.  The zero
     order Laue zone may be  plotted  alone,  either  as  discs  or  spots,
     depending upon the convergence angle (second condenser aperture size).
     The  zero  layer  can  be  plotted  together  with  the  bright  field
     deficiency  Higher  Order  Laue  Zone (HOLZ) lines to illustrate their
     relative orientation to each other.  Finally, a  higher  magnification
     plot  of  the  direct  disc  HOLZ lines is possible to aid indexing of
     actual CBED patterns.

          The program is split into six sections,  each  of  which  may  be
     accessed  from  a  menu.   The first section covers the generation and
     storage of a "Phase File" in which reciprocal lattice data  is  stored
     for  use  in  subsequent plotting routines.  The creation of the Phase
     File means that frequently used  values  can  be  stored  and  quickly
     accessed  by  the  program  to avoid repeatedly calculating them.  The
     next two sections of the program allow the phase file  to  be  printed
     out,  either  on the user's terminal or on a system line-printer.  The
     Phase File is stored as ASCII text and can be typed or  read  into  an
     editor  if it is suspected that the data within it has been corrupted.
     The last three sections of the program are plotting routines and  plot
     zero  layer  zone  axis  patterns  (ZAPs), direct disc HOLZ deficiency
     lines and both zero layer discs and direct disc HOLZ detail  together.
     For a more detailed introduction and description of CBED patterns, the
     reader is directed to a  number  of  excellent  reviews  and  teaching
     articles  that  have  been  published.  A selected bibliography can be
     found in Appendix F.

          The Diffraction  Suite  of  programs  currently  resides  on  the
     Materials  Science  Division  Electron  Microscopy  Centre  (EMC)  DEC
     VAX11/785, where it is accessible by members of the division  and  via
     the EMC/EMSA Bulletin Public Domain Library (EMMPDL).  All of the code
     is  written  in  DEC  VAX  FORTRAN77,  although  with  a  few   simple
     modifications  it can be run on a wide variety of mini-computers.  For
     graphics output a Tektronics 4010 terminal  or  suitable  emulator  is
     required.   Since  the  plotting  sections  of  the code employ Nestor
     Zaluzec's Graphics Libraries then any Tek4010-type  terminal  that  he
     currently  supports can be used.  A current listing of these terminals
     can be found in Appendix C.

          The programs are all executed in interactive  mode  from  a  main
     menu.   Upon selection of a specific routine, the user is prompted for
     input when it is required.  The code has been written to minimise  the
     need to read manuals such as this, however, this manual is designed to
     clarify any areas  of  confusion  and  to  explain  the  theories  and
     approximations used in the programs.

          The remainder of this manual is a guided tour of the capabilities
     of  the  whole  package.  Several examples are used to illustrate both
     the operator supplied input that is required and the output generated.
     The  appendices  outline  how  the program operates and the models and
                                                                Page 2


     approximations which  are  used.   Listings  of  useful  formulae  and
     information  which may be of use in the analysis of both CBED patterns
     and electron diffraction patterns in general are  included,  as  is  a
     complete listing of the program source code.



     2  USING THE DIFFRACTION SUITE

          This section will assume that you are using the  program  on  the
     EMCVAX.   If you are using another ANL computer or have obtained these
     programs from the EMMPDL, you may need to configure the  software  for
     your  own  particular  computer system.  Details of the required files
     and installation instructions for certain  systems  can  be  found  in
     Appendices C and G.

          You  may  run  The  Diffraction  Suite  from  any  directory   or
     sub-directory  on  the  EMCVAX, however, you may find it convenient to
     create a special sub-directory in your directory space  to  store  all
     data  etc.  concerned with diffraction patterns.  Wherever this manual
     reproduces output from the EMCVAX the output is  in  uppercase  Geneva
     font  (eg.   EMCVAX:)  ,  input  typed by the user is in the same font
     except it is in quotes.  The manual is written in New  York  font  and
     notes  explaining the input and output will be in both upper and lower
     case.

          When logged onto a standard user account of the EMCVAX you should
     see a prompt like this:

     EMCVAX:

     To run The Diffraction Suite, type as follows:

     EMCVAX:  "RUN DIFFRACTIONSUITE  <RETURN>"  

     The  terminal  screen  then  scrolls  up one page and the main menu is
     printed.



     2.1  CREATING THE PHASE FILE

     Let us first examine  the  creation  of  the  Phase  File  from  which
     subsequent software routines will extract data.  From the menu, select
     option A.

         THE DIFFRACTION SUITE


       A: CALCULATION OF RECIPROCAL LATTICE VECTORS

       B: LISTING OF RECIPROCAL LATTICE VECTORS (TERMINAL) 

       C: LISTING OF RECIPROCAL LATTICE VECTORS (PRINTER) 

       D: PLOT [UVW] ZERO LAYER ZONE AXIS PATTERN (TERMINAL) 

                                                                Page 3


       E: PLOT DIRECT DISC HOLZ LINES (TERMINAL) 

       F: PLOT ZERO LAYER WITH HOLZ LINES (TERMINAL) 

       G: EXIT FROM SUITE

          SELECT ONE OF A TO G AND <RETURN>:  "A <RETURN>"

          In this first example we shall select A  to  generate  the  Phase
     Data  File.  After pressing <RETURN> the screen clears and the program
     asks for a phase identifier which will be used as the file  name.   In
     this example we shall use the element Aluminum and represent it by its
     chemical symbol, although the whole name may be used.

     ENTER 8-CHARACTER PHASE SYMBOL/NAME:  "AL <RETURN>"

     The program then needs to know the lattice parameters.

     ENTER A0,B0,C0 IN ANGSTROMS:  "4.0496,4.0496,4.0496 <RETURN>"
     ENTER ALPHA, BETA, AND  GAMMA  IN  DEGREES  (EG.   90.0)  "90.,90.,90.
     <RETURN>"

     Then you can enter up to 80 characters of information to remind you in
     future  where you obtained the lattice data.  Simply pressing <RETURN>
     will store a blank line and is perfectly acceptable.

     ENTER LITERATURE REFERENCE; 80 CHARACTER MAXIMUM:
     "BARRETT MASSALSKI, THE STRUCTURE OF METALS <RETURN>"

     The program then gives you the file name and its extension (.DAT), and
     requests  the  type of lattice.  Entering the lattice type enables the
     program to calculate only the allowed reflections (reciprocal  lattice
     vectors).

     THE NAME OF THE FILE IS AL      .DAT 

     CHOOSE LATTICE TYPE:
         PRIMITIVE (P)
         BASE CENTRED ALONG THE A-AXIS (A)
         BASE CENTRED ALONG THE B-AXIS (B) 
         BASE CENTRED ALONG THE C-AXIS (C)
         FACE CENTRED (F)  
         BODY CENTRED (I)    
         HEXAGONAL (H) 
         RHOMBOHEDRAL (R)
         ENTER TYPE (DEFAULT=P):  "F <RETURN>"

     The next input selects the range of HKL values that are  searched  and
     stored in the data file.  It is advisable to use 4 or 5 here, this may
     be overkill but it does mean that you will be able to  plot  the  zero
     layer of some very low order zone axes.

     INPUT N WHERE N SETS  THE  RANGE  -N,-N,-N  TO  N,N,N:   "4  <RETURN>"
     SORTING...ANY ADDITIONAL FORBIDDEN REFLECTIONS?  [N]
     (CONSULT INTERNATIONAL TABLES PART A):  "<RETURN>"
                                                                Page 4


     If you reply Y or YES to this question then the program will  ask  you
     to  specify  a formulae to specify the forbidden reflections or search
     through each reciprocal lattice vector and determine whether it is  an
     allowed  reflection  or  not.   This  part of the program is meant for
     future development and is not  fully  implemented.   It  is  advisable
     always  to  answer N or NO to this question, or merely hit <RETURN> to
     select the default negative answer.  The program will then  revert  to
     the main menu.



     2.2  LISTING THE DATA IN THE PHASE FILE

          In this section is an illustration  of  the  output  provided  by
     options  B  and  C  of  the  main  menu.   Note  that there is no real
     difference between option B and C, only a change in  logical  unit  in
     the FORTRAN code.  The way the program is set up on the EMCVAX is that
     the FORTRAN logical unit number  FOR002  is  assigned  to  the  system
     line-printer,  hence any output from section C of the program, or from
     the printer options in sections D to F,  is  directed  to  the  system
     printer queue.

         THE DIFFRACTION SUITE 


       A: CALCULATION OF RECIPROCAL LATTICE VECTORS 

       B: LISTING OF RECIPROCAL LATTICE VECTORS (TERMINAL) 

       C: LISTING OF RECIPROCAL LATTICE VECTORS (PRINTER) 

       D: PLOT [UVW] ZERO LAYER ZONE AXIS PATTERN (TERMINAL) 

       E: PLOT DIRECT DISC HOLZ LINES (TERMINAL) 

       F: PLOT ZERO LAYER WITH HOLZ LINES (TERMINAL) 

       G: EXIT FROM SUITE 

          SELECT ONE OF A TO G AND <RETURN>:  "B <RETURN>"

     Upon selection of B or C the  program  will  ask  the  same  question,
     namely:

     FILENAME?  "AL <RETURN>"

     The data is read in from the specified Phase File and printed  out  in
     the following format:

     PHASE = AL

        188  G VECTORS IN THE FILE 

     REFERENCE:
     BARRETT & MASSALSKI, THE STRUCTURE OF METALS
                                                                Page 5



              A         B         C     ALPHA      BETA     GAMMA 
         4.0500    4.0500    4.0500      90.0      90.0 90.0

         SINALP    SINBET    SINGAM    COSALP    COSBET    COSGAM
         1.0000    1.0000       1.0000    0.0000    0.0000    0.0000

        A*        B*        C*     CALST    CBETST    CGAMST
         0.2469    0.2469       0.2469    0.0000    0.0000    0.0000

     F LATTICE

            G MODULUS  H K L     H MODULUS     K MODULUS     L MODULUS FBN 
       1 4.277100E-01  1-1 1  2.469379E-01 -2.469379E-01  2.469379E-01   0
       2 4.277100E-01  1 1-1  2.469379E-01  2.469379E-01 -2.469379E-01   0   
       3 4.277100E-01  1-1-1  2.469379E-01 -2.469380E-01 -2.469379E-01   0   
       4 4.277100E-01 -1-1 1 -2.469379E-01 -2.469379E-01  2.469379E-01   0   
       5 4.277100E-01 -1 1 1 -2.469379E-01  2.469380E-01  2.469379E-01   0   
       6 4.277100E-01 -1 1-1 -2.469379E-01  2.469379E-01 -2.469379E-01   0   
       7 4.277100E-01  1 1 1  2.469380E-01  2.469380E-01  2.469379E-01   0   
       8 4.277100E-01 -1-1-1 -2.469380E-01 -2.469380E-01 -2.469379E-01   0 
       9 4.938800E-01 -2 0 0 -4.938759E-01  0.000000E+00  0.000000E+00   0  
      10 4.938800E-01  0-2 0 -2.158800E-08 -4.938759E-01  0.000000E+00   0


          The listing contains a note on the total number of  G-vectors  in
     the  file, the reference data requested in the file-generation section
     A, the lattice parameters , and  the  lattice  type.   The  sines  and
     cosines  of the interaxial angles are also included, together with the
     reciprocal lattice  parameters  and  the  cosines  of  the  reciprocal
     lattice  angles.   Although  certain  of  these values may be zero for
     cubic systems, they are not generally so for a triclinic  system,  and
     these  programs are designed to cope with any general crystallographic
     lattice.  The remainder of  the  data  in  the  file  is  a  list,  in
     ascending  order,  of  the  G-vectors.   Listed  is the modulus of the
     length of each one, the Miller indices  of  each,  the  X,  Y,  and  Z
     coordinates  of  each  vector,  and  an  integer value which indicates
     whether the reflection is forbidden or not.  This  last  value  has  a
     default  of  zero  for allowed reflections and only changes if, in the
     generation of the Phase File, extra forbidden reflections were  added.
     The  value  of FBN for a forbidden reflection is one.  Upon completion
     of the listing the program will return to the main menu.



     2.3  PLOTTING ZERO LAYER ZONE AXIS PATTERNS

          This section will illustrate the plotting of zero layer  patterns
     alone.   These  are the same as selected area patterns except that the
     diffraction orders are represented by discs rather than spots.

         THE DIFFRACTION SUITE 


       A: CALCULATION OF RECIPROCAL LATTICE VECTORS 
                                                                Page 6



       B: LISTING OF RECIPROCAL LATTICE VECTORS (TERMINAL) 

       C: LISTING OF RECIPROCAL LATTICE VECTORS (PRINTER) 

       D: PLOT [UVW] ZERO LAYER ZONE AXIS PATTERN (TERMINAL) 

       E: PLOT DIRECT DISC HOLZ LINES (TERMINAL) 

       F: PLOT ZERO LAYER WITH HOLZ LINES (TERMINAL) 

       G: EXIT FROM SUITE 

          SELECT ONE OF A TO G AND <RETURN>:  "D <RETURN>"

          The discs are plotted using the data stored  in  option  A.   The
     disc  size  is scaled by the value of condenser aperture that is input
     by the operator.  The program is internally set to  plot  patterns  in
     proportion  to those recorded on a Philips EM420T, in which the use of
     a  200  mm  aperture  yields  a   half   angle   of   convergence   of
     ~7.3milliradians.

          Upon selection of option D, the default characteristics  for  the
     terminal  and plotter will be displayed; these are from the subroutine
     TERMIN of the NGRAPH graphics package.  For  information  on  changing
     the terminal and/or the hardcopy unit, see section 2.6 and Appendix C.
     In each of the initial demonstrations of the program we  shall  assume
     that the terminal type is set as required.


     -------------------------
     Terminal Characteristics:
     -------------------------
     The Current Terminal Device is:
     TEKTRONICS  4010-1,4014-1  Terminal

     The Current Hardcopy Device is:
     No Graphics Hard Copy                          

     The  Current  Baud   Rate  is :   9600


     Change Definitions [N]?  "<RETURN>"


          You will next be asked  whether  you  want  relevant  information
     about  the  phase  and  zone  axis pattern to be printed on the system
     printer.  We will assume in these initial  examples  that  no  printer
     output  is  desired.   See  section  2.7 for an example of the printer
     output.

     DO YOU WANT PRINTER OUTPUT HOLZ LINE LABELS?  [N] "<RETURN>"

                                                                Page 7


          The program then asks for  the  phase  file,  and  upon  pressing
     <RETURN>  the  header  information  in  the phase file is displayed to
     allow you to check that you have the correct file.

     FILENAME?  "AL <RETURN>"
        188 G-VECTORS IN THIS FILE
     REFERENCE:
     BARRETT & MASSALSKI, THE STRUCTURE OF METALS                           
              A         B         C     ALPHA     BETA     GAMMA
         4.0496    4.0496    4.0496      90.0     90.0      90.0

     Enter CONTinue to resume.
     EMCVAX:  "CONT <RETURN>"


          The program then asks several questions which pertain to the zone
     axis pattern.

     ZONE AXIS?  ENTER U,V,W:  "3,1,0 <RETURN>"

     NUMBER OF REFLECTIONS?  "8 <RETURN>"

     SECOND CONDENSER APERTURE?  (50-600 MICRON) "200 <RETURN>"

     The number of reflections that will be plotted does  not  include  the
     direct disc.

          The screen is then cleared and the pattern is plotted.  The first
     two  discs  that  are  plotted are labelled with their Miller indices.
     The pattern is dated and labelled with the phase file  name  and  zone
     axis.

     31-JUL-89

     AL

     ZONE AXIS= 3 1 0

     MORE?  [Y] "<RETURN>"

     The question which is printed beneath the zone  axis  means,  "Do  you
     want another plot?" In this example we shall assume that the answer is
     no; an example of the output for an affirmative  answer  is  shown  in
     section 2.8.  Entering N will cause the menu to reappear.



     2.4  PLOTTING DIRECT DISC Holz LINES ONLY

          This section deals with the plotting of  the  zero  layer  direct
     disc with the HOLZ deficiency lines.  From the menu select option E.

         THE DIFFRACTION SUITE 


                                                                Page 8


       A: CALCULATION OF RECIPROCAL LATTICE VECTORS 

       B: LISTING OF RECIPROCAL LATTICE VECTORS (TERMINAL) 

       C: LISTING OF RECIPROCAL LATTICE VECTORS (PRINTER) 

       D: PLOT [UVW] ZERO LAYER ZONE AXIS PATTERN (TERMINAL) 

       E: PLOT DIRECT DISC HOLZ LINES (TERMINAL) 

       F: PLOT ZERO LAYER WITH HOLZ LINES (TERMINAL) 

       G: EXIT FROM SUITE 

          SELECT ONE OF A TO G AND <RETURN>:  "E <RETURN>"


          Upon selection of option E, the default characteristics  for  the
     terminal  and plotter will be displayed; these are from the subroutine
     TERMIN of the NGRAPH graphics package.  For  information  on  changing
     the terminal and/or the hardcopy unit, see section 2.6 and Appendix C.
     In this demonstration of the program we shall assume that the terminal
     type is set as required.


     -------------------------
     Terminal Characteristics:
     -------------------------
     The Current Terminal Device is:
     TEKTRONICS  4010-1,4014-1  Terminal

     The Current Hardcopy Device is:
     No Graphics Hard Copy                          

     The  Current  Baud   Rate  is :   9600


     Change Definitions [N]?  "<RETURN>"


          You will next be asked  whether  you  want  relevant  information
     about  the phase and HOLZ pattern to be printed on the system printer.
     We will assume in this example that no printer output is desired.  See
     section 2.7 for an example of the printer output.

     DO YOU WANT PRINTER OUTPUT HOLZ LINE LABELS?  [N] "<RETURN>"


          The program then asks for  the  phase  file,  and  upon  pressing
     <RETURN>  the  header  information  in  the phase file is displayed to
     allow you to check that you have the correct file.

     FILENAME?  "AL <RETURN>"
        188 G-VECTORS IN THIS FILE
     REFERENCE:
                                                                Page 9


     BARRETT & MASSALSKI, THE STRUCTURE OF METALS                           
              A         B         C     ALPHA     BETA     GAMMA
         4.0496    4.0496    4.0496      90.0     90.0      90.0

     Enter CONTinue to resume.
     EMCVAX:  "CONT <RETURN>"


          The program then asks several questions which pertain to the HOLZ
     pattern.

     ZONE AXIS?  ENTER U,V,W:  "3,1,0 <RETURN>"

     SECOND CONDENSER APERTURE?  (50-600 MICRON) "200 <RETURN>"

     ENTER ACCELERATING VOLTAGE IN KV:  "119 <RETURN>"

     INPUT N, WHERE N SETS RANGE OF G-VECTORS
     FROM (-N,-N,-N) TO (N,N,N):  "12 <RETURN>"

     ENTER ORDER(S) OF DESIRED HOLZ REFLECTIONS
     WHERE 1=FOLZ, 2=SOLZ, 3=TOLZ, 4=40LZ, 5=5OLZ, ETC.
     UP TO 5 VALUES PERMISSABLE (eg.  1,2,3,4,5 or 1,2,0,0,0).
     "1,0,0,0,0 <RETURN>"

     ENTER MAXIMUM MODULUS OF G (GGMAX):  "99 <RETURN>"

          The accelerating  voltage  is  an  adjustable  parameter  in  the
     program.   Since  the  code is based on a kinematic approximation, the
     voltage is adjusted to make the  computer  generated  patterns  fit  a
     standard  experimental  pattern.   Unknown  patterns of similar atomic
     number and  structure  can  then  be  analysed  using  the  determined
     voltage.  119kV has been determined to give good fits for Si at 120kV.

          The value N determines the range of Miller indices through  which
     the  program  searches  to  find allowed HOLZ reflections.  Also, five
     different layers of the  reciprocal  lattice  can  be  searched.   The
     nomenclature is fairly standard:  FOLZ = First Order Laue Zone, SOLZ =
     Second Order Laue Zone.  Since the letter F has already been used, 4th
     and  5th  orders  are  designated with numbers.  This is somewhat less
     standard, but it is not often that such high orders are used  so  that
     one  is  not  likely to come across too many different definitions for
     these layers.

          The value GGMAX is the modulus of  the  product  G.G  and  it  is
     designed to limit the area of k-space that the program searches.

          The screen of the  terminal  is  cleared  and  the  HOLZ  pattern
     plotted,  after which the pattern is labelled with the date, the phase
     file name, and the zone axis.  The HOLZ lines are labelled only if the
     printer option is selected.  The reasons for this will become apparent
     in the section "Using the Printer Option".

    
                                                               Page 10


     31-JUL-89

     AL

     ZONE AXIS= 3 1 0

     MORE?  [Y] "<RETURN>"

     The question which is printed beneath the zone  axis  means,  "Do  you
     want another plot?" In this example we shall assume that the answer is
     no; an example of the output for an affirmative  answer  is  shown  in
     section 2.8.  Entering N will cause the menu to reappear.



     2.5  PLOTTING Holz LINES AND ZERO LAYER TOGETHER

          If the HOLZ lines need to be seen in relation to the  zero  layer
     pattern, then choose option F from the main menu.

         THE DIFFRACTION SUITE 


       A: CALCULATION OF RECIPROCAL LATTICE VECTORS 

       B: LISTING OF RECIPROCAL LATTICE VECTORS (TERMINAL) 

       C: LISTING OF RECIPROCAL LATTICE VECTORS (PRINTER) 

       D: PLOT [UVW] ZERO LAYER ZONE AXIS PATTERN (TERMINAL) 

       E: PLOT DIRECT DISC HOLZ LINES (TERMINAL) 

       F: PLOT ZERO LAYER WITH HOLZ LINES (TERMINAL) 

       G: EXIT FROM SUITE 

          SELECT ONE OF A TO G AND <RETURN>:  "F <RETURN>"


          Upon selection of option F, the default characteristics  for  the
     terminal  and plotter will be displayed; these are from the subroutine
     TERMIN of the NGRAPH graphics package.  For  information  on  changing
     the terminal and/or the hardcopy unit, see section 2.6 and Appendix C.
     In this demonstration of the program we shall assume that the terminal
     type is set as required.


     -------------------------
     Terminal Characteristics:
     -------------------------
     The Current Terminal Device is:
     TEKTRONICS  4010-1,4014-1  Terminal

     The Current Hardcopy Device is:
     No Graphics Hard Copy                          

                                                               Page 11


     The  Current  Baud   Rate  is :   9600


     Change Definitions [N]?  "<RETURN>"

          You will next be asked  whether  you  want  relevant  information
     about  the phase and CBED pattern to be printed on the system printer.
     We will assume in this example that no printer output is desired.  See
     section  2.7 for an example of the printer output.  Due to the size of
     the HOLZ plot  in  this  option  and  the  line  density,  it  is  not
     recommended  to  use  the printer option since the labels for the HOLZ
     lines will totally obscure the pattern.

     DO YOU WANT PRINTER OUTPUT HOLZ LINE LABELS?  [N] "<RETURN>"


          The program then asks for  the  phase  file,  and  upon  pressing
     <RETURN>  the  header  information  in  the phase file is displayed to
     allow you to check that you have the correct file.

     FILENAME?  "AL <RETURN>"
        188 G-VECTORS IN THIS FILE
     REFERENCE:
     BARRETT & MASSALSKI, THE STRUCTURE OF METALS                           
              A         B         C     ALPHA     BETA     GAMMA
         4.0496    4.0496    4.0496      90.0     90.0      90.0

     Enter CONTinue to resume.
     EMCVAX:  "CONT <RETURN>"


          The program then asks several questions which pertain to the zero
     layer and HOLZ patterns.

     ZONE AXIS?  ENTER U,V,W:  "3,1,0 <RETURN>"

     NUMBER OF REFLECTIONS?  "8 <RETURN>"

     SECOND CONDENSER APERTURE?  (50-600 MICRON) "200 <RETURN>"

     ENTER ACCELERATING VOLTAGE IN KV:  "119 <RETURN>"

     INPUT N, WHERE N SETS RANGE OF G-VECTORS
     FROM (-N,-N,-N) TO (N,N,N):  "12 <RETURN>"

     ENTER ORDER(S) OF DESIRED HOLZ REFLECTIONS
     WHERE 1=FOLZ, 2=SOLZ, 3=TOLZ, 4=40LZ, 5=5OLZ, ETC.
     UP TO 5 VALUES PERMISSABLE (eg.  1,2,3,4,5 or 1,2,0,0,0).
     "1,0,0,0,0 <RETURN>"

     ENTER MAXIMUM MODULUS OF G (GGMAX):  "99 <RETURN>"

          The number of reflections that will be plotted does  not  include
     the direct disc.
                                                               Page 12


          The accelerating  voltage  is  an  adjustable  parameter  in  the
     program.   Since  the  code is based on a kinematic approximation, the
     voltage is adjusted to make the  computer  generated  patterns  fit  a
     standard  experimental  pattern.   Unknown  patterns of similar atomic
     number and  structure  can  then  be  analysed  using  the  determined
     voltage.  119kV has been determined to give good fits for Si at 120kV.

          The value N determines the range of Miller indices through  which
     the  program  searches  to  find allowed HOLZ reflections.  Also, five
     different layers of the  reciprocal  lattice  can  be  searched.   The
     nomenclature is fairly standard:  FOLZ = First Order Laue Zone, SOLZ =
     Second Order Laue Zone.  Since the letter F has already been used, 4th
     and  5th  orders  are  designated with numbers.  This is somewhat less
     standard, but it is not often that such high orders are used  so  that
     one  is  not  likely to come across too many different definitions for
     these layers.

          The value GGMAX is the modulus of  the  product  G.G  and  it  is
     designed to limit the area of k-space that the program searches.

          The screen is then cleared, the zero layer is plotted, the  first
     two discs are labelled with their Miller indices, and the HOLZ pattern
     is plotted.  The HOLZ lines are labelled only if the printer option is
     selected.   Then  the  plot  is labelled with the date, the phase file
     name, and the zone axis.

     31-JUL-89

     AL

     ZONE AXIS= 3 1 0

     MORE?  [Y] "<RETURN>"

     The question which is printed beneath the zone  axis  means,  "Do  you
     want another plot?" In this example we shall assume that the answer is
     no; an example of the output for an affirmative  answer  is  shown  in
     section 2.8.  Entering N will cause the menu to reappear.



     2.6  CHOOSING THE TERMINAL TYPE

          In the previous examples we have seen only the default values for
     the  terminal  and hardcopy units.  Data indicating the terminal, hard
     copy unit, and baud rate should  be  stored  in  a  data  file  called
     TERMIN.DAT  on  your unit 2 (FOR002).  If the file is not found by the
     program then the secondary default values shown below  are  used,  and
     you are queried whether you wish to change the definitions.


     -------------------------
     Terminal Characteristics:
     -------------------------
     The Current Terminal Device is:
                                                               Page 13


     TEKTRONICS  4010-1,4014-1  Terminal

     The Current Hardcopy Device is:
     No Graphics Hard Copy                          

     The  Current  Baud   Rate  is :   9600


     Change Definitions [N]?  "Y <RETURN>"

          Entering a "Yes" answer  to  the  query  causes  the  program  to
     provide  a  list  of  terminals  and hardcopy devices (i.e., plotters)
     which it supports through  NGRAPH.   You  should  answer  its  further
     queries according to the hardware which you are using.

      Terminal Definitions :
      ----------------------
     -3 = ASCII Terminal   Width = 32  Column
     -2 = ASCII Terminal   Width = 80  Column
     -1 = ANSI x3.64  Non-Graphics   Terminal
      0 = TEKTRONICS  4010-1,4014-1  Terminal
      1 = TEKTRONICS  4006  ,4010    Terminal
      2 = LSI  ADM-3A/5A   RG-512    Terminal
      3 = PERITEK VCG-512   Bit-Map   Monitor
      4 = TEKTRONICS  4027   Color   Terminal
      5 = HP  7470A   Hardcopy    X-Y    Plot
      6 = LA100/LA50  Hardcopy  Graphics Plot
      7 = INTECOLOR  VT-100/TEK4010  Terminal
      8 = INTECOLOR  VT-100/TEK4027  Terminal
      9 = DEC VT-220 /  TEK4010-1,   Terminal
     10 = TEKTRONICS 4105/07/09/4010 Terminal
     11 = PLESSEY    VT-100/TEK4010  Terminal
     12 = ESPRIT     VT-100/TEK4010  Terminal
     13 = TEKTRONICS 4010-1 Hardcopy Versatec
     14 = TEK 4105/07/09 Hardcopy to TEK 4695

     Enter Terminal Device :  "9 <RETURN>"
     Enter Baud Rate (<CR> = Save Old):  "<RETURN>"
     Enter New Hardcopy Device (<CR> = Save Old):  "5 <RETURN>"

          The answers to the three questions posed above have indicated  to
     the  program  that  the  terminal is a DEC VT-220, the baud rate stays
     unchanged at 9600, and the harcopy unit is a HP-7470A  plotter.   Then
     the program displays your choices and asks for more changes:


     -------------------------
     Terminal Characteristics:
     -------------------------
     The Current Terminal Device is:
     DEC VT-220 /  TEK4010-1,   Terminal

     The Current Hardcopy Device is:
     HP  7470A   Hardcopy    X-Y    Plot

                                                               Page 14


     The  Current  Baud   Rate  is :   9600


     Change Definitions [N]?  "<RETURN>"

     DO YOU WANT PRINTER OUTPUT HOLZ LINE LABELS?  [N] "<RETURN>"

     DO YOU WANT
                 T TERMINAL PLOT ONLY
                 H HP PLOT ONLY
                 B BOTH
                 (DEFAULT= T):  "<RETURN>"

          The last question is asked only  if  the  hardcopy  device  is  a
     HP-7470A  plotter.   The  program  then  continues  according  to  the
     previous examples.



     2.7  USING THE PRINTER OPTION AND LABELLING THE HOLZ LINES

          The HOLZ lines are not labelled  unless  the  printer  option  is
     selected.

          The reason for this is that the plots  become  very  untidy  when
     labelled.   Hence a clean, uncluttered plot may be produced as well as
     a labelled copy.  The printer output also reproduces some of the  data
     in the phase file and also lists the input parameters of the user.

          An affirmative answer to the first  question  below  may  produce
     another.   A multi-coloured plot can be produced on some of the colour
     terminals, but the question is asked only if  NGRAPH  supports  colour
     changes for your terminal type.  It is sometimes of use when there are
     a large number of HOLZ lines and the user is  experiencing  difficulty
     in  identifying them.  The colour change bears no relation to symmetry
     or to the zone from which the line comes;  it  is  merely  an  aid  to
     indexing.

     DO YOU WANT PRINTER OUTPUT HOLZ LINE LABELS?  [N] "Y <RETURN>"

     DO YOU WANT THE MULTI-COLOURED PLOT?  [N] "<RETURN>"

          The program continues after this section, requesting more  input.
     When  it  does plot, the HOLZ lines are labelled with an integer which
     is positioned one quarter of the way along their length.   Positioning
     the  numbers  at  the  ends  or the centres of the lines produces very
     confusing and messy labels.  There is sometimes  a  problem  with  the
     numbers  overlapping  even  with  the  current  system.   It  is often
     necessary to produce a hardcopy plot and then  do  several  successive
     screen  plots  to  determine  the  integers for each line, marking the
     integers on the hardcopy by hand.  One can halt the  plots  and  erase
     the  screen  of the terminal if the overlap becomes too severe.  For a
     small number of lines, however, there is little problem.
                                                               Page 15


          The integers on the plots correspond to the indices listed on the
     printer  output.  The VAX system will submit the printout to the print
     queue as soon as you answer the "MORE?  [Y]"question after the plot is
     completed.  An example of the printout corresponding to a plot of HOLZ
     lines is seen below.

     PHASE=AL      
     REFERENCE:
     BARRETT & MASSALSKI, THE STRUCTURE OF METALS                           
              A         B         C     ALPHA      BETA     GAMMA
         4.0496    4.0496    4.0496      90.0      90.0      90.0

     ZONE AXIS=  4  1  1

     CAMERA LENGTH =  350mm
     C2 APERTURE =  200.um    (C2 DIAMETER =  91.60)
     VOLTAGE = 119.0000kV    WAVELENGTH = 0.033635 Angstroms

     HOLZ LINES FROM LAYERS   1  2  0  0 AND   0
     RANGE OF HOLZ INDICES -N,-N,-N TO N,N,N =  12
     MAX MODULUS OF G.G(HOLZ) =       10.
      1. -3  3 11
      2. -3  5  9
      3. -3  7  7
      4. -3  9  5
      5. -3 11  3
      6. -2  0 10
      7. -2 10  0
      8.  0 -6  8
      9.  0  8 -6
     10.  1 -9  7
     11.  1  7 -9
     12.  2-10  4
     13.  2  4-10
     14.  3-11  1
     15.  3  1-11
     16.  4-10 -4
     17.  4 -8 -6
     18.  4 -6 -8
     19.  4 -4-10


          If the printer option is selected with  the  zero-layer-only-plot
     then the following data will be printed:

     PHASE=AL      
     REFERENCE:
     BARRETT & MASSALSKI, THE STRUCTURE OF METALS                           
              A         B         C     ALPHA      BETA     GAMMA
         4.0496    4.0496    4.0496      90.0      90.0      90.0

     ZONE AXIS=  4  1  1 

     CAMERA LENGTH =  350mm
     C2 APERTURE =  200.um    (C2 DIAMETER =  91.60)
                                                               Page 16


     VOLTAGE = 119.0000kV    WAVELENGTH = 0.033635 Angstroms

     FIRST G DIRECTION =  1 -1  1    SECOND G DIRECTION =  1  1 -1



     2.8  PERFORMING REPEATED PLOTS

          If one replies "Y <RETURN>" or simply  "<RETURN>"  to  the  "MORE
     [Y]?" prompt that appears on the terminal screen after the plotting is
     completed, then there is a slightly different  sequence  of  questions
     asked  by  the  program  in order to produce another plot.  The screen
     will be cleared and the program will ask (the answers  serve  only  as
     examples):

     DO YOU WANT ZERO LAYER (Z), HOLZ (H), OR BOTH (B)?  "H <RETURN>"

     DO YOU WANT PRINTER OUTPUT HOLZ LINE LABELS?  [N] "<RETURN>"

          If you have a HP-7470A plotter and  have  properly  recorded  its
     presence  (see section 2.6), the program will then ask you whether you
     wish to use it for the current plot.

     DO YOU WANT
                 T TERMINAL PLOT ONLY
                 H HP PLOT ONLY
                 B BOTH
                 (DEFAULT= T):  "<RETURN>"

     ANOTHER PHASE FILE?  [N] "<RETURN>"

          The  answer  to  the  last  question  above  will  suppress   the
     subsequent  display  of  the  phase  file  data  on the terminal.  The
     program will then  progress  in  a  manner  similar  to  that  already
     detailed in the previous sections.



     2.9  OBTAINING HARDCOPY OF THE PLOTS

          There several alternatives available here.  They can  be  divided
     into essentially two groups:

     a.  Hardware controlled plots.

     b.  Software controlled plots.




     2.9.1  HARDWARE CONTROLLED PLOTS

          This section covers some of the ways of producing  hard  copy  of
     the  diffraction plots that are totally independent of the Diffraction
     Suite.  Certain terminals,  e.g.   the  Tektronics  4010/14  and  4100
                                                               Page 17


     series have the capability of dumping the contents of their screens to
     a printer under keyboard control.  Some terminals can be connected  to
     a  Video  Printer  such  as the Polaroid Model 48 Videoprinter and the
     screen image can  be  recorded  on  on  a  photographic  medium,  e.g.
     polaroid  prints/film  or 35mm film.  Apple MacIntosh users who employ
     the VersaTerm software can capture and store plots on floppy disk  and
     subsequently  plot  them  on  either  a  dot-matrix  printer  or laser
     printer.

          If desired, when the plots  have  been  viewed  on  the  terminal
     screen,  the  program  can  be rerun and the output directed to a data
     file which may then be directed to a hardcopy device that will  accept
     TEK4010  graphics  commands,  e.g.   the  DEC LN01 Laser printer.  The
     plots are directed to logical unit number 7 in the  FORTRAN  code  and
     therefore  that  number  will  need to be assigned to a file to employ
     this technique.

          The method of obtaining hardcopy without  using  the  program  is
     essentially left to the choice of the operator.



     2.9.2  SOFTWARE CONTROLLED PLOTS

          The  Diffraction  Suite  currently  supports  three  methods  for
     producing hardcopies of the diffraction plots.  Two of these are based
     on host control of Tektronics terminals connected  to  screen  copiers
     (e.g.   the  Tektronics 4601 printers, the Versatec and the Tektronics
     4695 colour ink-jet  printer).   The  third  involves  the  use  of  a
     Hewlett-Packard 7470A or compatible x-y plotter.

          In the case of the screen copiers, if you are using a  Tektronics
     4010  or  similar  terminal  with  a  connected Tektronics 4601 screen
     copier or  Versatec  copier  or  a  Tektronics  4100  series  terminal
     connected  to  a  Tek  4695  colour  copier then you should select the
     Tektronics Screen Copier option in the terminal listing  as  described
     in  section  2.6  above.  The program will then ask, when the plot has
     been completed on the terminal,  if  you  would  like  hardcopy.   The
     question  is  abbreviated to avoid obscuring the plot.  The default is
     affirmative.  If you type N, the question "MORE?  [Y]" will appear and
     you may make another or exit to the main menu.

          If you choose to make a plot, then the program sends the  correct
     escape codes to the terminal to activate the printing process.  In the
     case of the TEK4100 series terminals the program will first  ask:   "S
     OR L?  [S]".

          Selection of S will result in a small fast plot (usually about  a
     minute  of  plotting time) and L will yield a full size plot that will
     take up to eight minutes.  Both of these times assume that you do  not
     have  a  buffer  between  the  terminal  and  the printer.  During the
     printing the terminal is locked and when  completed  the  the  program
     will  print  "MORE?   [Y]" as usual.  If you do have a printer buffer,
     then the data will be dumped to the buffer and you  will  be  able  to
     continue plotting while the printer produces you pattern.
                                                               Page 18


          If you are using a Hewlett-Packard 7470A or  similar  device  for
     hardcopy  plots,  you  will  need  to  have this device connected to a
     separate port of the computer.  The software will not  cope  with  the
     x-y  plotter  in  loop-through  mode.   To  use this option select the
     number for the  HP  plotter  from  the  device  number  list  that  is
     generated when the response "Y<RETURN>" is given to the prompt "Change
     Definitions [N]?".

          Choosing a HP plotter as the hardcopy  unit  will  require  extra
     information  from  the user.  After questioning the user as to whether
     he/she desires printer output, the program will ask:

     DO YOU WANT
                 T TERMINAL PLOT ONLY
                 H HP PLOT ONLY
                 B BOTH
                                  <
                 (DEFAULT= T):  H <RETURN>

          This option is fairly self explanatory.  The preferred method for
     producing  plots  on  the x-y plotter is to first view the patterns on
     the terminal and then produce a plot on the HP plotter.

          If the logical unit FOR080 is assigned to a file then  the  plots
     can be written to a disk file and output at a later date.

     NOTE:  The HP plotting routine will label the first two discs, but  it
     does  not support labelling the patterns with the phase name, the zone
     axis, the date, or the HOLZ line indices.  Therefore, if  the  printer
     option  is  selected, a printout will be generated and the labels will
     appear on the video terminal but not on the hard copy.












                                APPENDIX A

                     GENERAL CRYSTALLOGRAPHIC FORMULAE



          These are some of the general formulae used in the programs, both
     to create the Phase File and to plot the patterns.
     Lattice parameters a,b,c and a,b,g where
                a^b = g , etc

     Volume of the unit cell V:

                V = abc(1 - cos2a - cos2b - cos2g + 2cosacosbcosg)1/2

     Volume of the reciprocal lattice unit cell:

                V* = V-1

                a* = bxc/V = bcsina/V,  b* = casina/V,  c* = absing/V

                cosa* = (cosbcosg - cosa)/sinbsing
                cosb* = (cosgcosa - cosb)/singsina
                cosg* = (cosacosb - cosg)/sinasinb

     If the angle between two real vectors U1 and U2 is f then:

                         U1.U2      
                cosf =  --------
                        |U1||U2| 

     where
                U1.U2 = (u1a + v1b + w1c).(u2a + v2b + w2c)
                      = u1u2a2 + v1v2b2 + w1w2c2 + (v1w2 + v2w1)bccosa
                               + (w1u2 + w2u1)cacosb + (u1v2 + u2v1)abcosg
     and
                U2= U.U = u2a2 + v2b2 + w2c2 + 2vwbccosa
                               + 2wucacosb + 2uvabcosg

     The angle between two reciprocal lattice vectors is given by:

                         g1.g2       
                cosf =  --------
                        |g1||g2|

     The formula is identical to the previous expression for cosf except that
GENERAL CRYSTALLOGRAPHIC FORMULAE                             Page A-2


     uvw is substituted by hkl and a,b,g by a*,b*,g*.

     The angle between a real vector and a reciprocal vector is given by:

                        g.U          
                cosf =  ------
                        |g||U|

     where
                g.U = (ha* + kb* + lc*).(ua + vb + wc)
                    = (hu + kv+ lw)

                [a.a* = 1, a.b* = 0, or generally ai.aj* = dij]



          The zero layer plotting section of the  program  uses  the  Phase
     File  that  was  created using the formulae above to plot the discs or
     spots of the zero order Laue zone.

          The phase file is searched and dot products calculated  for  each
     G-vector  and  the  chosen  zone  axis  U.  If the product is zero the
     vector is plotted, the number of vectors  plotted  is  chosen  by  the
     operator and a convenient number must be determined empirically.












                                APPENDIX B

                      THE EMPTY LATTICE CONSTRUCTION



          Editor's Note:  This appendix was written assuming the  inclusion
     of figures which could not be stored in the Public Domain Library.  If
     the user desires to  have  the  figures,  he/she  should  contact  the
     author.

          Author's Note:  It is not possible to construct the  diagrams  in
     this  appendix  to  scale  and  have them still be useful.  The reader
     should be aware that the Ewald sphere constructions shown have a  much
     smaller radius than they should.

          The main approximation for the simulation  and  plotting  of  the
     HOLZ  deficiency lines in bright field disc is the kinematic or 'empty
     lattice' construction.  The procedure for this is outlined below.




                                   Figure B1
                         The Empty Lattice Construction


          Draw a sphere of radius k about all g vectors,  where  k  is  the
     reciprocal  wavelength  of  the  incident electron beam.  An origin is
     chosen in the reciprocal lattice and the intersections of the  various
     spheres  with  the  sphere drawn about the origin give the loci of the
     Bragg reflection conditions.  These are equivalent to  two  cones  for
     1g, projecting on to a plane through the origin as hyperbolae at large
     angles.  For small angles these lines appear to  be  straight.   These
     lines  are  the HOLZ deficiency lines, in this program we shall assume
     that they are straight.  For high energy electron  this  approximation
     is excellent for angles less than ~10!.

          For a more ideal calculation the sphere about the origin would be
     replaced  by  a  zero  layer dispersion surface which usually exhibits
     less curvature, however mapping on to a sphere in this case  will  not
     affect  the geometries of the line intersections and is sufficient for
     the purpose here.  The case of most interest is when  we  are  looking
     down  a  zone axis of the crystal U, i.e.  the electron is parallel to
     the zone axis.     
THE EMPTY LATTICE CONSTRUCTION                                Page B-2


          To determine where the  intersecting  spheres  project  onto  the
     diffraction  plane we need to know the magnitude of the angle f in the
     plane containing the zone axis and the reciprocal  lattice  vector  g.
     From figure B1 we can see:

                       f = 90 - qg - (90 - qB) = qB - qg

     ( f positive implies that the line will lie in the  opposite  quadrant
     of the projection to g ).

          We can obtain qB and qg from the following:

                sinqB = gl/2    sinqg = g.U/|g||U|


          The program cycles through the HOLZ g vector (gH) range specified
     by  the  operator  and checks to see if U.gH=n, where n is the desired
     number of the Laue layer.  If n is one of  the  chosen  integers,  the
     program  calculates  the  angle f and assumes that the deficiency HOLZ
     line projects into the diffraction plane as a straight line  which  is
     perpendicular  to  the  projection  of the HOLZ g vector into the same
     plane.  The distance from the origin of  the  diffraction  pattern  is
     represented  by  f,  if f is greater than the convergence of the probe
     then it will not be seen, as it will be outside the  second  condenser
     aperture The ends of the HOLZ line are determined by calculating where
     the line will intersect with a circle drawn to  represent  the  second
     aperture.




                                   Figure B2
              Plan View of the Intersection of One Pair of Spheres
                          Projected onto the x-y Plane


          Figure B2 is  a  plan  view  of  the  projection  of  one  sphere
     intersection  on  to  the  plane  perpendicular to the zone axis.  The
     circle represents the condenser aperture of the  microscope.   In  the
     program  the condenser aperture is essentially a window about the zone
     axis of N radians and  sphere  intersections  that  lie  outside  that
     window are not visible in the pattern.

          The program checks that the value of f is less than  that  of  N.
     If  this  is  the case then OP is f radians and AB is the deficit HOLZ
     line.  To determine where to plot this line we need to find the  value
     of  w the angle between OP and the x-axis.  The horizontal axis (x) is
     defined by using the Phase File, it is the shortest reciprocal lattice
     vector  that is perpendicular to the given zone axis U, let us call it
     gx.  To define the vertical axis (y), the vector for the x axis, which
     is  in  reciprocal  units,  is  converted  to real units and the cross
     product taken with U to produce a reciprocal lattice vector, gy  which
     is perpendicular to both U and the x axis.  The matrix used to convert
     the vector is included in Appendix E.
THE EMPTY LATTICE CONSTRUCTION                                Page B-3


                                   Figure B3
              Projection of the HOLZ Vector g on to the x-y Plane.


          Once we  have  the  axes  defined,  then  we  may  determine  the
     magnitudes  and signs of OX and OY (see figure B3), the projections of
     the HOLZ lattice vector g onto the x and y axes.  We need these values
     to  determine where within the C2 apeture we will see the line Knowing
     OX and OY means we  can  calculate  w,  both  the  magnitude  and  the
     quadrant in which it lies.

          Figure B2 shows w as an obtuse  angle  in  the  second  quadrant,
     whereas  figure  B3  shows it as an acute angle in the first quadrant,
     this was done simply as a  matter  of  convenience  when  drawing  the
     diagrams.

          OP determines the distance of the HOLZ line from  the  centre  of
     the zone axis pattern:
                OP = -f = -qB + qg = -sin-1(gl/2) + sin-1(g.U/|g||U|)

          When we know OP, then we can use it together with the convergence
     angle  defined by the C2 aperture to calculate the value of angle v as
     seen in figure B4:
                       cosv = OP/N

          w is determined from the projections g on to the  x  and  y  axes
     (see figure B3):

                       projection of g along x = g .  gx/|g|
                       projection of g along y = g .  gy/|g|

                       w = tan-1( g .  gx/|g| / g.  gy/|g|)

     The signs of the x and y projections of g indicate in which quadrant w
     is located.




                                   Figure B4
              Plan View of How The Intersections of The HOLZ Line
              With The Field Limiting C2 Aperture Are Calculated.


          The HOLZ lines are plotted by drawing a line between the points A
     and  B  in  figure  B4.   The size of the plot is designed to fill the
     screen of the terminal in the HOLZ-only case.  In the case of HOLZ and
     zero  layer  there is a scale factor built into the program that fills
     the screen of the terminal when about 12 orders of the zero layer of a
     silicon <100> pattern is plotted.

          The program is designed to search a volume of  reciprocal  space,
     with  certain user defined limits and draw all lines which fall within
     a designated window (ie.  inside the C2 aperture).  The  user  defined
     limits can be:
THE EMPTY LATTICE CONSTRUCTION                                Page B-4


     1.  Searching from -h,-k,-l to h,k,l

     2.  Setting a maximum value of |g2|

     3.  Calling a subroutine that checks for allowed reflections  for  the
         reciprocal lattice in question.

     4.  Setting several maximum and minimum values for g.U, to search  for
         several layers of the reciprocal lattice













                                APPENDIX C

                    LISTING OF THE DATA FILE TERMIN.DAT



          Note that in this example the terminal is  set  to  a  Tektronics
     4100  series  and  the hardcopy unit is one the ink-jet screen copiers
     available for that unit.  Only the first  three  lines  are  required.
     Please  note that the comments beginning each of the first three lines
     are both spacers as well  as  reminders  about  the  function  of  the
     parameters on each line.

     GRAPHICS TERMINAL TYPE:10
     BAUD RATE FOR GRAPHICS:9600
     HARDCOPY  DEVICE  TYPE:11
     C  --------------------------------------------------------
     C  TERMINAL DEFINITIONS:
     C  ---------------------
     C -3 = ASCII TERMINAL: NO GRAPHICS, & NO VT-100 compatibility & <32
     C        COLUMNS
     C -2 = ASCII TERMINAL: NO GRAPHICS, & NO VT-100 compatibility
     C -1 = ANSI X3.4 ASCII TERMINAL: NO GRAPHICS, VT-100 compatible
     C  0 = TEKTRONICS 4010-1,4014-1 (WITH HARDWARE CURSOR)
     C  1 = TEKTRONICS 4006  ,4010   (NO HARDWARE CURSOR)
     C  2 = LEAR SIEGLER ADM-3,ADM-5 (WITH RETROGRAPHICS RG-512)
     C  3 = PERITEK VCG-512 BIT MAP COLOR GRAPHICS
     C  4 = TEKTRONICS 4027
     C  5 = HP 7470A/7475A HARDCOPY PLOTTER
     C  6 = LA100/LA50 HARDCOPY GRAPHICS
     C  7 = INTECOLOR VT-100 with 4010-1,4014-1 mode
     C  8 = INTECOLOR VT-100 with 4027 mode
     C  9 = DEC VT-200 with 4010-1,4014-1 mode
     C 10 = TEKTRONICS 4105/4107 with VT-100 compatibility mode
     C 11 = PLESSEY VT-100/TEK 4010-1
     C 12 = ESPIRIT VT-100/TEK 4010-1
     C 13 = TEKTRONICS 4010-1 HARDCOPY VIDEO TO VERSATEC
     C 14 = TEKTRONICS 4695 Color Copier
     C  --------------------------------------------------------
     C  BAUD RATE RANGE FOR GRAPHICS (110 - 19200)
     C  --------------------------------------------------------
     C  
     C  
     C  
     C
     C  THE FOLLOWING ARE THE NECESSARY COMMON BLOCKS FOR
LISTING OF THE DATA FILE TERMIN.DAT                           Page C-2


     C  NGRAPH WHICH SHOULD BE INCLUDED IN ALL USER PROGRAMS.
     C
     C  COMMON /CRTLST/ XMIN,DX,YMIN,DY,OFFX,OFFY,XL,YL
     C  COMMON /TERMIN/ ITERM,IBAUD,IPLOT,ICOLOR,IMODE,IHARD
     C  DIMENSION ILX(7),ILY(7)
     C  COMMON /LABEL/ ILX,ILY,NILX,NILY
     C
     C  DEFAULT LABELS FOR X & Y AXIS ARE DEFINED HERE.
     C  THESE MAY BE CHANGED AS APPROPRIATE BY THE USER.
     C  NOTE THAT THE DIMENSIONS OF ILX AND ILY MUST CHANGE WITH
     C  THE SIZE OF THE LABEL DESIRED.
     C
     C
     C  ILX= LABEL OF XAXIS STORED AS TWO CHARACTERS PER BYTE.
     C  ILY= LABEL OF YAXIS STORED AS ONE CHARACTER PER BYTE.
     C  NILX= TOTAL NUMBER OF CHARACTERS IN XAXIS LABEL 
     C  INCLUDING SPACES.
     C  NILY=TOTAL NUMBER OF CHARACTERS IN YAXIS LABEL INCLUDING
     C          SPACES.
     C
     C  HERE IS A TYPICAL LABEL: X AXIS = Energy (eV), Y AXIS = Counts
     C
     C  DATA ILX /'En','er','gy',' (','eV',') ','  '/
     C  DATA ILY /'C ','o ','u ','n ','t ','s ','  '/
     C  NILX=14         
     C  NILY=7
     C
     C
     C

          NOTE 1:  The information commented below the terminal data is for
     XEDS and EELS spectra plotting with Nestor Zaluzec's Graphics Package;
     it can be ignored in this case.

          NOTE 2:  The baud rate listed is not the actual  baud  rate  that
     the data is transmitted to the terminal.  It is a value institiuted by
     Nestor to allow  for  the  speed  of  response  of  various  different
     terminals and interconnection systems.  Increasing the number actually
     decreases the speed of data transmission as a delay loop time  is  set
     from it.












                                APPENDIX D

                              PROGRAM LISTING



          This is the source code section.  In the EMMPDL the source is  in
     a separate file.












                                APPENDIX E

             CONVERSION MATRIX FOR RECIPROCAL LATTICE VECTORS



          This section lists the conversion of a reciprocal lattice  vector
     to an identical vector expressed in real space units.

                g=ha*+kb*+lc*=ra+sb+tc

     We need a matrix P such that:

                f  P11  P12  P13  v     f h     v       f r     v
                g  P21  P22  P23  w     g k     w   =   g s     w
                h  P31  P32  P33  x     h l     x       h t     x
     and
                a* = P11a + P12b + P13c         i
                b* = P21a + P22b + P23c         ii
                c* = P31a + P32b + P33c         iii

                a.a*=1,  b.a*=0,  c.a*=o        iv

     If we substitute i into iv then we get:

                P11a2      +    P21abcosg   +   P32accosb  =    1
                P11abcosg  +    P21b2       +   P31bccosa  =    0
                P11accosb  +    P21bccosa   +   P31c2      =    0
     or
                f  a2   abcosg  accosb  v       f P11 v         f 1 v
                g  abcosg   b2  bccosa  w       g P21 w   =     g 0 w
                h  accosb  bccosa   c2  x       h P31 x         h 0 x

     Write the matrix as M.
     (Note that det M = a2b2c2(1 - cos2a - cos2b - cos2g + 2cosacosbcosg) = V2)

     Then
                     f P11 v    f 1 v           f P11 v         f 1 v
                M =  g P21 w  = g 0 w    and    g P21 w  = M-1  g 0 w
                     h P31 x    h 0 x           h P31 x         h 0 x

     So,
                P11 = M11-1 = adj M11/det M
                P21 = M21-1 = adj M21/det M
                P21 = M31-1 = adj M31/det M

CONVERSION MATRIX FOR RECIPROCAL LATTICE VECTORS              Page E-2


                P11 = b2c2(1 - cos2a)/V2 = b2c2sin2a/V2
                P21 = abc2(cosacosb - cosg)/V2
                P31 = ab2c(cosacosg - cosb)/V2

     The other components of Matrix P can be written down by rotation of 
     a,b,c & a,b,g:

               f   b2c2sin2a      abc2(cosacosb-cosg)  ab2c(cosacosg-cosb)   v
     P = 1/V2  g   abc2(cosacosb-cosg)  a2c2sin2b      a2bc(cosbcosg-cosa)   w 
               h   ab2c(cosacosg-cosb)  a2bc(cosbcosg-cosa)      a2b2sin2g   x 

     or 

                   f   sin2a/a2   (cosacosb-cosg)/ab   (cosacosg-cosb)/ac   v
     P = (abc/V)2  g   (cosacosb-cosg)/ab   sin2b/b2   (cosbcosg-cosa)/bc   w 
                   h   (cosacosg-cosb)/ac   (cosbcosg-cosa)/bc   sin2g/c2   x 

                (Note that cosacosb - cosg = sinasinbsing*, etc.)

     The inverse matrix P-1,which converts a real vector U to reciprocal
     indices, is obtained by adding stars to every parameter above.


     For an orthorhombic cell:

                        f       1/a2    -       -       v
                P =     g       -       1/b2    -       w 
                        h       -       -       1/c2    x 

     Then ha* + kb* + lc* = (h/a2)a + (k/b2)b + (l/c2)c .


     For a hexagonal cell:
     a,b=90!, g=120!, cosg=-1/2, sing=3/2 V=a2cV3/2, (abc/V)2=4/3

                        f       1/a2    1/2a2   -       v
                P =     g       1/2a2   1/a2    -       w 
                        h       -       -       3/4a2   x 


     For a monoclinic cell:
                V2 = a2b2c2(1 - cos2b), (abc/V)2 = 1/sin2b

                        f       1/a2    -       cosb/ac         v
                P =     g       -       sin2b/b22       -       w 
                        h       -cosb/ac        -       1/c2    x 












                                APPENDIX F

          A SELECTED BIBLIOGRAPHY OF CONVERGENT-BEAM DIFFRACTION




     The first CBED paper:

          "Elektroneninterferenzen im Konvergenten Bundel", W.  Kossel  and
          G.  Mollenstedt, Ann.  Phys.  36 (1939) 113-140.


     Books:

          "Convergent-Beam  Electron  Diffraction",  M.   Tanaka   and   M.
          Terauchi (J.E.O.L., Tokyo, 1985), 192 pp.

          "Convergent Beam  Electron  Diffraction  of  Alloy  Phases",  the
          Bristol  Group  under  the  direction of John Steeds, compiled by
          John Mansfield (Adam Hilger, Bristol, 1984), 105 pp.


     Books with useful sections on CBED:

          "Electron Beam Analysis of Materials", M.  H.   Loretto  (Chapman
          and Hall, London, 1984) 210 pp.

          "Practical Analytical Electron Microscopy in Materials  Science",
          D.   B.   Williams (Verlag Chemie International, Deerfield Beach,
          1984) 153 pp.


     Review Articles:

          "Convergent  Beam  Electron   Diffraction",   J.W.    Steeds   in
          "Introduction  to  Analytical Electron Microscopy" , Eds.  J.  J.
          Hren, J.  I.  Goldstein and D.  C.  Joy (Plenum, New York,  1979)
          387-422.

          "Electron  Crystallography",  J.W.    Steeds   in   "Quantitative
          Electron  Microscopy",  Eds.   J.  N.  Chapman and A.  J.  Craven
          (Scottish Universities Summer School in Physics,  Edinburgh,1984)
          49-96.

          "Electron Microdiffraction",  J.   C.   H.   Spence  and  R.   W.
A SELECTED BIBLIOGRAPHY OF CONVERGENT-BEAM DIFFRACTION        Page F-2


          Carpenter  the  second  edition  of  "Introduction  to Analytical
          Electron Microscopy"  (see  above)  to  be  published.   [In  the
          meantime  see  R.   W.   Carpenter  and  J.   C.   H.  Spence, J.
          Microsc.  136 (1984)165-178].

          "Convergent-Beam Techniques in Transmission Electron Microscopy",
          J.  A.  Eades, Appl.  Surface Science (in press).


     Tutorial Paper:

          "How To Get A Convergent Beam Electron  Diffraction  Pattern  And
          How  To Recognize What You See", J.A.  Eades, Norelco Reporter 32
          (1985) 22-37 (based on an EMSA tutorial available on videotape).












                                APPENDIX G

                    SOURCE CODE COMPILATION AND LINKING



     To compile the source code, use the following command file on a VAX:

$ FORTRAN/EXTEND/F77 DIFFRACTIONSUITE
$ FORTRAN/EXTEND/F77 NGRAPH
$ LINK/MAP/NOTRACEBACK/EXE=DIFFRACT.EXE,DIFFRACTIONSUITE,NGRAPH

     The resulting executable image is DIFFRACT.EXE .

     Note:  Ngraph is Nestor Zaluzec's graphics package, which is available
in the EMMPDL.

     This is the command file that assigns all the devices for running  the
DIFFRACTION SUITE:

$ !
$ ASSIGN YOUR_DISK: FOR030
$ ASSIGN YOUR_DISK: FOR006
$ ASSIGN YOUR_DISK: FOR008
$ ASSIGN YOUR_DISK: FOR011
$ ASSIGN TT:  FOR001
$ ASSIGN TT:  FOR004
$ ASSIGN TT:  FOR007
$ ASSIGN TT:  FOR005
$ ASSIGN YOUR_XY_PLOTTER:  FOR080
$ ASSIGN YOUR_DISK: DAT:
$ ASSIGN YOUR_PRINTER: FOR002

     Where the devices labelled "YOUR..."  are  those  on  your  particular
system.