Title                   :TCBED.DOC
Keywords                :CBED
Computer                :VAX, Macintosh, Machine independent
Operating System        :Any
Programming Language    :Fortran 77
Hardware Requirements   :Line printer
Author(s)               :J.M. Zuo and J.C.H. Spence
Correspondence Address  :Physics Dept, Arizona State Univ., Tempe, AZ 85287, USA

A full description of this program including test data is contained in the may,
1989 issue of Journal of Electron Microscopy Technique (Zuo et al)

C
C WRITTEN BY J.M. ZUO, OCT 1987, SEE J.M. ZUO OR J.C.H. SPENCE
C (PHYSICS DEPT, ARIZONA STATE UNIVERSITY, TEMPE, AZ85287, USA,
C TEL (602)965-6486) TO DISCUSS USE OF THIS PROGRAM AND REPORT ANY ERRORS.
C
C THE PURPOSE OF THIS PROGRAM IS TO CALCULATE THE TWO-DIMENSIONAL INTENSITY
C DISTRIBUTION IN TRANSMISSION ELECTRON DIFFRACTION PATTERN FOR A RANGE OF
C INCIDENT BEAM DIRECTIONS. IT THUS CALCULATES CONVERGENT BEAM DISC
C INTENSITY DISTRIBUTIONS FOR ELECTRONS IN 20 Kev - 5 Mev RANGE.
C
C THREE DIMENSIONAL DIFFRACTION (HIGH ORDER LAUE ZONE EFFECTS) ARE
C INCLUDED BY THE RENORMALIZED EIGENVECTOR METHOD. THIS IS DESCRIBED
C IN FOLLOWING PAPERS:
C A.L. Lewis,R.E. Villagrana and A.J.F Metherall,Acta Cryst.
C A34,138 (1978) and J.M. Zuo, J.C.H. Spence, M. O'keffe, Phys. Rev. Letts,
C 61, p353 (1988). More background information can be found in
C Humphreys, Rep. Prog. Phys. 42, p 1825 (1979),
C Spence, "Experimental HREM" Oxford Univ. Press (2nd ed) 1988.
C Zuo and Spence, J. Micros. Techniqe (1988), in press.
C
C THE CRYSTAL IS ASSUMED TO BE PARALLEL SIDED SLAB, WHOSE INCLINATION
C TO THE BEAM MUST BE SPECIFIED. UP TO 100 BEAMS MAY BE INCLUDED. THE
C PROGRAM SHOULD WORK FOR ANY CRYSTAL SYSTEM, BUT HAS ONLY BEEN TESTED
C FOR CUBIC AND HEXAGONAL CRYSTALS.
C
C ABSORPTION IS INCLUDED USING THE GENERAL EIGENVALUES AND
C EIGENVECTORS OF A COMPLEX GENERAL MATRIX. (NOT BY PERTURBATION)
C
C THE SIGN CONVENTION USED IS CONSISTENT WITH AN INCIDENT WAVE
C exp(-2*3.14iK*r), K IS DOWNWARDS TO THE CRYSTAL (WITH ITS SURFACE
C NORMAL UPWARDS). SEE SPENCE (ABOVE) AND Ultramic. 12, p75 (1983)
C FOR DISCUSSION OF SIGN CONVENTION ETC.
C THIS PROGRAM USE THE CRYSTALLOGRAPHIC NOT QUANTUM MECHANICAL SIGN
C CONVENTION, AND IS THEREFORE CONSISTENT WITH THE STRUCTURE FACTORS IN
C THE INTERNATIONAL TABLES FOR X-RAY CRYSTALLOGRAPHY.
C
C THE PROGRAM USES THE EISPACK ROUTINES TO FIND THE EIGENVECTORS AND
C EIGENVALUES OF A COMPLEX GENERAL MATRIX. SEE B.T. SMITH et. al.
C Lecture Notes in Computer Science, Vol. 6. SPRINGER-VERLAG 1976
C SUBROUTINE "INVESE" IS ALSO REQUIRED.
TEST DATA FOR TCBED PROGRAM 
 
CdS, Bragg cond. at the center of (41-2) and (41-4) disc
2 4
12
0 0 0
4 1 -2
4 1 -4
4 1 0
4 1 2
4 1 -6
4 1 -8
0 0 -2
0 0 -4
0 0 2
0 0 -6
0 0 -8
-1 4 0 -1 4 0
4.1348 4.1348 6.7490 90.0 90.0 120.0
120.0 1 865.0
-1.78552 -0.44638 3.0 0.00 0.00 0.06 0.013894 0.0034734 0.0 50 50
Cd
19.2214 0.5946 17.6444 6.9089 4.461 24.7008 1.6029 87.4825 5.0694
S
6.9053 1.4679 5.2034 22.2151 1.4379 0.2536 1.5863 56.1720 0.8669
1
0 0 -2 0.056818 0.509081
1 0.66667 0.33333 0.00000 1.4
1 0.33333 0.66667 0.50000 1.4
2 0.66667 0.33333 0.37700 1.13
2 0.33333 0.66667 0.87700 1.13
0.57E-01 -0.045 0.13 0.03
1 3
1
0 0 -2 -0.08


 
 OUTPUT LISTING OF TCBED PROGRAM, VERSION 1
 
 CdS, Bragg cond. at the center of (41-2
 
 The unit cell of the crystal is (in Anstroms  and degrees):
 
          a =   4.13480
          b =   4.13480
          c =   6.74900
      alpha =   90.0000
       beta =   90.0000
      gamma =  120.0000
 
 Calculate for  1 thicknesses. Those thickness are:   865.00
 
 The closest zone axis is ( -1  4  0)
 The surface normal of the specimen is ( -1  4  0)
 
 The electron diffraction intensity is calculated for  50 50 different incident
beam directions.
 The initial incident direction is ( -1.78552 -0.44638  3.00000)
 This is the dimensionless component of the incident wavevector in the nearest Z
OLZ.
 In each calculation this is increased by ( 0.00000 0.00000 0.06000) and ( 0.013
89 0.00347 0.00000)
 
 The parameter for X-ray structure factor calculation are:
 
 Cd   48. 19.221399  0.594600 17.644400  6.908900  4.461000 24.700800  1.602900
87.482498  5.069400
 S    16.  6.905300  1.467900  5.203400 22.215099  1.437900  0.253600  1.586300
56.172001  0.866900
 
 Number of structure factors to be refined is  1,which are:
 (  0  0 -2)
 
 The atomic positions in the unit cell and Debye-Waller factors are:
 Cd      0.666670    0.333330    0.000000    1.400000
 Cd      0.333330    0.666670    0.500000    1.400000
 S       0.666670    0.333330    0.377000    1.130000
 S       0.333330    0.666670    0.877000    1.130000
 
 
 U(000)= 0.570E-01, U'(000)/U(000) = -0.045, B=  0.130, C=  0.030
 
 The Ug'/Ug for following reflections are:
      0    0   -2 -0.080000
 
 The volume of the unit cell is   99.92613
 a', b' and c' are :   0.27926   0.27926   0.14817
 
 The incident electron has energy 120.00 kev.
 
 The wavelength is 0.03349229 Angstroms
 
 The indicies and the Ug Values (including absorption)  used in this calculation
 are: 12
 
      Beams           Real         Imaginary      Amplitude        Phase
 (   4   1  -2)    0.68736E-02    0.19481E-02    0.71443E-02    15.823883
 (   4   1  -4)    0.30387E-02   -0.25976E-03    0.30498E-02    -4.885984
 (   4   1   0)    0.98622E-02   -0.11562E-02    0.99298E-02    -6.686487
 (   4   1   2)    0.62244E-02   -0.35068E-02    0.71443E-02   -29.396605
 (   4   1  -6)    0.35266E-02   -0.22105E-02    0.41621E-02   -32.078915
 (   4   1  -8)    0.38135E-02   -0.64182E-03    0.38672E-02    -9.553431
 (   0   0  -2)    0.51828E-01    0.23723E-01    0.57000E-01    24.594271
 (   0   0  -4)    0.14255E-01   -0.27152E-03    0.14258E-01    -1.091180
 (   0   0   2)    0.47398E-01   -0.31661E-01    0.57000E-01   -33.742115
 (   0   0  -6)    0.14306E-01   -0.78553E-02    0.16321E-01   -28.770739
 (   0   0  -8)    0.11884E-01   -0.16854E-02    0.12003E-01    -8.071494
1
 REFLECTION (    4    1   -4  )
 
 THICKNESS     865.00 Anstroms
 
 THE INTENSITY IS SCALED FROM 0 TO 99, MAXIMUM IS  0.127E+00
 
     0  1  2  3  4  5  6  7  8  9  0  1  2  3  4  5  6  7  8  9  0  1  2  3  4
5  6  7  8  9  0  1  2  3  4  5  6  7  8  9
 
 0   0  0  0  0  0  0  0  0  0  0  1  2  2  2  2  2  1  0  0  0  0  0  0  1  1
0  0  0  0  2  7 14 24 34 43 45 38 26 16  9
 1   0  0  0  0  0  0  0  0  0  0  1  2  2  1  1  1  0  0  0  0  1  1  2  2  2
1  1  2  4  9 17 27 35 41 43 39 28 15  6  2
 2   0  0  0  0  0  0  0  0  0  0  1  2  2  1  0  0  0  0  0  1  2  3  4  3  2
2  3  7 12 20 30 37 41 39 35 27 15  5  1  2
 3   0  0  0  0  0  0  1  1  0  0  1  2  2  0  0  1  1  0  0  1  3  4  4  2  2
3  8 14 23 32 40 42 38 30 21 13  5  0  2  6
 4   0  0  0  0  1  1  2  2  1  0  0  1  1  0  0  1  1  1  0  1  3  3  2  1  0
4 12 22 32 39 42 38 28 16  8  3  0  2  7 12
 5   0  0  0  0  1  2  3  4  2  0  0  0  0  0  0  1  1  1  0  1  2  3  2  0  0
5 14 26 35 39 36 26 14  5  1  1  3  8 14 16
 6   0  0  0  1  2  3  5  5  4  1  0  0  0  0  0  0  1  0  0  1  4  6  7  4  3
5 13 23 30 30 23 12  3  0  2  6 10 15 18 16
 7   0  0  0  1  2  3  5  6  5  2  0  0  0  0  0  0  0  0  0  4  9 15 17 14  8
6 10 16 19 16  9  2  0  4 10 14 17 20 19 13
 8   1  1  0  1  2  3  4  6  6  3  1  0  0  0  0  0  1  1  4 10 19 28 30 24 14
6  4  7  8  5  1  1  7 15 21 22 22 21 17  9
 9   1  1  1  1  1  1  3  5  6  4  2  0  0  0  2  3  5  7 11 19 30 40 41 32 17
5  1  1  2  3  5 11 19 26 28 26 22 18 12  5
 0   2  2  1  0  0  0  2  4  4  4  2  0  0  2  6 11 14 16 20 27 37 44 43 31 15
3  0  2  6 11 18 25 31 33 30 24 18 13  8  2
 1   2  2  1  0  0  0  1  2  3  3  2  1  2  6 13 20 25 26 27 29 35 38 34 22  8
1  3 10 19 28 34 38 37 33 26 19 13  8  4  1
 2   1  2  2  1  0  1  1  2  2  2  3  3  5 11 21 29 34 33 28 25 24 23 19 10  1
1  9 22 36 44 47 43 35 27 18 12  7  4  2  1
 3   0  1  2  2  2  3  3  3  3  3  4  6 10 17 26 34 37 32 23 14 10  9  8  4  0
4 16 33 48 54 50 39 27 18 11  6  3  2  1  1
 4   0  1  1  2  3  5  5  6  5  5  7 10 14 20 27 32 31 24 13  3  2  6 10 10  9 1
1 23 39 51 52 43 29 17  9  5  3  1  1  1  1
 5   0  0  1  2  4  6  7  7  7  8 10 13 16 20 22 23 19 12  3  0  6 19 29 30 25 2
2 27 37 44 41 29 17  8  4  2  1  0  1  2  1
 6   0  0  0  2  3  5  7  8  8  9 12 14 15 15 14 11  7  2  0  7 24 45 58 56 43 3
2 28 30 31 25 15  7  3  1  1  0  0  1  1  1
 7   0  0  0  1  3  4  5  6  7  9 11 12 12  9  6  3  1  0  6 23 49 74 85 77 57 3
7 25 20 17 11  5  2  1  1  0  0  0  1  1  1
 8   0  0  0  1  2  3  3  3  4  6  8  9  7  4  3  3  4  9 22 43 70 92 99 86 62 3
7 20 11  6  3  1  0  1  0  0  0  0  1  1  0
 9   0  0  0  1  2  2  2  1  1  3  4  5  5  5  7 11 18 26 39 57 78 93 93 79 55 3
1 14  4  1  0  1  1  1  0  0  0  0  1  1  0
 0   0  0  1  1  2  2  1  1  0  1  2  4  7 11 17 26 35 43 51 60 70 75 73 60 41 2
1  7  1  0  1  2  2  1  0  0  0  0  0  0  0
 1   1  1  1  2  2  2  2  2  1  2  4  8 13 20 30 40 49 53 54 52 50 49 46 38 25 1
2  3  0  1  3  3  2  0  0  0  0  0  0  0  0
 2   2  2  1  1  1  1  2  2  3  4  8 14 22 30 39 47 53 53 46 36 27 23 22 19 12
5  0  0  3  4  3  1  0  0  0  0  0  0  0  0
 3   2  2  1  0  0  0  1  2  3  7 13 21 30 37 42 46 47 42 32 19 10  7  8  7  5
1  0  1  3  4  2  0  0  0  0  0  0  0  0  0
 4   1  1  1  0  0  0  0  0  2  8 16 25 33 37 39 38 35 28 17  7  2  1  3  3  2
0  0  2  3  3  1  0  0  0  0  0  0  0  0  0
 5   1  1  2  2  2  1  1  0  1  6 14 23 29 32 31 28 23 16  8  2  0  1  3  4  3
2  2  2  2  2  1  0  0  0  0  0  0  0  0  0
 6   2  3  4  5  6  7  6  4  3  5 10 16 22 24 24 22 19 13  6  1  1  3  6  7  6
5  4  3  2  1  0  0  0  0  0  0  0  0  0  0
 7   7  6  7  9 12 15 16 15 11  6  5  8 13 17 21 23 22 18 11  4  1  3  7 11 11
8  5  3  2  1  0  0  1  1  0  0  0  0  0  0
 8  15 11 10 11 15 22 28 29 22 12  3  1  6 13 21 28 32 28 19  7  0  2  9 15 16 1
2  7  4  2  1  1  1  2  2  1  1  0  0  0  0
 9  24 16 11 10 15 26 38 43 36 21  6  0  3 12 24 35 41 39 26 10  0  2 10 18 19 1
5  9  5  2  1  1  2  3  3  2  1  0  0  0  0
 0  31 20 10  6 11 25 42 50 45 29 12  3  4 13 26 39 46 44 31 13  3  4 12 20 21 1
6  9  5  3  2  2  3  4  4  3  1  0  0  0  0
 1  32 20  8  2  5 19 37 49 46 33 17  7  6 13 24 36 44 42 31 16  6  7 13 18 18 1
4  9  5  4  3  3  4  4  4  2  1  0  0  0  0
 2  29 19  8  0  1 12 27 39 39 31 19 11  9 12 19 28 34 34 26 16  9  9 12 14 13 1
0  7  5  4  3  3  3  3  3  2  1  0  0  0  0
 3  25 19 11  4  2  7 16 24 26 23 17 11  9  9 12 17 21 22 19 13  9  8  8  8  7
5  4  3  3  2  2  2  2  2  1  1  0  0  0  0
 4  22 21 18 13  8  7  8 11 13 13 11  9  7  6  6  8 10 11 11  9  6  5  4  3  2
1  1  1  1  1  1  1  0  1  1  1  0  0  0  0
 5  25 27 27 23 16  9  5  3  4  4  5  4  4  3  2  2  2  3  4  4  3  1  0  0  0
0  0  0  0  0  0  0  0  0  0  1  1  0  0  0
 6  32 35 35 31 22 12  4  1  0  0  1  1  2  2  1  0  0  0  0  0  0  0  0  0  0
0  0  0  0  0  0  0  0  0  0  1  1  1  0  0
 7  41 41 39 32 22 12  5  2  0  0  0  0  0  1  1  1  0  0  0  0  0  0  1  1  2
1  1  1  1  1  1  1  1  1  1  1  1  1  0  0
 8  46 42 35 27 18 10  5  3  2  1  0  0  1  1  2  2  2  1  1  1  2  2  3  3  3
3  3  2  2  3  3  3  2  2  1  1  1  0  0  0
 9  44 35 27 18 11  5  3  2  2  2  1  1  1  1  2  2  2  3  3  4  4  4  4  4  3
3  3  4  4  4  4  3  3  2  1  1  0  0  0  0
 
 
-------------------------------------------------------------------------------