m

• I V.Hftpuc

fc • ^Ajl

1 |H M*

HE OKX

' n

.: 1 &JHzi

,

Kfc
National OUic- l$\ Artmin.

JUN 3 1971

NBS TECHNICAL NOTE 600

Corrections and Calculations on

an X-ray Diffraction Line Profile:

A Computer Program

\amtt ^<>i3t
NATIONAL BUREAU OF STANDARDS

The National Bureau of Standards1 was established by an act of Congress March 3, 1901. The Bureau's overall goal is to strengthen and advance the Nation's science and

technology and facilitate their effective application for public benefit. To this end, the Bureau conducts research and provides: (1) a basis for the Nation's physical measure- ment system, (2) scientific and technological services for industry and government, (3) a technical basis for equity in trade, and (4) technical services to promote public safety.

The Bureau consists of the Institute for Basic Standards, the Institute for Materials

Research, the Institute for Applied Technology, the Center for Computer Sciences and

Technology, and the Office for Information Programs.

THE INSTITUTE FOR BASIC STANDARDS provides the central basis within the United States of a complete and consistent system of physical measurement; coordinates

that system with measurement systems of other nations; and furnishes essential services leading to accurate and uniform physical measurements throughout the Nation's scientific community, industry, and commerce. The Institute consists of a Center for Radiation Research, an Office of Measurement Services and the following divisions: Applied Mathematics—Electricity—Heat—Mechanics—Optical Physics—Linac

Radiation2—Nuclear Radiation2—Applied Radiation2—Quantum Electronics3—

Electromagnetics3—Time and Frequency3—Laboratory Astrophysics3 —Cryogenics3

. THE INSTITUTE FOR MATERIALS RESEARCH conducts materials research lead- ing to improved methods of measurement, standards, and data on the properties of

well-characterized materials needed by industry, commerce, educational institution's, and

Government; provides advisory and research services to other Government agencies;

and develops, produces, and distributes standard reference materials. The Institute consists of the Office of Standard Reference Materials and the following divisions: Analytical Chemistry—Polymers—Metallurgy—Inorganic Materials—Reactor

Radiation—Physical Chemistry.

THE INSTITUTE FOR APPLIED TECHNOLOGY provides technical services to pro- mote the use of available technology and to facilitate technological innovation in industry and Government; cooperates with public and private organizations leading to the development of technological standards (including mandatory safety standards), codes

and methods of test; and provides technical advice and services to Government agencies

upon request. The Institute also monitors NBS engineering standards activities and

provides liaison between NBS and national and international engineering standards

bodies. The Institute consists of the following technical divisions and offices: Engineering Standards Services—Weights and Measures—Flammable Fabrics

Invention and Innovation—Vehicle Systems Research—Product Evaluation

Technology—Building Research—Electronic Technology—Technical Analysis

Measurement Engineering.

THE CENTER FOR COMPUTER SCIENCES AND TECHNOLOGY conducts re- search and provides technical services designed to aid Government agencies in improving cost effectiveness in the conduct of their programs through the selection, acquisition,

and effective utilization of automatic data processing equipment; and serves as the principal focus within the executive branch for the development of Federal standards for automatic data processing equipment, techniques, and computer languages. The Center

consists of the following offices and divisions: Information Processing Standards—Computer Information—Computer Services —Systems Development—Information Processing Technology.

THE OFFICE FOR INFORMATION PROGRAMS promotes optimum dissemination

and accessibility of scientific information generated within NBS and other agencies of

the Federal Government; promotes the development of the National Standard Reference

Data System and a system of information analysis centers dealing with the broader

aspects of the National Measurement System; provides appropriate services to ensure

that the NBS staff has optimum accessibility to the scientific information of the world,

and directs the public information activities of the Bureau. The Office consists of the following organizational units: Office of Standard Reference Data-—Office of Technical Information and

Publications—Library—Office of Public Information—Office of International

Relations.

1 Headquarters and Laboratories at Gaithersburg, Maryland, unless otherwise noted; mailing address Washington, D.C. 20234.

2 Part of the Center for Radiation Research.

3 Located at Boulder, Colorado 80302.
t»l,IUU»«M..l..WI.«lll.llll.lll.llll PL

J

L\oo UNITED STATES DEPARTMENT OF COMMERCE

Maurice H. Stans, Secretary

(j £ NATIONAL BUREAU OF STANDARDS • Lewis M. Branscomb, Director

,0

NBS TECHNICAL NOTE 600

ISSUED JUNE 1971

Nat. Bur. Stand. (U.S.), Tech. Note 600, 34 pages (June 1971

CODEN: NBTNA

Corrections and Calculations on an X-ray

Diffraction Line Profile: A Computer Program

Raymond E. Schramm

Cryogenics Division

Institute for Basic Standards

National Bureau of Standards

Boulder, Colorado 80302

^ 0F c,

"fffAU Of

NBS Technical Notes are designed to supplement the Bureau's regular publications program. They provide

a means for making available scientific data that are

of transient or limited interest. Technical Notes may

be listed or referred to in the open literature.

For sale by the Superintendent of Documents, U.S. Government Printing Office, Washington, D.C. 20402

(Order by SD Catalog No. C13.46:600), Price 40 cents

¥ymnnrniiii i iii iwi iiiiiriiiiiitTiwMMffliMniMWiMrwiTT¥iTnrriTfi TiRnriirn

Table of Contents

page

List of Tables

iv List of Figures

iv Abstract

1

1. Introduction . . . 1

2. Background Calculation. "BACK" 4

3. Angular Correction, "ANG"

5

3. 1 Lorentz -polarization Factor (LP) c

3.2 Atomic Scattering Factor (/)

3. 3 Sample Absorption (A)

4. Rachinger Separation, "RACH"

8

5. Center of Gravity Calculation, "CENTROID"

6. Peak Calculation, "PEAK"

7. Curve Smoothing, "SMOOTH"

8. Data Input and Output and a Sample Card Input 15

9. Program Listing _

10. Appendix: Corrections Necessary When Using Other

Radiations, Samples, and Geometries 2 R References

29
List of Tables

Table Pa§

e

1. List of symbols used

2. Normalized atomic scattering factors, /

3. Power series coefficients for the atomic scattering factors 6

List of Figures

Figure Pa£

1. X-ray diffraction line profile 2

e

IV
Corrections and Calculations on an X-rayDiffraction Line Profile: A Computer Program

Raymond E. Schramm

This computer program was written to perform corrections and make calculations on an x-ray diffraction profile before Fourier analysis. The corrections are for background and for variations of intensity with the Bragg angle.

Also calculated are the separation of the Ka^ - Ka^ doublet and the centroid and

position of peak maximum with their standard deviations. There is also an

option to smooth the profile.

Key Words: Computer programs, Fourier analysis, nickel steels, x-ray

analysis, x-ray diffraction, statistics.

1. Introduction

Annealed and heavily strained x-ray diffraction line profiles (fig. 1) can be compared

to provide information on parameters such as particle size, dislocation density, and stacking

fault energy. One scheme to do this is Fourier analysis. Gazzara, Stiglich, Meyer, and

Hansen wrote a computer program "UNFOLD" to perform the mathematical operations;

[2 3] several other programs are also available. In working with a series of iron-nickel alloys,

it became necessary to make corrections and calculations on the x-ray data in addition to those

available in the program of Gazzara, et al. The program "PREP" was written to unify the

preparation for programs such as "UNFOLD" by making all of the following calculations.

Within subroutines corrections are made for:

1. Background intensity.

2. Variation of intensity with the Bragg angle due to geometrical factors.

Subroutines are also used to determine:

[4]

1. Rachinger separation of the Ka^ - Ko^ doublet.

2. Centroids of the Key and Ka^ profiles with estimated standard deviations.

3. Peak maxima of the Ko? and Ka^ profiles with estimated standard deviations.

Figures in brackets indicate the literature references at the end of this paper.

iiiiimiiiHiiinr1 '" 1 ''"- -••
o

o.«

--O

UJo

z

o

o

lA. o

UJ

_i

o

z

<

ok

a

o

o o

>CD <» --

(M A1ISN31NI QBlOVWdiia
Symbol Page of First Appearance

Table 1. List of Symbols Used.

Meaning

b 4

c 7 d 8

/ 5 h 7 m 7 n 4

r 5 X 7

z 4

"A 5 B.C.D, 13 G 2

I, Ii, Is 4

K a , K o^ , K a2 I LP 5 a 5 626 14 A28 10

9 1

^» ^li ^3 8

M

5

P 7

Ps 7 a 11

Background intensity on low angle side of diffraction

line s

Background intensity at an arbitrary point.

Composite angular correction factor.

Angular separation of KOt^ - K cc3 doublet.

Atomic scattering factor.

Cylindrical specimen height.

Specimen density.

Number of experimental points or pairs of 2 9. and

1(29.).

x

Cylindrical specimen radius.

Mass fraction of Nickel

Background intensity on high angle side of diffraction

line.

Sample absorption factor.

Parameters of parabolic fit to peak.

Profile center of gravity.

Reflected intensity (counts/unit time) due to the

radiations KCt, KCLX , and K ct3 respectively.

Characteristic radiations of the X-ray tube target.

Lorentz-polarization factor.

Bragg angle of crystal monochromator.

Increment in 2 6 between individual measurements.

Angular span between first and last measurements.

Specimen Bragg angle of reflection; 2 9 is twice this

angle. 2 9 max is the position of the peak maximum.

Wavelengths of KCt, KC^, and KCt3 radiations respectively.

Linear X-ray absorption coefficients.

Specimen mass density

Mass density of powder sample.

Standard deviation of center of gravity and peak maximum.

MMU'ijMiIHMMWUHBllffi (fossa
It has been found advantageous to smooth the profiles of cold-worked samples before

Fourier analysis so an option to do this has been provided. It is also possible to have the

corrected profile data punched in a format ready to enter "UNFOLD".

Angular positions are entered in values of 2 9 (twice the Bragg angle). The diffraction intensities must be in the fixed-time mode (intensity count at each angular increment

determined for a fixed length of time) and measured at equal increments of 2 9 across the

entire profile. Several constants are written into the program assuming Debye-Scherrer

geometry, the use of a monochromator with Co K a radiation, and iron-nickel or silver

samples. The changes necessary when using other geometries, radiations, or samples

are listed in the Appendix.

This program has been written in FORTRAN language and executed on a CDC 3800*

computer.

2. Background Calculation, "BACK"

The background intensity is the measured radiation that is scattered into the detector by

means other than primary Bragg reflection of the Kct component by the specimen. It generally

arises from a number of sources: fluorescent radiation from the specimen, diffraction of

the continuous spectrum, incoherent scattering from the specimen, and diffraction or

scatter from something other than the specimen itself (e. g. , collimator, air, etc. ).

This calculation is made by arbitrarily averaging the intensities of the first five points

and the last five points and then drawing a straight line through these two averaged points.

Line Profile

Angular Position Intensity

(2 9) (counts/unit time)

29j 1(29^

2 n K2 9 n

)

*The use of trade names in this paper in no way implies endorsement or approval by NBS

and is included only to define the procedure.

4
Set:

a =iE I(2e i>'

i=l

2=4^1(29 .) 5 Z^i n-i

i=0

Then

a(2en

). z ( 2 e

1

) i-drHir) *•. ^26 - 26, / i 26-26, ' n 1 n 1

where b. is the background intensity at 26 ..

Background subtraction is an available option in "UNFOLD".

3. Angular Correction, "ANG"

There are several factors affecting the diffracted intensity which are functions of the

Bragg angles. This angular correction is divided into three parts.

3. 1. Lorentz-polarization Factor (LP)

When a monochromator is used

T _ 1 + cos

2 2<*cos 2 26 LP = » sin 6 cos 6

where <*is the Bragg angle of the crystal in the monochromator and 6 is the Bragg angle

of the specimen.

3. 2. Atomic Scattering Factor (/)

s in ** The atomic scattering factor ( /) is a function of —r— , A being the wavelength of the

sin 6 radiation being used. Tables of this factor for various values of —t— and for various

[6] atomic models are available . The values used are given in table 2 in a normalized

form (from self -consistent wave functions) for iron, nickel, and silver.

sin 9 To determine /at intermediate values of —r— a power series polynomial was fitted

sin6

to the values in table 2. For a better fit —r— was divided into three ranges. The values

for this fit are given in table 3. —i..i.i...«nu.a.m inwmmmtf
sine ~

X

-

0.00

0.05

0.10

0. 15

0.20

0.25

0.30

0.35

0.40

0.50

0.60

0.70

Table 2. - Normalized atomic scattering factors, /

Fe Ni

1.000

0.9768

0.9214

0.8568

0.7925

0.7300

0.6689

0.5557

0.4611

0.3875

0.3332

1. 000

0. 9731

0. 9108

0. 8404

0. 7727

o« 7077

0, 6450

o c 5323

0. 4412

0. 3735

0. 3258

Ag

1.000

0.9817

0.9336

0.8698

0.8017

0.7362

0.6762

0.6234

0.5781

0.5066

0.4547

0.4151

Table 3. - Power series coefficients for the atomic scattering factors

-

, , ,smo . / = a + b (—r-—) + c (- sin 8 2 sin 8 3

Coefficient Fe

a + 1.000

b -0. 184

c -7.080

a + 1.0637002

b -1.6056701

c +0.86001593

d -0.53335684

a +1. 1987014

b -2.3833411

c +2. 0200144

d -0.56667538

Ni

+ 1.000

-0.142

-6.644

+1.0645004

-1.4746725

+0.68002691

-0.53337307

+ 1. 1781009

-2. 1006716

+ 4.4750092

-0.28333892

Ag

+ 1.000

-0.068

-5.960

+ 1.0685171

-1.2033810

-1.2685714

+ 3.0666667

+ 1.2061000

-2.4973333

+2.8050000

-1.2166667

_ , sin o Range of —r 0^1^0.12

0.12< 5£-°s 0.35

> 0.35
In the case of the iron-nickel alloys it was arbitrarily decided to use the atomic

scattering factor for Fe for all bcc alloys and the atomic scattering factor for Ni for all

fee alloys. This gives a reasonable approximation to the electron density distribution in the alloy.

3.3. Sample Absorption (A)

For a flat specimen in a focusing geometry the sample absorption factor is independent

of 2 9 . However, for a Debye-Scherrer geometry a cylindrical sample is used

[101 and Bradley gives the absorption factor:

A

1 j, tn(sec9 + tan9) | sin 29 1 f 13 2 aj A =

1 1 tn(secO +tan9) fl -^ITJ 1 - sec^tan9 \ + ^TT+~^TT [4 +

4

COS 6

j 2 +

Z sec9tan9 }]'

for p-r > 10, where (J. is the linear absorption coefficient and r is the radius of the cylindrical specimen.

Using trigonometric identities this factor can be restated:

cos 9 I A =—

TT|ir

(\ + sin9\ 2 A + sin9\

1119

\ In, X 1 „, \ 3 4 8 / Sln9 I

Bradley notes that for a diluted specimen (as in this case, we have used a powder mixed with

cement):

Li m

p TT rh

Li where — is the mass absorption coefficient, m is the mass of the powder in a specimen of

height h and radius r„ For a powder with three components (as Fe, Ni, and inactive cement)

l-i r [®L-fLH^

where x is the mass fraction of the Ni. Now:

rp , P = the mass density of the final sample,

rr r h s ' s mass absorption coefficients here for Co K& radiation are

(*)« "•' • (^L— $)>

•ssBssEBEaiastts^^msam
Also: r = 0. 1 cm, p (Fe-Ni alloys) = 3. 65 g/cm3

, p g (Ag) = 3. 92 g/cm3

.

The total angular correction factor used to multiply the intensity is composed of the

preceeding three elements.

1 c =

/

2 (LP)A

This is normalized to unity at 29, .

"UNFOLD" has the option to make this correction taking into account the Lorenzpolarization and atomic scattering factors. This is all that is necessary when using a flat

sample but the Debye-Scherrer geometry requires the inclusion of the absorption factor.

4. Rachinger Separation, "RACH"

[4] The Rachinger method is a graphical means of separating the Kaj-Ka; line

doublet.

1^26.) = I (29 ) - I (26.) where

I = intensity due to a + a (recorded intensity).

I

I =

" " " ay

I

T _ ii II II n z~

az'

The usual assumption is made that the K eu intensity is half that of the K a 1 so that:

I 2 (29

i

) = **1 (29 " d) *

where d is the doublet separation. Now

I

1 (2 6.) =1(29.) -ili (26.-d).

It is important that data be collected sufficiently far out on the low angle side of the profile so that the calculation is started at a diffraction angle sufficiently small that I3

f« 0,

or the measured intensity is due mainly to the Ka^ component. Values of Ix at higher

angles can then be determined by successive calculations.

The doublet separation, d, is determined from an approximate peak position of the Ka

curve and the wavelengths A., X and \ of the Key, Ka and Ka radiations respectively.

8
From the Bragg equation:

So

X = 2d sin 9 and X = 2d sin 9 (d = interplanar spacing),

S

sin 9 = -— sin 9.

Similarly for the Kct component:

2 ^2

sin o = —— sin b, 2 A. and the doublet separation in 29 is d = 2 62

- 2 6j

or d = 2

'\ Sin I -r— sin9 I - Sin I -r— sin9|> .

For cobalt radiation

X = 1.79021 A »

X = 1.78892 A ,

X 2

= 1.79278 A .

In general, the angle (2 9. - d) wjll not coincide with any of the angular values 2 9.

so it is necessary to interpolate. Assume:

29 ^ 29 - d^ 29 . J i k

A straight line is fitted between I (2 9 .) and I (2 9 ) and:

1 i Ik

1.(29 ) - 1.(29 ) [I (29 .)](29 ) - [I (29 )](29.)

" 26, - 29. (2

i " d) +

29, - 29 * k J k j

Although it is not apparent, the Rachinger separation has a tendency to oscillate or

become assymmetrical on the high angle side of the profile. This is especially true for a

sharp, well separated Kccline. For this reason the options for card punching and mathematical smoothing are applied only to the corrected K a profile in this program. This section

is still included, however, for those occasions when it might be useful.
5. Center of Gravity Calculation, "CENTROID"

The centroid or center of gravity is one measure of the position of the diffraction

line. It is of value in measuring lattice parameters , twin fault probabilities , etc.

[13] According to Pike and Wilson the center of gravity is determined by

2(1. - b.) c;(20 .) 1 x x l x - , (l)

E(I. - b.)c.

i

i ii

where

G = center of gravity >

2 9. = angular position »

I. = measured intensity

,

b. = background (calculated in sec. 2) ,

c. = angular correction factor (calculated in sec. 3) .

The summations are over all points.

Equation (1) is modified from the equation given by Pike and Wilson by the presence of the

c.

l From the calculation of the background (sec. 2)

X setting A20 =20 -29

a(29 ) - Z (29 )

/ 29. - 29 v / 29. - 20 >. b

i = Z {—JZQ j

" a

( A20 "

J

Substituting eq (2) into eq (1)

S

or

(2)

T / 29. - 20, \ / 29. - 20 \ "I ;['.-« (-CT +* (-w5 -)

J '?*.>

r /20. - 20, \ / 29. - 29 \T

^.-(-^'(-br^Jci

10
or

(Z0. - ze \ /if. 29 - 21£o v -TOT"1

) ^«29

i> T a

f ( 'm»

"

) V<2 V

29. - 21

(3)

/Z0. - Z0 \ /ZO. - Zd v PiCi" Z f( A29 j

C

i +a H A26

" J-!

An estimate of the standard deviation is given by the standard propagation of error.

(z) .

Now

BG < 29i> Ci a i. (it). ^29. -iO -"2 l 29. - 2( f CV . - &<D \ [/Z29. _- 29it) v /60. 29 - 2(Zd \ T Pig

i< 2fli> - z f (-T29-^) c

i(

2e

j) + a

f Hgzv c

i' (29

i

)J [/Z0r29.. - 29zo 29. - 21

, \ /io. - :o x

-i fVi--f(-m-! )v+ -f«i(-brJ1

)]

On substituting from eq (3)

SG

91.

(29. - G)c.

.29. _ 29 29. - 29

2 I.e.

i i i

/iO . - £0 \ / zo . - i d \ f(-T2B )

C

i +a

f( A29

n

)

C

i

(5)

Also

-29 - 29

SG

9a

/it). zo \

Jl-TJT1

) V'26

i> /ZW. - ZH \ /Z0. 29 - 29Zd \ pic i- z ?(-STB j

c

i +a ?( A29

n

) ci

(Zd. 29 _- 29id v 29. - 2 29. - 21 p /Zd. - Zd v /^°- - ZO \ "I A 29

P

)

c

i [lhCl<

2B

t> ' Z H A

X29 )W+> ?(—5^^—H

)

c

i-< 29

i>J r /20 . - 20 \ /Z0. 29 - 2(0 \ -i If Vi - = (-rnr-1

)

c

i +

* fH^)ci]

11 in ii uii r ni j j i i i iitiMiirrrc
On substituting from eq (3)

/<i0. '29. -_ 2B9 \\ /29. /2B. - 29 \

9 a /29. .28, \ ,20 - 26 v El.c. - z s( *

1 )c + a S(

i n n

) c iii i V A20 / i i^ A20 / i

Or

/20. '20. - 20 \

9a" /2 0. - 2 9 \ /20. - 29 v fVi" 2 ?(^20 j

C

i +a f(^2T-^) C

i

Also:

'20. - 2

(6)

/20. 20 \

5G

dz / 2 . - 2 \ /20.-20\

EI.C. - Z SI —t-x J C. + a El r-rr-3 J c. iii i\A20 / i ^ i28 / i

(20.-20\ p /20.-20y /20.-20\ -i -^-)c,^I.c,(29.)-z ^-^_1 )c..(20

i

) + a^-iI1-^jc

i.(29i )|

^ U h

C

i - Z f V"A79 )

c

i + a fV~AT0 J

CiJ

/2b. 20. - 20 \ dG f(^2l j V(G-20.) i \ a 6o / i i /^\

ST = /29. - 29 \ /29. - 2" /20. - 20 \ /2B. -20 \ PiCi" Z f\ A29 j

C

i +a

f( A29

" j"!

And, since the standard deviation of a random variable is the square root of that variable,

a

2

(I.) = I , (8)

i i

5 also a = — 2^ I (see sec. 2) » i= 1

2, . J9a \

2

2 ;t . , 9 a 1 °

(a) = ?(^r) a (I

i

] Where

TT~

=

5 '

12
5 9)

2, » 1 V t

1 so a (a) = — 2^ I. = T a • 25 i=l l 5

In a similar manner for z,

2, . 1 <Mz) = - z • (10)

The center of gravity is calculated from eq (1) and the estimate of its standard

deviation is determined from eq (4) using eq (5) through eq (10).

6. Peak Calculation, "PEAK"

The position of peak maximum is another measure of the profile's angular location. It also is used to measure lattice parameter and twin fault probabilities, as well as

Cl5] stacking fault probabilities

A portion of the profile on either side of the maximum (we generally used a total of

7 to 9 points) is fitted to a parabola and the maximum of that curve is determined.

I. = B + C • (29.) + D (29. ) 2

.

Differentiating:

dl. ^

r=

C + 2D-(29.) =

,

so that

peak= 29 = - -SL > (H) max 2D

where B, C, and D are the parameters of the fitted curve.

The standard propagation of error with correlation between the variables C and D gives:

- /dd(29Ztf )\2\,i /d(29 / ZW K2Z

,3(29 )\/d(29 K

„ / max W max \ ,„, ,„ % + 2 V"^C A""3D J

CT

< C>*( D>'

13

II1IIIIIHIMHIIM—"""""""J"''1
Differentiating eq (11) this becomes

(^W(^W(^)(J (cHD

),

CT 2 (29 ) max • \2D

-

(29 ) 2

7 (29 ) 2 (29 ) 2 max 2, . max 2 /x_ _ max , _, ,_, a (C) + = a (D) - 2-—-— a(C)a(D).

2 * ' ^2 v

' CD

C D

A modification of a computer program written by W. J. Hall was used here to

compute the curve parameters and their standard deviations. This program performs an

r 1 7 1 8

1

orthonormal curve fitting using Bjork's modification ' of the Gram -Schmidt

technique.

7. Curve Smoothing, "SMOOTH"

In the course of experimenting on several iron-nickel alloys, it was found that the

Fourier analyses of the diffraction profiles were far more repeatable if the data from the

cold-worked sample were first smoothed. This subroutine affords the option of performing this operation.

The intensity curve is mathematically smoothed by a least-squares fit of a quartic

equation to seven points, taking the value at the midpoint and then advancing the group of

points by one unit and repeating the process.

I.(smoothed) = (I. „ - 181. _ + 631. , + 1641. + 631. , - 181. _ + I. J/256 . i i-3 i-2 l-l i l+l i+2 i+3

Three points are added before the initial intensity and three after the final intensity and

they are all set equal to zero.

This smoothing operation can be performed repeatedly (limited to 99 times by

format). It is possible to have up to ten of these smoothed curves printed and to have one

of them card punched for input to "UNFOLD".

14
8. Data Input and Output and a Sample

Card Input

Card

I

Information

Identification

Format

50H

a.

b.

c.

d.

Number of points (intensity with angular position) in profile.

Initial 2 9, i. e. , 2^

2 8 increment, 6 29

2 6 position of peak (must

equal 2 9 X + k X 6 2 8, k an integer).

Angular correction added to each

29*.

f. Ni fraction in an Fe-Ni alloy.

g. 1 for bcc phase, 2 for fee phase in an Fe-Ni sample (e, f, and g are necessary

only when they are applicable).

Punch options for input to "UNFOLD"

a. for no card punch, 1 for punch of corrected

Ko? profile, 2 for punch of corrected Key profile

after smoothing.

b. Number of smoothings to be printed (max= 10)

c. Smoothing number to be punched (0 for no

punch).

(b and c are necessary only if 3a = 2)

Smoothing numbers to be printed. (This card is omitted if 3a 7^ 2. The number in 3c must be one of these numbers).

Lower and upper angular limits for parabolic

fit to determine profile maximum.

Intensities

110, 5F 10. 2, 110

315

1015

2F10. 2

10F7.

Output data includes:

1. Identification

2. Table containing angular positions, recorded intensities, backgrounds,

angular corrections, and the corrected K cc and Kccx profiles.

Using the Debye-Scherrer technique, it is possible to calibrate the diffractometer by

r 6 8

examining the reflection on both positive and negative sides of the diffraction cone

This gives a correction factor to the angle read from the instrument.

15

HMffflflHUilMMBIil
3. Line maximum and center of gravity with their standard deviations for KCX and

Kax profiles.

4. Peak value used for punching "UNFOLD" input and smoothing number used

(if applicable).

5. Table containing angular positions and smoothed Kcc profile (if applicable).

A sample of input and output follows.

16
Punched Card Input

FE-28NI COLD-WORKED (111)

. Ill 50.60 0.02 i J1.92 .28 2 2 4 4

2 4 6 8 51 .72 52.02

270. 260. 260. 270. 260. 290. 240. 290. 310. 310.

290. 290. 310. 300. 270. 260. 320. 280. 330. 330.

300. 330. 360. 340. 370. 330. 350. 360. 340. 350.

390. 400. 400. 370. 420. 450. 490. 470. 510. 510.

530. 600. 620. 710. 740. 740. 830. 910. 950. 940.

loio. 1170. 1260. 1330. 1410. 1550. 1620. 1720. 1840. 1940.

2050. 2130. 2220. 2270. 2350. 2380. 2390. 2390. 2360. 2320.

2280. 2190. 2040. 1940. 1840. 1600. 1330. 1160. 1050. 950.

860. 810. 760. 720. 670. 610. 560. 510. 490. 470.

440. 420. 400. 390. 380. 370. 360. 350. 340. 330.

320. 310. 300. 290. 280. 270. 270. 270. 270. 270.

270.

Printed Output

FE-28NI COLD-WORKED (111)

2 THETA REC CNT BACK ANG COR ALPHA ALPHA 1 50.60 270 264 1.0000 6

50.62 260 264 1.0004 -4

50.64 260 264 1.0009 -4

50.66 270 264 1.0013 6

50.68 260 264 1.0017 -4

50.70 290 264 1.0022 26

50.72 240 264 1.0026 -24

50.74 290 264 1.0030 26

50.76 310 264 1.0035 46 46

50.78 310 264 1.0039 46 46

50.80 290 265 1.0044 26 26

50.82 290 265 1.0048 26 26

50.84 310 265 1.0052 46 46

50.86 300 265 1.0057 35 35

50.88 270 265 1.0061 5 -17

50.90 260 265 1.0065 -5 -28

50.92 320 265 1.0070 56 43

50.94 280 265 1.0074 15 2 50.96 330 265 1.0078 66 43

50.98 330 265 1.0083 66 48

51.00 300 265 1.0087 35 43

51.02 330 265 1.0092 65 79

51.04 360 265 1.0096 96 75

17

IMMUMMBHMHBUJtifll
51.06 340 265 1.0100 75 74

51,08 370 265 1.0105 106 85

51.10 330 265 1.0109 65 42

51.12 350 265 1.0113 86 64

51.14 360 265 1.0118 96 56

51.16 340 266 1.0122 75 38

51.18 350 266 1.0127 85 48

51.20 390 266 1.0131 126 84

51.22 400 266 1.0135 136 115

51.24 400 266 1.0140 136 104

51.26 370 266 1.0144 106 77

51.28 420 266 1.0148 156 137

51.30 450 266 1.0153 187 163

51.32 490 266 1.0157 228 186

51.34 470 266 1.0162 207 150

51.36 510 266 1.0166 248 196

51.38 510 266 1.0170 248 209

51.40 530 266 1.0175 268 200

51.42 600 266 1.0179 340 259

51.44 620 266 1.0184 360 267

51.46 710 266 1.0188 452 377

51.48 740 266 1.0192 483 385

51.50 740 266 1.0197 483 378

51.52 830 267 1.0201 575 475

51.54 910 267 1.0206 657 528

51.56 950 267 1.0210 698 564

51.58 940 267 1.0214 688 500

51.60 1010 267 1.0219 760 567

51.62 1170 267 1*0223 923 734

51.64 1260 267 1.0228 1016 779

51.66 1330 267 1.0232 1088 824

51.68 1410 267 1.0236 1170 888

51.70 1550 267 1.0241 1314 1063

51.72 1620 267 1.0245 1386 1103

51.74 1720 267 1*0250 1489 1123

51.76 1840 267 1.0254 1613 1224

51.78 1940 267 1.0258 1716 1304

51.80 2050 267 1.0263 1830 1386

51.82 2130 267 1.0267 1912 1382

51.84 2220 267 1.0272 2006 1454

51.86 2270 267 1.0276 2058 1496

51.88 2350 267 1.0280 2141 1530

51.90 2380 268 1.0285 2173 1521

51.92 2390 268 1.0289 2184 1491

51.94 2390 268 1.0294 2185 1494

51.96 2360 268 1.0298 2155 1428

51.98 2320 268 1.0303 2114 1366

52.00 2280 268 1.0307 2074 1309

52.02 2190 268 1.0311 1982 1221

52.04 2040 268 1.0316 1828 1082

52.06 1940 268 1.0320 1726 979

52.08 1840 268 1.0325 1623 908

52.10 1600 268 1.0329 1376 692

52.12 1330 268 1.0334 1097 442

52.14 1160 268 1.0338 922 311

52.16 1050 268 1.0342 809 266

52.18 950 268 1.0347 705 215

52.20 860 268 1.0351 612 158

52.22 810 268 1.0356 561 213

52.24 760 268 1.0360 509 286

52.26 720 269 1.0365 468 312

52.28 670 269 1.0369 416 283

52.30 610 269 1.0374 354 246

52.32 560 269 1.0378 302 223

18
52.34

52.36

52.38

52.40

52.42

52.44

52.46

52.48

52.50

52.52

52.54

52.56

52.58

52.60

52.62

52.64

52.66

52.68

52.70

52.72

52.74

52.76

52.78

52.80

510

490

470

440

420

400

390

380

370

360

350

340

330

320

310

300

290

280

270

270

270

270

270

270

269 1.0382

269 1.0387

269 1.0391

269 1.0396

269 1.0400

269 1.0405

269 1.0409

269 1.0414

269 1.0418

269 1.0422

269 1.0427

269 1.0431

269 1.0436

269 1.0440

270 1.0445

270 1.0449

270 1.0454

270 1.0458

270 1.0463

270 1.0467

270 1.0471

270 1.0476

270 1.0480

270 1.0485

250

230

209

178

157

136

126

115

105

95

84

74

63

53

42

32

21

11

144

87

53

36

34

25

53

71

78

76

67

61

37

17

3 -6

-12

-20

-18

-9

-2

36

10

ALPHA CURVE

PEAK MAX = 51.9298

STD DEV = 0.1335

PEAK FIGURED FROM 51.72 TO 52.02

LINE CG = 51.8653 STD DEV = 0.0045

ALPHA 1 CURVE

PEAK MAX = 51.8958

STD DEV = 0.2744

PEAK FIGURED FROM 51.68 TO 51.98

LINE CG = 51.8257 STD DEV = 0.0065

PUNCH PEAK FOR ALPHA = SMOOTHING 4

51.92

ANGLE INPUT SMOOTH 2 SMOOTH 4 SMOOTH 6 SMOOTH 8 50.60 6 2 -0 -0

50.62 -4 -1 -1 -1 -1

50.64 -4 -3 -2 -1 -1

50.66 6 1 2 2 2 50.68 -4 7 5 4 3 50.70 26 4 2 2 2 50.72 -24 -1 3 5 7 50.74 26 17 19 20 20

50.76 46 43 39 36 35

50.78 46 43 41 40 39

50.80 26 29 33 35 36

50.82 26 30 32 34 35

50.84 46 40 37 34 33

50.86 35 31 28 26 25

19
50.88 5 8 12 14 16

50.90 -5 10 12 13 14

50.92 56 29 26 25 25

50.94 15 40 42 41 41

50.96 66 54 53 52 51

50.98 66 57 55 54 54

51.00 35 50 54 56 57

51.02 65 64 65 66 67

51.04 96 85 82 81 80

51.06 , 75 91 91 89 88

51.08 106 88 87 88 88

51.10 65 80 82 84 84

51.12 86 83 83 83 82

51.14 96 87 84 82 82

51.16 75 81 83 84 85

51.18 85 91 94 97 98

51.20 126 120 118 117 116

51.22 136 137 132 129 127

51.24 136 128 128 128 128

51.26 106 122 126 130 132

51.28 156 149 150 152 153

51.30 187 191 187 185 184

51.32 228 215 213 212 210

51.34 207 224 225 226 225

51.36 248 236 235 235 236

51.38 248 251 251 251 251

51.40 268 278 279 280 281

51.42 340 323 324 325 326

51.44 360 380 381 381 380

51.46 452 439 435 432 429

51.48 483 474 471 471 471

51.50 483 502 510 514 517

51.52 575 571 574 576 576

51.54 657 652 643 637 633

51.56 698 685 680 677 675

51.58 688 700 708 714 718

51.60 760 775 782 787 790 5 1 . 62 923 905 899 895 893

51.64 1016 1014 1008 1004 1001

51.66 1088 1090 1095 1097 1097

51.68 1170 1184 1187 1189 1190

51.70 1314 1295 1291 1290 1289

51.72 1386 1394 1394 1393 1392

51.74 1489 1493 1496 1497 1498

51.76 1613 1607 1607 1607 1608

51.78 1716 1721 1720 1719 1719

51.80 1830 1825 1825 1824 1824

51.82 1912 1918 1917 1917 1917

51.84 2006 1998 1998 1999 1999

51.86 2058 2069 2071 2071 2072

51.88 2141 2133 2132 2131 2131

51.90 2173 2173 2172 2171 2171

51.92 2184 2187 2187 2187 2187

51.94 2185 2181 2180 2181 2181

51.96 2155 2156 2157 2159 2160

51.98 2114 2120 2123 2123 2122

52.00 2074 2069 2064 2061 2059

52.02 1982 1971 1969 1968 1969

52.04 1828 1844 1852 1858 1861

52.06 1726 1734 1736 1736 1736

52.08 1623 1599 1587 1579 1574

52.10 1376 1373 1369 1365 1363

52.12 1097 1114 1124 1130 1134

52.14 922 924 929

20

933 938
52.16 809 803 799 797 797

52.18 705 703 701 699 698

52.20 612 618 620 621 621

52.22 561 557 558 559 560

52.24 509 511 511 510 510

52.26 468 466 465 465 464

52.28 416 415 414 413 412

52.30 354 356 356 356 356

52.32 302 300 300 301 302

52.34 250 255 257 258 259

52.36 230 228 228 228 228

52.38 209 206 205 204 203

52.40 178 180 180 180 180

52.42 157 156 156 157 157

52.44 136 138 138 138 139

52.46 126 125 125 125 125

52.48 115 115 115 115 115

52.50 105 105 105 105 105

52.52 95 95 95 95 95

52.54 84 84 84 84 84

52.56 74 74 74 74 74

52.58 63 63 63 63 63

52.60 53 53 53 53 53

52.62 42 42 42 42 42

52.64 32 32 32 32 32

52.66 21 21 21 21 21

52.68 11 10 10 10 10

52.70 2 2 3 3 52.72 -0 -0 -0 -0

52.74 -0 -0 -1 -1

52.76 -0 -0

52.78

52.80

Punched Card Output For "UNFOLD*

2187. 2180. 2157. 2123. 2064. 1969. 1852. 1736. 1587. 1369.

1124. 929. 799. 701. 620. 558. 511. 465. 414. 356.

300. 257. 228. 205. 180. 156. 138. 125. 115. 105.

95. 84. 74. 63. 53. 42. 32. 21. 10. 2.

-0. -0. 0. 0. 0.

2187. 2172. 2132. 2071. 1998. 1917. 1825. 1720. 1607. 1496.

1394. 1291. 1187. 1095. 1008. 899. 782. 708. 680. 643.

574. 510. 471. 435. 381. 324. 279. 251. 235. 225.

213. 187. 150. 126. 128. 132. 118. 94. 83. 84.

83. 82. 87. 91. 82. 65. 54. 55. 53. 42.

26. 12. 12. 28. 37. 32. 33. 41. 39. 19.

3. 2. 5. 2. -2. -1. 0.

21

uiiiwwHiiiJiMmiHaBKmrKKBSBi&MmMmM, '
9. Program Listing

The listing which follows includes two versions on the subroutine "ANG", one

for the two phase Fe-Ni alloys and one for Ag. Of course, only one version should

appear in the program deck. The program has been written in FORTRAN.

PROGRAM PREP nn „,.,,«. DIMENSION Y(300), YH300), YC( 300 ) .NS( 10 ) COMMON X(300), B<300)» C(300)» N DOUBLE PRECISION PK,PK1 ,CG»CG1 ,SDPK,SDPK1 ,SDCG»SDC61

111 READ 6 IF (EOF, 60) 999,100

100 READ 2* N»AI»AINC»APK»V,FN»IG

READ 1» IPUN,NP,NUMP

IF (IPUN-2) 121,120,121

120 READ 1,(NS( I) ,I=1»NP)

121 DO 101 J=1,N

101 X(J) = AI + (J-1)*AINC

READ 3» R1*R2

READ 4» (Y(J)»J=1»N)

CALL BACK(Y,A,Z,D)

CALL ANG(IG,V,FN)

CALL RACH(Y,Y1,APK,A1)

CALL CENTR0ID(Y,CG,SDC6,A,Z,D)

CALL CENTR0ID(Y1,CG1,SDCG1,A,Z»D)

CALL PEAK(Y,PK,SDPK,R1,R2)

NN = XFIXF((PK - Al*360./3.1415927)/AINC)

R3 = Rl - NN*AINC

R4 = R2 - NN*AINC

CALL PEAK(Y1,PK1,SDPK1,R3,R4)

DO 103 J=1»N

IF (APK-X(J)»103,102,103

102 NF = J GO TO 104

103 CONTINUE

104 DO 105 J=1»N

YKJ) = (Y1<J)-BU>)*C(J>

105 YC(J) = (Y(J)-B{J))*C(J)

PRINT l^f PRINT 6

PRINT 7 PRINT 8, (X(J)»Y(J),B(J)»C(J),YC(J),Y1(J)»J=1»N)

PRINT 9, PK»SDPK

PRINT 10, R1»R2

PRINT 11, CG»SDCG

PRINT 12, PKlt SDPK1

PRINT 10» R3,R4

PRINT H,CG1,SDCG1

IF (IPUN) 107,107,108

108 IF (IPUN-2) 110,109,109

109 CALL SMOOTH(YC,NUMP*NS,NP*NCEN)

GO TO 107

110 PP = AI + (NF-1)*AINC

PRINT 13* PP

DO 106 K=1»NF

106 C(K) = YC<NF+1-K)

PUNCH 5,(YC(J),J=NF,N)

PUNCH 5, (C(J) »J=1*NF)

107 GO TO 111

, 1 FORMAT (1015)

22
2 FORMAT <I10»5F10. 2,110)

3 FORMAT (2F10.2)

4 FORMAT (10F7.0)

5 FORMAT (10(F6.0,$.$)

)

6 FORMAT (50H

uSEXUliZSSmE',? ' 3X,IREC ««.6X.»B»CK..3X.SAN8 COR», 5 X,

8 FORMAT (F10.2,2F10.0,F10.4,2F10.0)

9 1F9^

T (///$ ALPHA CURVE $/$ PEAK MAX = $ ' F9 ^/$ STD DEV = $,

10 FORMAT (IX, SPEAK FIGURED FROM S,F7.2,2X,$TO$ ,F7.2

)

11 FORMAT (/$ LINE GG = $,F9.4,S STD DEV = $,F9.4) 12

1F9?4

AT (///$ ALPHA

* CURVE $/$ PEAK MAX = $ » F9 «^$ STD DEV = $,

13 FORMAT <///lX,$PUNCH PEAK FOR ALPHA = $,F7.2)

14 FORMAT (//////)

999 END

SUBROUTINE BACK ( Y,A»Z,D)

C

C BACKGROUND CALCULATION

C

COMMON XJ300), B(300), C(300), N DIMENSION Y(300)

A = (Y(l)+Y(2)+Y(3)+Y(4)+Y(5))/5.

Z = (Y(N-4)+Y(N-3)+Y(N-2)+Y(N-l)+Y(N))/5.

D = X(N) - X(l)

DO 200 J=1»N

200 B(J) = (Z-A)*X(J)/D + (A*X(N)-Z*X(1))/D

RETURN

END

SUBROUTINE ANG(IG,V,FN)

C ANGULAR CORRECTION - FOR FE-NI ALLOY SAMPLES AND CO RADIATION

COMMON X(300), B(300), C(300), N PI = 3.1415927

DA = COS(31.2333*PI/180.)**2

DO 313 J=1,N

SL = SIN( (X(J)+V)*PI/360.)/l. 79021 R IF (IG-1) 306,306.301

301 IF (SL-0.12) 302,302,303

302 F = l.-0.142*SL-6.44*SL**2 r ~rr

GO TO 311 <--FCC

303 IF (SL-0.35) 304,304,305

304 F=l. 0645004-1. 4746725*SL+0.68002691*SL**2-0.53337307*SL**3 D-FCC ^0 TO 311

305 F=l. 1781009-2. 1006716*SL+1.4750092*SL**2-0.28333892*SL**3 F-Frr GO TO 311 ^ 306 IF (SL-0.12) 307,307,308

307 F = 1. - 0.184*SL - 7.08*SL**2 r nrr

GO TO 311 <--BCC 308 IF (SL-0.35) 309,309,310

309 F= 1.0637002-1. 605670 l*SL+0. 8600 1593*SL**2-0.53335684*SL**3 D-BCC

GO TO 311

310 F=l. 19870 14-2. 2 83341 1*SL+2.0200144*SL**2-0.56667538*SL**3 E-BCC

311 A = SIN( (X( J)+V)*PI/360.)

23

unmtiMiimmMmimmtimHimiiaaKHKtaEmuMamHmi^KaaKBmwmaji
BB= COS((X(J)+V)*PI/360.) F CC= SIN((X(J)+V)*PI/180.)

D = C0SUXCJ)+V)*PI/180.)

C(J) = (A**2)*BB/(F*F*(1.+DA*D**2)

E = BB*BB*L0GF((1.+A)/BB)/A H

SBS^'a:-*ETM.P.«R«KcJ/T2

l!^"^lM»+ ,-.^5 ..375 .BB.8B.(^..E, l / . 1(PI*RM**3)

313 C(J) = C(J)/ABS

CN = cd)

DO 312 J=1»N

312 C(J) = C(J)/CN

RETURN

END

SUBROUTINE ANG(IG*V*FN)

C ANGULAR CORRECTION - FOR AG SAMPLES AND CO RADIATION

COMMON X(200),B(200),C(200).N

PI = 3.1415927 A DA = COS(31.2333*PI/180.)**2

DO 313 J=1»N B SL = SIN((X(J)+V)*PI/360.)/l. 79021.

306 IF (SL-0.12) 307*307.308 c 307 F = 1. - 0.068*SL - 5.96*SL**2

GO TO 311

III ^i :^-in-l!2o;38l^SL-l. 2 6 8 57».SL«2«.066666T.SL«3 D

310 F=l. 2061-2. 4973333*SL+2.805*SL**2-1.2166667*SL**3 E 311 A = SINUX(J)+V)*PI/360.)

BB= COS((X(J)+V)*PI/360.) F CC= SIN((X(J)+V)*PI/180.)

D = COS((X(J)+V)*PI/180.)

C(J) = (A**2)*BB/(F*F*(1«+DA*D**2)> G

E

= BB*BB*LOGF( (l.+A)/BB»/A H

ABS

=

=

1 (l!-E)/(PI*RM)+CC/(2.*PI*RM*RM)+(-.25+.375*BB*BB*(l.+E))/ I 1(PI*RM**3)

313 C(J) = C(J)/ABS

CN = cd)

DO 312 J=1»N

312 C(J) = C(J)/CN

RETURN

END

SUBROUTINE RACH( Y.Y1 »APK *P1

)

CC RACHINGER SEPARATION - FOR CO RADIATION

C COMMON X(300), B(300)» C(300)» N DIMENSION Y(300) »Y1(300)

PI = 1. 78892/1. 79021*SIN(APK*3. 1415927/360.) A P2 = 1. 79278/1. 79021*SIN<APK*3. 1415927/360.) B PI = ATAN(P1/SQRT(1.~P1**2)

)

P2 = ATAN(P2/SQRT(1.-P2**2)

)

D = (P2-Pl)*360./3. 1415927

DO 606 I=2»N

24
IF (X(I)-X(D-D) 606,605,605

605 DO 600 J=1»I

600 Y1IJ) = B(J)

IA = I + 1 GO TO 607

606 CONTINUE

607 IB = N - 1 DO 603 J=IA»N

DO 604 K=1»IB

IF (X(K)-X(J)+D) 601.601»604

601 IF (X(K+1)-X(J)+D) 604,604,602

602 Z = <(Y1<K+1)-B(K+2>)*C<K+1)-<Y1(K)-B<K)>*C(K)>/<X(K+1)-X<K>>

1*(X(J)-D)+((Y1(K)-B(K))*C(K)*X(K+1)-(Y1(K+1)-B(K+1))*C(K+1)*X(K))

1/(X(K+1)-X(K)) * ' GO TO 608

604 CONTINUE

608 Yl(J) = (Y(J)-B(J)|*C(J) - Z/2.

603 YKJ) = Y1(J)/C(J) + B(J)

RETURN

END

SUBROUTINE CENTROIDt Y,CG»SDCG»A,Z,D)

C

C CENTROID CALCULATION

C COMMON X(300), B(300), CO00), N DIMENSION Y(300)

DOUBLE PRECISION S(6),P1

DO 500 J=l,6

500 S(J) = 0.

PI = 0.

DO 501 J=1,N

S(l) = S(1)+Y(J)*X(J)*C(J)

S(2) = S(2)+(X(J)-X(1))/D*C(J)*X(J)

S(3) = S(3)+(X(J)-X(N) )/D*C(J)*X(J)

S(4) = S(4)+Y(J)*C(J)

S(5) = S(5)+(X(J)-X(1))/D*C(J)

501 SC6) = S(6)+(X(J)-X(N))/D*C(J)

CG = (S(1)-Z*S(2)+A*S(3)>/(SC4)-Z*S(5)+A*S<6))

DO 502 J=1,N

502

1 ^u) -^!5!Ia^mg, *' x ' j, "cg, *c,j) *c,j,/<s,4, -z* SI5, «*s ' 6 '> /

i/?

cs4r-zis

+ <5^!i!;ce*sl6n * ,s,3, -cG* s,6,,/,s,4 >- z* s<5 '^'^'

1 ?s^

s

z cs^!;:s

CG

;r

5, " sl2,, * ,CG*s,5, - s,2,,/,s<4, -2*s(5,tA* si6, ' /

SDCG = DSQRT(SDCG)

RETURN

END

SUBROUTINE PEAK ( Z,PK,SDPK,R1 ,R2

)

C PARABOLIC FIT TO PEAK MAX

COMMON X(300), BG(300), COR (300), N DIMENSION A(99,3),B(99),C(3.3),D(3),R(200),Y<3),Z(300),E(3,3),

J- MA * d )

25

mammaim
TYPE DOUBLE A»B>C*D»R»Y*AA»PK»SDPK

DO 406 J=1*N

IF (Rl-X(J)) 403.403*406

403 IR1 = J GO TO 411

406 CONTINUE

411 DO 404 J=IR1*N

IF (R2-X(J)> 407*405*404

405 IR2 = J GO TO 412

407 IR2 = J-l

GO TO 412

404 CONTINUE

412 NP = IR2-IR1+1

DO 401 I=IR1»IR2

A(I-IR1+1»1> = 1*0

A(I-IR1+1»2) = X(I)

A(I-IR1+1»3) = X(I)*X(I)

401 B(I-IR1+D = (Z(I)-BG(I))*COR(I)

D(1)=0.0

Y(1)=0«0

ss=o.

DO 1 I=1*NP

SS=B«I)*B(I)+SS

D(1)=A( I,1)*A(I*1)+D(1)

1 Y(1)=A(I»D*B(I)+Y(1)

Y(1)=Y(1)/D(1)

IR=0

DO 5 K=2*3

DO 3 J=K»3

IR=IR+1

R( IR)=0.0

DO 2 I=1*NP

2 R(IR)=A(I»K-1)*A(I*J)+R(IR»

R(IR)=R(IR)/D(K-1)

DO 3 I=liNP

3 A(I,J)=A(I»J)-A(I.K-1)*R(IR)

D(K)=0.0

Y(K)=0»0

DO 4 I=1»NP

B(I)=B(I)-A(I*K-1)*Y(K-1)

Y(K)=A(I»K)*B(I)+Y(K)

4 D(K)=A< I,K)*A(I,K)+D(K)

5 Y(K)=Y(K)/D<K)

DO 55 1=1*3

AA( D=Y(I)*D( I)**0.5

SS=SS-AA( I)*AA( I)

FN=NP-I

IF(FN) 51*51*52

51 SD = 0.

GO TO 53

52 SD=SQRT(SS/FN)

53 DO 55 J=1»I

55 E(I»J)=SD

IRS=-3

DO 8 K=l*3

IRS=IRS-K+4

IR=IRS

DO 8 JJ=1»K

J=K-JJ+1

C(K*J)=Y( J)

IF(JJ-D 8*8*6

6 DO 7 I=2»JJ

C(K.J)=C(K,J)-C(K.K-I+2)*R(IR)

26
E(K»J)=E(K,J)+ABSF(R(IR)*E(K,K-I+2)

)

7 IR=IR-1

8 IR=IR-3 +K

PK = -C(3»2)/(2.*C<3»3)

)

SDPK = DSQRT((PK*E(3»2)/C(3»2))**2 + ( PK*E( 3,3 ) /C< 3.3 )

) **2

1 2*(PK**2)*E(3,2)*E(3,3)/C(3»2)/C(3.3>>

RETURN

END

SUBROUTINE SMOOTH ( YC»NUMP»NS»NP»NCEN

)

DIMENSION S( 11*500) ,DK500) *D2(500) ,NS<10) ,YC(300)

COMMON X(300), B(300)» C(300), NUM

XI = X(NCEN)

DO 22 N=1»NUM

22 S(l»N+3) = YC(N)

NUM = NUM + 3 DO 20 N=l»3

D2(N) = 0.

20 D2(NUM+N> = 0.

DO 5 N=4»NUM

5 DKN) = S(1»N)

K = DO 12 1=1, NP

J=NS(I)

8 DO 9 N=4»NUM

9 D2(N> = DKN)

6 K = K + 1 DO 7 L=4»NUM

7 Dl(L)=(D2(L-3)-18.*D2(L-2)+63.*D2(L-l)+164.*D2(L)+63.*D2(L+l)

l-18.*D2(L+2)+D2(L+3) )/256.

IF (K-J) 8,10,8

10 M = I + 1 DO 11 N=4»NUM

11 S(M,N) = DKN)

12 CONTINUE

IF (NUMP) 13,15,13

13 NCEN = NCEN + 3 DO 18 N=1»NP

IF (NUMP-NS(N)) 18,17,18

17 NUMP = N + 1 60 TO 19

18 CONTINUE

19 PUNCH 105,(S(NUMP,N) ,N=NCEN,NUM)

M = NCEN - 3 DO 14 N=1»M

K = NCEN - N + 1 14 D2<N) = S(NUMP»K)

PUNCH 105, (D2(N) ,N=1,M)

NUMP = NUMP - 1 PRINT 109, X1,NS(NUMP)

15 PRINT 107, (NS(N) ,N=1,NP)

M = NP + 1 DO 16 N=4»NUM

16 PRINT 108, X(N-3) »(S(J,N) »J=1»M)

105 FORMAT ( 10 ( F6.0 ,$.$ )

)

107 FORMAT ( ////1X,$ANGLE$,5X »$INPUT$,3X, 10( $SMOOTH $, 12, IX )

)

108 FORMAT ( 1X,F7.2 , 11F10.0

)

109 FORMAT (//1X,$PUNCH PEAK FOR ALPHA = $ ,F7.2/1X ,$SMOOTHING$, 13

)

END

27
10. Appendix: Corrections Necessary When Using Other Radiations, Samples and

Geometries.

Specific program steps are referred to by the letter identification which appears

in the identification columns.

A. Other radiations

In "ANG":

The value of the diffraction angle in the monochromator must be

inserted into the calculation of DA (step A). In this case, for

Co Kci radiation and a quartz crystal, 2a = 31.2333°. It is also

necessary to use the KCX wavelength to determine SL (step B); here

X = 1.79021A.

In "RACH":

The values of the Koc, Kct , and Ka wavelengths (i.e.,

X, X , and X ) are necessary to evaluate PI and P2 (steps A

and B) as follows:

X PI = -t— sin

*2

P2 = -r—, sin

A.

APK (36o)_

APK (^)j

B. Other samples

In "ANG":

The parameters of the power series fit to the atomic scattering

factors must be used in steps C, D, and E. RM in step H is the

factor (J r in section 3 and must be evaluated as noted there.

C. Other geometries

In "ANG":

When no monochromator is used, DA (step A) should be set

equal to one. For a flat sample, eliminate CC, E, and RM

(steps F, G, and H respectively) and set ABS (step I) equal to

28
References

[I] C. P. Gazzara, J. J. Stiglich, Jr., F. P. Meyer, and A. M. Hansen, "A

General Computer Program for Particle Size and Strain Analysis", in

Advances in X-ray Analysis, Vol. 12, C. S. Barrett, J. B. Newkirk, and

G. R. Mallett, Editors (Plenum Press, New York, 1969), p. 257.

L2j R. J. De Angelis, "Evaluation from X-ray Diffraction Profiles of Fourier

Coefficients and the Microstrain Distribution Function", in Local Atomic

Arrangements by X-ray Diffraction, J. B. Cohen and J. E. Hillard eds.

(Gordon and Breach Science Publishers, New York, 1966).

[3] W. Wallace, Automatic Separation of Strain and Particle Size Effects in

Experimentally Observed X-ray Line Shapes, ASTIA Rept. # AD 686 311

(1968).

[4] W. A. Rachinger, "A Correction for the a, a_ Doublet in the Measurement

of Widths of X-ray Diffraction Lines", J. Sci. Instr. 25, 254, (1948).

[5] B. D. Cullity, Elements of X-ray Diffraction (Addison-Wesley Publishing

Co. , Inc. , Reading, Massachusetts, 1956), p. 172.

[6] International Tables for X-ray Crystallography, Vol. Ill (Kynoch Press,

Birmingham, England, 1962) pp 202f.

[7] Cullity, Op. Cit. , p. 188.

[8] H. M. Otte, "Lattice Parameter Determinations with an X-ray Spectrogoniometer by the Debye-Scherrer Method and the Effect of Specimen Condition",

J. Appl. Phys. 32, 1536(1961).

[9] H. M. Otte and A. L. Esquivel, "Measurement of Applied Stress by X-ray

Diffraction", Mater. Sci. Res. 2, 121 (1965).

[lO] A. J. Bradley, "The Absorption Factor for the Powder and Rotating -Crystal

Methods of X-ray Crystal Analysis", Proc. Phys. Soc. 47, 879 (1935).

[II] Cullity, Op. Cit. , p. 466.

[12] Ibid . , p 464.

29
[l3] E. R. Pike and A. J. C. Wilson, "Counter Diffractometer - The Theory of

the Use of Centroids of Diffraction Profiles for High Accuracy in the Measurement of Diffraction Angles", Brit. J. Appl. Phys. 10_, 57(1959).

[l4] J. B. Cohen and C. N. J. Wagner, "Determination of Twin Fault Probabilities

from the Diffraction Patterns of fee Metals and Alloys", J. Appl. Phys. 33,

2073 (1962).

[15] B. E. Warren and E. P. Warekois, "Stacking Faults in Cold Worked Alpha-Brass'J

Acta Met. 3, 473 (1955).

[l6] Cullity, Op. Cit. , p. 448.

[l7] A. Bjork, "Solving Linear Least Squares Problems by Gram -Schmidt

Orthogonalization", BIT (Nordisk tidskrift for informations -behandling)

7, 1 (1967).

[l8] A. Bjork, "Iterative Refinement of Linear Least Squares Solutions I", BIT 7,

257 (1967).

L19J F. M. Clikeman, A. J. Bureau, and M. G. Stewart, "Photoproton Reaction in

Be9 ", Phys. Rev. 126, 1822 (1962).

30
NBS TECHNICAL PUBLICATIONS

PERIODICALS NONPERIODICALS

JOURNAL OF RESEARCH reports National

Bureau of Standards research and development in physics, mathematics, chemistry, and engineering.

Comprehensive scientific papers give complete details of the work, including laboratory data, experimental

procedures, and theoretical and mathematical analyses. Illustrated with photographs, drawings, and

charts. Published in three sections, available separately: • Physics and Chemistry

Papers of interest primarily to scientists working in these fields. This section covers a broad range of physical and chemical research, with major emphasis on standards of physical measurement, fundamental

constants, and properties of matter. Issued six times a year. Annual subscription: Domestic, $9.50; for- eign, $11.75*. • Mathematical Sciences

Studies and compilations designed mainly for the mathematician and theoretical physicist. Topics in mathematical statistics, theory of experiment design,

numerical analysis, theoretical physics and chemistry, logical design and programming of computers

and • computer systems. Short numerical tables. Issued quarterly. Annual subscription: Domestic,

$5.00; foreign, $6.25*. • Engineering and Instrumentation

Reporting results of interest chiefly to the engineer

and the applied scientist. This section includes many

of the new developments in instrumentation resulting

from the Bureau's work in physical measurement,

data processing, and development of test methods.

It will also cover some of the work in acoustics,

applied mechanics, building research, and cryogenic

engineering. Issued quarterly. Annual subscription:

Domestic, $5.00; foreign, $6.25*.

TECHNICAL NEWS BULLETIN

The best single source of information concerning the Bureau's research, developmental, cooperative and

publication activities, this monthly publication is designed for the industry-oriented individual whose

daily work involves intimate contact with science and

technology

for engineers, chemists, physicists, re- search managers, product-development managers, and

company executives. Annual subscription: Domestic,

$3.00; foreign, $4.00*.

• Difference in price is due to extra coat of foreign mailing.

Applied Mathematics Series. Mathematical tables, manuals, and studies. Building Science Series. Research results, test methods, and performance criteria of building materials, components, systems, and structures. Handbooks. Recommended codes of engineering

and industrial practice (including safety codes) de- veloped in cooperation with interested industries,

professional organizations, and regulatory bodies. Special Publications. Proceedings of NBS conferences, bibliographies, annual reports, wall charts,

pamphlets, etc. Monographs. Major contributions to the technical

literature on various subjects related to the Bureau's

scientific and technical activities. National Standard Reference Data Series.

NSRDS provides quantitive data on the physical

and chemical properties of materials, compiled from

the world's literature and critically evaluated. Product Standards. Provide requirements for sizes, types, quality and methods for testing various industrial products. These standards are developed cooperatively with interested Government and industry groups

and provide the basis for common understanding of product characteristics for both buyers and sellers. Their use is voluntary.

Technical Notes. This series consists of communications and reports (covering both other agency and

NBS-sponsored work) of limited or transitory interest. Federal Information Processing Standards Publications. This series is the official publication within

the Federal Government for information on standards

adopted and promulgated under the Public Law

89-306, and Bureau of the Budget Circular A-86

entitled, Standardization of Data Elements and Codes

in Data Systems.

Order NBS publications from: Superintendent of Documents

Government Printing Office

Washington, D.C. 20402
U.S. DEPARTMENT OF COMMERCE

WASHINGTON, D.C. 20230

OFFICIAL BUSINESS

PENALTY FOR PRIVATE USE, $300

POSTAGE AND FEES PAID

U.S. DEPARTMENT OF COMMERCE

12 98