3.1A is an example of the analysis of Cr-FE-NI ternary alloys where the
measured W target X-ray tube spectral data at 45 kV [11] were used. A data-
file named SDXT75.W45 was created before running the program CALCO. The pro-
gram CALCO printed out calculated alpha coefficients, and could be saved, if
desired, in a datafile if the answer to step 6 (figure 3) is 'Y'. An example
of how to input the calculated alpha coefficients is given in 3.1B where only
one multielement standard was employed.

3.2A is an example of the analysis of high temperature alloys using a CR
target X-ray tube spectral data at 45 kV calculated from the NBS algoritam.
The calculated alpha coefficients were saved in the datafile called
ALLOY2.C45. In 3.2B, unknowns were analyzed where Cr, Mn, Fe, Ni, Cu, and
Mo, were treated as the analytes, and C, Al, Si, V, Co, Nb are unanalyzed
elements whose concentrations were previously known and entered as fixed con-
centrations.

(3) Examples of the analysis of cement treated as an oxide system are
shown in 3.3A and 3.3.B, where among 12 constituents AL203, SI02, K20, CAO,
TIO2, MN203, and FE203 were the analytes, and the rest were entered as known
constituents. In example 3.3B, two different calibration curves were used to
obtain the concentrations of the unknown samples. ~

(4) Example 3.4A and 3.4B, illustrate the analysis of rock samples as
fused disc specimens. In this system, the alpha coefficients are computed at
an average composition level for the analyte in the range of interest. Also,

a choice of three flux conditions can be selected by the user.

60


UPDATE 5/20/85

100

110

115

118

120

130

140
150

TE (MM) =IE(3)
IE (3) =NAM
CONTINUE

IF(ICAS.EQ.2)GOTO 110
IF(K1.EQ.1)A1(II,M)=G(3)

IF(K1.EQ.2)A1(II,M)=(G(1) *C(2,2)-G(2) *C(1,2))/(C(2,2)-

c(1,2))
IF(K1.EQ.1)A2(II,M)=G(1)-G(3)

IF(K1.EQ.2)A2(II,M)=(G(2)-G(1))/(C(2,2)-C(1,2))
IF(K1.EQ.1)A3(II,M)=(G(1)-G(2))/(G(2)-G(3))-1.0

IF(K1.EQ.2)A3(II,M)=0.0
ALFA(M) =G (4)

CONTINUE
IF(ICAS.EQ.2)GOTO 120
IF(N.EQ.2)GOTO 120

DO 118 I=3,N

I1=sI-1

DO 115 J=1,4
Z=CL(I1,J)
CL(I1,J)=CL(I,J)
CL(I,J)=Z

CONTINUE

NAM=IE(I1)
IE(I1)=IE(I)
IE(I)=NAM

CONTINUE

ICAS=ICAS+1

—___—_GOTO_30__ —

IF(II.EQ.1)GOTO 150
DO 140 J=2,II
JJ=J-1

Z=A1(II,JJ)
Al(II,JJ)=A1(II,J)
Al(II,J)=Z

Z=A2 (II,JJ)
A2(II,JJ)=A2(II,J)
A2(II,J)=Z
Z=A3(II,JJ)
A3(II,JJ)=A3(II,J)

A3(II,J)=Z
DO 130 I=2,II
I1l=I-1

Z=AIJK(II,I1,J)
ALJK(II,I1,J)=AIJK(II,I,J)
AIJK(II,I,J)=Z

CONTINUE

DO 140 I=2,N
Z=AIJK(II,I,JJ)
AIJK(II,1I,JJ)=AIJK(II,I,J)
AIJK(II,1I,J)=Z

CONTINUE

CONTINUE

IF(KK2.EQ.'N ')GOTO 170

WRITE (6,1080) (Al (II,J) ,J=1,N)
WRITE (6,1090) (A2(II,J) ,J=1,N)

22


CA=CAM (I)
CB=1.0-CA

DO 10 J=1,4
2=CL(1,J)
CL(1,J)=CL(I,J)
CL(I,J)=Z
CONTINUE

NAM=IE (1)
IE(1)=IE (I)
IE(I)=NAM

DO 20 J=1,N
IF(K15.EQ.2) GO TO 15

K15 EQUALS 1
UCO(J)=MU('O ',CL(J,1))
UCF (J) =WLI*MU('LI' ,CL(J,1) )+WB*

1 MU('B ',CL(J,1))+WO*UCO(J)+WF*MU('F ',CL(J,1))

GO TO 18

K15 EQUALS 2

15 UCO(J)=MAC('O ',CL(J,1))
UCF(J)=WLI*MAC('LI' ,CL(J,1) )+WB*

1 MAC('B ',CL(J,1))+WO*UCO(J)+WF*MAC('F ",CL(J,1))

18 CONTINUE
SWDB1(J)=0.0
DO 20 K=1,N
IF(K15.£Q.1)UC(J,K)=MU(IE(J) ,CL(K,1))
IF(K15.EQ.2) UC(J,K)=MAC(IE(J) ,CL(K,1))
CONTINUE
SW1=0.0
SWLOI1=0.0
KK5=1
IF (IDTUBE.EQ.'CR' .AND. IE(1) .EQ.'CR') KK5=2
IF(IDTUBE.EQ.'CR' .AND. IE (1) .EQ."MN') KKS=2
DO 40 K=1,ND
IF(XINT(1,K) .GT.CL(1,2))GOTO 50
CALL BDCOEF (SW, SWDB,SWLOI,1,XINT(1,K) ,XINT(2,K) ,Kl1,KK5,K15,K12)
SW1=SW1+SW
SWLOI1=SWLOI1+SWLOI
DO 30 J=2,N
SWDB1(J)=SWDB1(J)+SWDB(J)

30
40

50

CONTINUE
CONTINUE

DO 70 K=1,11

IF(XINT1(1,K) .EQ.0.0)GOTO 70
IF(XINT1(1,K).GT.CL(1,2))GOTO 70

CALL BDCOEF(SW,SWDB,SWLOI,1,XINT1(1,K) ,XINT1(2,K) 7K1,KKS,

60

+ K15,K12)

SW1=SW1+SW
SWLOI1=SWLOI1+SWLOI
DO 60 J=2,N

SWDB1(J)=SWDB1(J)+SWDB (J)

CONTINUE
CONTINUE

A2(I,1)=0.0

DO 80 J=2,N
RA=CA*SWDB1(J)/SW1
A2(I,J)=(CA/RA-1.0) /CB
CONTINUE

Al(I,1)=(SW1*(1.0-F*CLOI) /SWLOI1-1.0)/CLOI

Al(I,2)#0.0

25


| NBS Technical Publications

Periodical
Journal of Research—The Journal of Research of the National Bureau of Standards reports NBS research

and development in those disciplines of the physical and engineering sciences in which the Bureau is active.
These include physics, chemistry, engineering, mathematics, and computer sciences. Papers cover a broad
range of subjects, with major emphasis on measurement methodology and the basic technology underlying
standardization. Also included from time to time are survey articles on topics closely related to the Bureau’s
technical and scientific programs. As a special service to subscribers each issue contains complete citations to
all recent Bureau publications in both NBS and non-NBS media. Issued six times a year.

Nonperiodicals

Monographs—Major contributions to the technical literature on various subjects related to the Bureau’s scien-
tific and technical activities.

Handbooks—Recommended codes of engineering and industrial practice (including safety codes) developed in
cooperation with interested industries, professional organizations, and regulatory bodies.

Special Publications—Include proceedings of conferences sponsored by NBS, NBS annual reports, and other
special publications appropriate to this grouping such as wall charts, pocket cards, and bibliographies.
‘Applied Mathematics Series—Mathematical tables, manuals, and studies of special interest to physicists,
engineers, ists, biologists, mathematicians, computer programmers, and others engaged in scientific and
technical work. ‘

National Standard Reference Data Series—Provides quantitative data on the physical and chemical properties
of materials, compiled from the world’s literature and critically evaluated. Developed under a worldwide pro-
gram coordinated by NBS under the authority of the National Standard Data Act (Public Law 90-396).
NOTE: The Journal of Physical and Chemical Reference Data (JPCRD) is published quarterly for NBS. by
the American Chemical Society (ACS).and the American Institute of Physics (AIP). Subscriptions, reprints,
and supplements are available from ACS, 1155 Sixteenth St., NW, Washington, DC 20056.

Building Science Series—Disseminates technical information developed at the Bureau on building materials,
components, systems, and whole structures. The series presents research results, test methods, and perfor-
mance criteria related to the structural and environmental functions and the durability and safety .
characteristics of building elements and systems.

Technical Notes—Studies or reports which are complete in themselves but restrictive in their treatment of a
subject. Analogous to monographs but not so comprehensive in scope or definitive in treatment of the subject
area. Often serve as a vehicle for final reports of work performed at NBS under the sponsorship of other
government agencies.

Voluntary Product Standards—Developed under procedures published by the Department of Commerce in
Part 10, Title 15, of the Code of Federal Regulations. The standards establish nationally recognized re-
quirements for products, and provide all concerned interests with a basis for common understanding of the
characteristics of the products. NBS administers this program as a supplement to the activities of the private
sector standardizing organizations.

Consumer Information Series—Practical information, based on NBS research and experience, covering areas
of interest to the consumer. Easily understandable language and illustrations provide useful background
knowledge for shopping in today’s technological marketplace.

Order the above NBS publications from: Superintendent of Documents, Government Printing Office,
Washington, DC 20402.

Order the following NBS publications—FIPS and NBSIR ’s—from the National Technical Information Ser-
vice, Springfield, VA 22161.

Federal Information Processing Standards Publications (FIPS PUB)—Publications in this series collectively
constitute the Federal Information Processing Standards Register. The Register serves as the official source of
information in the Federal Government regarding standards issued by NBS pursuant to the Federal Property
and Administrative Services Act of 1949 as amended, Public Law 89-306 (79 Stat. 1127), and'as implemented
by Executive Order 11717 (38 FR 12315, dated May 11, 1973) and Part 6 of Title 15 CFR (Code of Federal
Regulations).

NBS Interagency Reports (NBSIR)—A special series of interim or final reports on work performed by NBS
for outside sponsors (both government and non-government). In general, initial distribution is handled by the
sponsor; public distribution is by the National Technical Information Service, Springfield, VA 22161, in paper
copy or microfiche form. .

wae


UPDATE 5/20/85

COMMON/FILTER/KFILT (12)

C:FILTER

10

15
20

90
95
100

105
110
120
130
140
145

150

160
170

180

CALL DATE (IDATE)

CALL TIME (ITIME

WRITE (6,90) IDATE, ITIME

WRITE(6,100)

READ(5,*) Kl

WRITE (6,105)

READ(5,*)N

IF(K1.EQ.1)WRITE (6,110)

IF(K1.EQ.1) READ(5,120) (IELE(I) ,I=1,N)
IF(K1.NE.1) WRITE (6,130)
IF(K1.NE.1)READ(5,140) (IELE(I) ,NE(I) ,NO(I) ,I=1,N)
WRITE(6,145)

READ(5,*) K15

WRITE (6,150)

READ(5, 160) KK1

IF(KK1.EQ.'N ')GOTO 10

WRITE (6,170)

READ (6,180) NAMFIL

CALL ALPHA

IF(KK1.EQ.'N ')GOTO 20

CALL ASSIGN (3,NAMFIL,10)

IF(K1.EQ.3)A1(1,3)=0.0

IF(K1.EQ. 3) WRITE (3,*,ERR=15)A1(1,3) ,(Al(I,2) ,I=1,N),(Al(I,1),
(A2(I,J) ,J=1,N) ,I=1,N)
IF(K1.EQ.1)WRITE(3,*,ERR=15) ((Al(I,J) ,J=1,N) ,(A2(I,J) ,J=1,N) ,
(A3 (I,J) ,J=1,N) , ((AIJK(I,d,K) ,K=1,N) ,J=1,N) ,I=1,N)
-IF(K1.£Q.2)WRITE(3,*,ERR=15) ((Al(I,J),J=1,N),(A2(1,J)-,J=1,N),——
((AIJK(I,J,K) ,K=1,N) ,J=1,N) ,I=1,N)

CALL CLOSE (3)

CALL DATE (IDATE)

CALL TIME (ITIME)

WRITE (6,95) IDATE, ITIME

STOP

FORMAT (///1X,'DATE: ',5A2,6X,'TIME: ',4A2/)

FORMAT (1H1,//1X,'DATE: ',5A2,6X,'TIME: ',4A2/)
FORMAT (1X,'WHICH SYSTEM DO YOU WISH TO ANALYZE:'/3X,
"1-ELEMENT SYSTEM 2-OXIDE SYSTEM 3-FUSED DISK SYSTEM ? ',$)
FORMAT (1X,'INPUT NUMBER OF ANALYTES: ',$)

FORMAT (1X,'INPUT NAMES OF ANALYTES (XXS): ',$)
FORMAT (12 (A2,1X))

FORMAT (1X,'INPUT NAMES OF ANALYTES (XXNONS): '/
FORMAT (12(A2,I1,1X,I1,1X)

FORMAT (1X,'WHAT MASS ABS. COEF. ALGORITHM DO YOU WANT

+TO USE :'/3X,'1-LEROUX ALGORITHM 2-HEINRICH ALGORITHM ? ',$)

+D

FORMAT (1X,'DO YOU WANT TO CREATE A DATAFILE FOR SAVING CALCULATE

ALPHA COEFFICIENTS (Y/N)? ',$)

FORMAT (Al)

FORMAT (1X,'INPUT DATAFILE NAME OF ALPHA COEFFICIENTS (XXXXXX. XXX)
',$)

FORMAT (5A2)

END


Tou"o- SST°O G6ST"O «ZyT°O) = Z4T"O ONT" = ZST°O = TLZ°O = OEZ*O- +000°0 = EU0"0- 39 OW Zh
@st°O = 9ST°O) OYTO ODT"O BST"O) = TST*U = UL2°0— STZ°0- 000°0 §=—yOu'U- = aN CT
btO"O- =ELT°O «OST*O §«=LZT°O GOT"O = ZET*O- =G6SZ°O- You'u § 920°O 9 6%
St0°0- €LT°O [ST°O ZET*O U60°O- BZZ°0- 000°0 820°0 IN 8%
vIued- SLT°O 9ST°O §=LbU°0- ~S6T°O- 000°0 620°0 0 lz
€TO°O- SLT*O 600°U- SyT°U- 000°0 620°0 aa 9%
Oto°o- 920°0 9¢T°O- O00"0 620°0 NW SZ
€€T°O- ZIT*c~ 000°O 420°0 WwW ve
gvo°o §=©a0u"o = €£0°0 Ak
000°0 = z00°0- —s «IS OT
000°0 Wet
000°0 09 WIV

@bT°T- Eyul- wZS*U- Zy¥°O- ZGETO- HIE°O- S2Z°O- 22T°U- LET°O- GUE*H U00°O £02°0- ww
0u0°0) = T00°O)— HT°U- «= SPT°O- =ByT°O- «=LbT"O- =9bT°O- ZbT°O- 99Z°0- 18Z°0- OU0"O Z00°0- w
v8t"b ([Z8°E€ BG0°UT €96°8 EUG"L BI6°9 SOU°D E9T°S OUK*Y G627°O OOU"D § F8T"O Ww
Ow a Lie) IN @ : qa Nw wo A Is N eo)
c47 w (4 8% az b4 4 ve 1x4 ot et 9

(eT) We saLxIw

Sagudad S€‘SS ANLaWO3D
AL O°Sh =D 2LSDeWL

(WALSAS ‘WINdWa 3)

NOILWNOE VIOD NI 3SN YOd SINGIDIGIIOO Wd IV JIS

69


3.2B Calculated Compositions of High Temperature Alloys. (Six Analytes Plus
Known Concentrations of Minor Elements)

SRUN CALCOMP.

DATE: 03-OCT-84 TIME: 08:19:00

WHAT TYPE OF UNKNOWNS DO YOU WISH TO ANALYZE :
1-ELEMENT SYSTEM 2-OXIDE SYSTEM 3-FUSED DISK SYSTEM ? 1
DO YOU WANT TO INPUT KNOWN CONCENTRATIONS OF UNANALYZED ELEMENTS (Y/N)? Y
INPUT NS(NUMBER OF ALL CONSTITUENTS), N(NUMBER OF ANALYTES) AND
M(NUMBER OF SPECIMENS TO BE ANALYZED) : 12,6,4
INPUT NAMES OF CONSTITUENTS (XXXXXXXX) (MAX.=8/LINE) =

c AL SI v CR MN FE co
NI cu NB MO
INPUT NAMES OF ANALYTES (XXXXXXXX) (MAX.=8/LINE) :

CR MN FE NI cu TMO

DO YOU WANT TO INPUT ALPHA COEFFICIENTS BY: 1-DATAFILE 2-KEYBOARD ? 1

INPUT DATAFILE NAME OF ALPHA COEFFICIENTS (XXXXXX.XXX) : ALLOY2.C45

WHAT TYPE OF STANDARDS ARE AVAILABLE: 1-PURE STANDARDS 2-MULTIELEMENT STANDARDS ? 2
INPUT M1(NUMBER OF STANDARDS) : 5

INPUT I.D. OF STANDARDS (<=8 CHARACTERS) :

I= 1 c1isi

I=2 1153

I= 3 1285

I= 4 C1288

Ie 5 C1289

INPUT CONCENTRATIONS (WEIGHT FRACTION) Of STANDARDS :

I=1 1151 +0004, 0.0, .0038, .0004, .2270, .0250, 6536, .0003, .0729, .0042,0.0, 0080
I= 2 1153 -0026,0.0, .0107, .0018, .1669, 0050, «7096, .0013, .0877, .0023,0.0, .0024
I= 3 1285 20006, .0012, .0035,.0015, .0080, .0033, «9633, .0004,.0117,.0037,0.0,.0016
I= 4 C1288 +0006 ,0.0,.0041,.0009, .1955, .0083, .4155,.0010,.2930, .0372, .0022, .0283
I=5 . ©1289 20001 ,0.0,.0016, .0001,.1222, .0035, .8172, .0004, .0413, .0021, .0010, .0082

INPUT NET INTENSITIES FOLLOWED BY A PERIOD FOR THE ANALYTE ELEMENTS IN STANDARDS AND
ENTER 0.0 FOR EACH UNANALYZED ELEMENT:

Ie1 1151 4*0.0,16511.,141.,11810. ,0.0,2892.,211.,0.0,1248.

I= 2 1153 4*0.0,13016.,29.,14027.,0.0, 3485. ,119.,0.0,294.
I= 3 C1285 4*0.0,917.,19.,24913. ,0.0,417. 7163. ,0.0,239.

I= 4 C1288 4*0.0,12598. , 46. ,8736. ,0.0, 14190. ,2211.,0.0,4016.
Ie 5 1289 4*0.0,10265. ,19.,17093. ,0.0,1552. ,102. ,0.0,1220.

INPUT I.D. OF SPECIMENS TO BE ANALYZED :

Iel 1152
I= 2 1154
I= 3 1286
I= 4 C1287

INPUT NET INTENSITIES FOR ANALYTES IN SPECIMENS AND
ENTER CONCENTRATIONS (WEIGHT FRACTION) FOR UNANALYZED ELEMENTS:

Iel c11s2 -0015,0.0, .0080, .0003, 13579. ,54.,13316. , .0022,4367.,60. ,0.0,640.

I= 2 1154 -0009,0.0,.0050, 0038 ,5250. ,207.,0.0,78.

I= 3 1286 +0020, .00: 0012, 1014. ,23.,.0001,504.
I= 4 1287 20036, .0006, .0166, .0009, 16245. ,87. ,9578. , .0031,9088. , 329.» .0007,723.
DO YOU WANT TO CORRECT INTENSITIES FOR DEAD TIME (Y/N) ? N
DO YOU WANT TO PRINT OUT CALCULATED RELATIVE INTENSITIES OF STANDARDS &

CALCULATED PURE INTENSITIES FROM STANDARDS (Y/N) ? Y

CALCULATED RELATIVE INTENSITIES OF STANDARDS :
cR ~ FE NI cw MO
‘STD.NO.9C1151 0.28026 0.02344 0.43075 0.02597 0.00167 0.00908

80


(5) If the NBS algorithm is selected for calculating the X-ray tube
spectral distribution in step 12, one of the following seven X-ray targets
can be chosen: Sc, Cr, Mo, Rh, Ag, W, or Au.

(6) When the Cr target X-ray tube is used where Cr and Mn are among the
analytes, an aluminum filter, 0.081 g/om2 thick is employed and the primary
spectrum is corrected by the absorption of the filter for these two analytes
automatically in the program.

For program CALCOMP (refer to figure 4).

(1) If you answer ‘Yt in step 3, that means known concentrations of
unanalyzed elements could be entered as fixed concentrations, and 'NUMBER OF
ALL CONSTITUENTS' in step 4 means the sum of the number of analytes and
unanalyzed elements. In step 18 when asked for the input of intensities or
concentrations of unknowns, the fixed concentrations (weight fraction) should
be entered for unanalyzed elements while intensities are entered for the
analytes.

(2) In steps 6 or 7, each name occupies eight spaces and the name has no
defined function meaning, so that THEE dE E Edt HEE or
LOT ##HIMGOHHHEFSIOQdHHFEP 205H0# are all correct (see example in appendix
3).

(3) If the alpha coefficients in step 8 are entered via '2-KEYBOARD',
the order to key in alpha coefficients is as follows:

1. The coefficients for the analytes are entered in the same order
as the input names of the analytes in steps 6 or 7.

2. For each analyte, the order of entering coefficients is Os Gos
@2, and ay ke as listed in the tabulation of alpha coefficients
where blank spaces should be replaced by zero.

In appendix 3.1A is an example of the tabulation of alpha coefficients
for the CR-FE-NI system. An example of how these data are keyed in appears
in appendix 3.1B.

(4) Calculated relative intensities of standards in step 22 are computed
using the COLA algorithm:

ao °C,

Ss .
Ry = Ca/E1# Bay * Tragt-c,) > . 3") b Aj ° Cy + OY]

and intensities corresponding to the pure analyte element are computed from
multi-element standards using the equation: 11,100 - IR/RF

(5) In step 24, four choices of calibration curves may be selected by
the user and are:

13


UPDATE 5/20/85

SW1=SW1+SW
SWLOI1=SWLOI1+SWLOI
DO 60 J=2,N
SWDB1(J)=SWDB1(J)+SWDB(J)
60 CONTINUE
70 CONTINUE

A2(I,1)=0.0
DO 80 J=2,N
RA=CA*SWDB1 (J) /SW1
A2(I,J3)=(CA/RA-1.0)/CB
80 CONTINUE.
A1(I,1)=(SW1*(1.0-F*CLOI) /SWLOI1-1.0)/CLOI
Al(1I,2)=0.0

c
IF(I.EQ.1)GOTO 100
DO 90 J=2,1
JJ=I-1
Z=A2(I,JJ)
A2(I,JJ)=A2(I,J)
A2 (I,J) =Z
90 CONTINUE
100 CONTINUE
c
IF (KK2.NE.'Y ')RETURN
DO 110 I=1,N
C:FILTER
ANS=' '
IF(KFILT(I) .EQ.2)ANS='F!
C:FILTER WRITE (6,200) IZ(I) ,IELE(I) ,NE(I) ,NO(I) ,A1(T,1) ,(A2(I,J) pJ=1,N)
——__wRETE(6,200)12-(1)-,ANS, TELE (I)-,NE(I)-,NO(1),A1(I,1),
«  (A2(T,J) -J=1,N)
C:FILTER
110 CONTINUE
IF (K12.EQ.1) WRITE (6,210)GS,GF
IF (K12.EQ.2) WRITE (6,220)GS,GF,GL
IF (K12.£Q. 3) WRITE (6, 230)GS,GF,GL
C:FILTER
WRITE (6,240)
240 FORMAT(1H ,'F DENOTES THE USE OF FILTER’)
C:FILTER
RETURN
190 FORMAT (1X,'WHAT FLUX CONDITIONS DO YOU WISH :'/

3X,'1-SAMPLE + LI2B407' ,/
3X,'2-SAMPLE + LI2B407 + LIF',/
3X,'3-SAMPLE + LI2B407 + LIBO2 ? ',$)
192 FORMAT (1H1,//36X,"MODIFIED ALPHA COEFFICIENTS FOR USE IN COLA EQ
+UATION'//57X,'(FUSED DISK SYSTEM)',////,
+ 55X,' TARGET: ',A2,2X,F5.1,' KV',/
+ 55X,'GEOMETRY: ',12,',',12,' DEGREES',///,
+ 58X,'MATRIX CONSTITUENTS '//18X,12(6X,12))

+++

194 FORMAT (/15X, "LOI", 3X,12(1X,A2,11,1HO,11, 2X) )

196 FORMAT (/1X,'MEAN CONC.',2X,' 25.00 ',12(2PF6.2,2X))
198 FORMAT (/3X, 'ANALYTE')

C:PILTER200 FORMAT (/2X, 12, 2X,A2,I1,1H0,11,13F8. 3)
C:FILTER

200 FORMAT (/1X,12,1X,Al,1X,A2,11,1HO,11,13F8.3)
C:FILTER

210 FORMAT(///1X,'* FUSED DISK :',F6.4,'G SAMPLE +',F6.4,'G LI2B407')
220  FORMAT(///" * FUSED DISK :',F6.4,'G SAMPLE +',F6.4,'G LI2B407 +',
+F6.4,'G LIF')
230 FORMAT(///1X,'* FUSED DISK :',F6.4,'G SAMPLE +',F6.4,'G LI2B407',
+F6.4,'LIBO2')
END

26


he National Bureau of Standards! was established by an act of Congress on 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 measurement 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’s technical work is performed by the National Measurement Laboratory, the National
Engineering Laboratory, the Institute for Computer Sciences and Technology, and the Center for Materials

‘ience.

The National Measurement Laboratory

Provides the national system of physical and chemical measurement; * Basic Standards
coordinates the system with measurement systems of other nations and ¢ Radiation Research
°
.

furnishes essential services leading to accurate and uniform physical and Chemical Physics
chemical measurement throughout the Nation’s scientific community, in- Analytical Chemistry
dustry, and commerce; provides advisory and research services to other

Government agencies; conducts physical and chemical research; develops,

produces, and distributes Standard Reference Materials; and provides

calibration services. The Laboratory consists of the following centers:

The National Engineering Laboratory

Provides technology and technical services to the public and private sectors to © Applied Mathematics
address national needs and to solve national problems; conducts research in ¢ Electronics and Electrical
engineering and applied science in support of these efforts; builds and main- Engineering?

tains competence in the necessary disciplines required to carry out this © Manufacturing Engineering
research and technical service; develops engineering data and measurement © Building Technology
capabilities; provides engineering measurement traceability services; develops © Fire Research

test methods and proposes engineering standards and code changes; develops * Chemical Engineering?

and proposes new engineering practices; and develops and improves

mechanisms to transfer results of its research to the ultimate user. The

Laboratory consists of the following centers:

. The Institute for Computer Sciences and Technology

Conducts research and provides scientific and technical services to aid ¢ Programming Science and
Federal agencies in the selection, acquisition, application, and use of com- Technology

puter technology to improve effectiveness and economy in Government © Computer Systems
operations -in accordance with Public Law 89-306 (40 U.S.C. 759), relevant Engineering

Executive Orders, and other directives; carries out this mission by managing
the Federal Information Processing Standards Program, developing Federal
ADP standards guidelines, and managing Federal participation in ADP
voluntary standardization activities; provides scientific and technological ad-
visory services and assistance to Federal agencies; and provides the technical
foundation for computer-related policies of the Federal Government. The In-
stitute consists of the following centers:

The Center for Materials Science

Conducts research and provides measurements, data, standards, reference © Inorganic Materials
materials, quantitative understanding and other technical information funda- ¢ Fracture and Deformation’
mental to the processing, structure, properties and performance of materials; * Polymers

addresses the scientific basis for new advanced materials technologies; plans Metallurgy

Tesearch around cross-country scientific themes such as nondestructive ¢ Reactor Radiation
evaluation and phase diagram development; oversees Bureau-wide technical

programs in nuclear reactor radiation research and nondestructive evalua-

tion; and broadly disseminates generic technical information resulting from

its programs. The Center consists of the following Divisions:

3

‘Headquarters and Laboratories at Gaithersburg, MD, unless otherwise noted; mailing address
Gaithersburg, MD 20899.

2Some divisions within the center are located at Boulder, CO 80303.

‘Located at Boulder. CO. with some elements at Gaithersburg. MD.


wee ~ sue um 3G 0U0"0_— SLT"O = 660°0- = €60°0- +980°0- BT0°0- 600°0-
6L0°0- bLT"O §=000°0»—s«~TLT"O = UTT"0-  EOT*O- ~S60°0- Zz0°0- ZTO*U-
v0z*0- 000°0 €yZ°O EBE°O- ESE*O- peE°0- ySO°O- VEO"0-

ooo"o0 §=6TOT*O = BBT*O—OBT*O.-ZLT"O = S80"0 = 9L0°0

gvo"d =6900"0 §=—000"0 =: d00"O = U0" = UU

b@Z°O = bTZ"0-— 20Z°0-—s €L0°O = 6 SO"

o00°0 §=600"0 | LTU"O 220°

000°0 §=sTO"O §=020°0

€t0"O = BT0°O

000°0

6Tb°U- =ZLE°O- ~P9V"O vt «OUTDO YTH*Z = GTL*0- ~689°0- YS9°O- EL2°0 2bS°0

$0Z*0- L6T°O- O8Z*0- 9TT°O- 000°O 000°0- BvE°U- HIE*O- 287°0- SLO°U- T90°0-

Te8°O0 = ESL"O = EGZ"O- —-BEO"O §=—000"0 = OUT"O- GES*Z 26T°Z C9B°T Eve*O- 98E*O-
OW aN no IN ies) ad NW w A Is Ww

oy Ww 62% 4 [x4 9% St ve 1x4 vt et

(42) 09 ?aLxIvNY

saguoad S€‘SS :AWIAWOaD
AY O0°Sh) =D ALaDUVL

(WaLSKS ‘IWLNAWSTa) i
NOILVNOG VIO NI SN YOd SINIIDIGIIOD WHdIV OIsva

6S0°0O
g50°0
g0[°oO
zs0°0
000°0
7z00°0
z10°0
690°O
990°0
$z0°0
0z0°0
000°0
vso°sT
900°0-
1y6°0-
fe]

9

1x4
oT
fag

tv
ww
Ww

weTW

75


aaanaana

10

20

23

30

SUBROUTINE TUBDAT

THIS SUBROUTINE PROVIDES THE X-RAY TUBE SPECTRAL DISTRIBUTION
NEEDED FOR CALCULATING ALPHA COEFFICIENTS BY USING EITHER THE
NBS ALGORITHM OR MEASURED DATA FROM THE LITERATURE.

NBS 04-SEP-1984

DIMENSION XINT(2, 300) , IDLINE(4) ,DATIGT (2,11) ,DFSP(6) ,
XINT1 (2,11)

COMMON K15

COMMON /TUBE1/XINT, XINT1,ND
COMMON /TUBE2/IDTUBE, VOLT, TOFAGL ,WINTHI
DATA IDLINE/'KA',"KB',"LA',"LB'/
WRITE (6,100)

READ(5,*)K11

WRITE (6,105)

READ(5,125)KK11

WRITE (6,140)

READ (5,125) IDTUBE

WRITE (6,150)
READ(S,*) VOLT, TOFAGL, WINTHI
IF(K11.EQ.1)GOTO 10

WRITE (6,110)

READ(5, 120) DESP

WRITE (6,130)

READ(5,*) ND

OPEN (UNIT=3 , NAME=DFSP, TYPE=' OLD")
READ (3,*, ERR=5) ((XINT(I,J) ,J=1,ND) ,I=1,2) , ((XINT1 (I,J) ,J=1,11),
I=1,2)

CLOSE (UNIT=3)

GOTO 50

WRITE (6,160)

READ (5, *) EDGE

WVMIN=12.398/VOLT

ND=IFIX ( (EDGE-WVMIN) /.02)+1
‘WV=WVMIN

XINT(1,1)=WVMIN

XINT(2,1)=0.0

DO 20 I=2,ND

W=WV+.02

XINT(1, 1)=Wv

CALL CINLIN(XINT(2,1) ,WV)
CONTINUE

CALL INFIGT(K12, IDLINE, DATIGT, IDTUBE)
DO 25 I=1,11

XINT1(1,I)=0.0

XINT1(2,1)=0.0

CONTINUE

DO 30 I=1,4 _
IF(IDLINE(I) .EQ." ')GOTO 30
XINT1(1,1)=DATTGT (1,1)

CALL CHALIN(CINT,DATIGT (1,1) , IDLINE(I))
IF (IDLINE(I) .EQ."LA') RLASCINT
XINT1(2,1)=CINT*50.0

CONTINUE

IF(K12.EQ.1)GOTO 50

DO 40 I=5,1)

IF (K12.EQ.2.AND.I.GT.8)GOTO 50
XINT1 (1,1) =DATTGT (1,1)
CINT=RLA*DATTGT (2, I)

XINT1 (2,1) =CINT*50.0

CONTINUE

32


3.4B Calculated Compositions of Fused Rock Samples

$RUN CALCOMP

DATE: 03-OCT-84 TIME: 10:07:34

WHAT TYPE OF UNKNOWNS DO YOU WISH TO ANALYZE : .
1-ELEMENT SYSTEM 2-OXIDE SYSTEM 3-FUSED DISK SYSTEM ? 3
DO YOU WANT TO INPUT KNOWN CONCENTRATIONS Of UNANALYZED ELEMENTS (Y/N)? Y
INPUT N6 (NUMBER OF ALL CONSTITUENTS), N(NUMBFR OF ANALYTES) AND
M(NUMBER OF SPECIMENS TO BE ANALYZED) : 13,8,5
INPUT NAMES OF CONSTITUENTS (XXXXXXXX) (MAX.=8/LINE) =

Lo NA20 TMGO AL203 S102 P205 803 k20
cAO TIO2 R203. MNO FE203
INPUT NAMES OF ANALYTES (XXXXXXXX) (MAX.=8/LINE) =

NA20 GO AL203  SIO2 K20 no TIO2 FE203

DO YOU WANT TO INPUT ALPHA COEFFICIENTS BY: 1-DATAFILE 2-KEYBOARD ? 1

INPUT DATAFILE NAME OF ALPHA COEFFICIENTS (XXXXXX.XXX) :  FDROCK.C460

WHAT TYPE OF STANDARDS ARE AVAILABLE: J=PURE STANDARDS 2-MULTIELEMENT STANDARDS ? 2
INPUT M1(NUMBER OF STANDARDS) : 10

INPUT I.D. OF STANDARDS (<=8 CHARACTERS) :

Ie 1 SI02 ~
I= 2 BCS-309
I= 3 BCS-367
I*4 BR

Ie 5 NBS-77
I= 6 NIM-D
I=7 NIM-P
I*8 NIM-S
Is 9 NS-1

‘SCH-1
INPUT CONCENTRATIONS (WEIGHT FRACTION) OF STANDARDS :

I=1 3*0.0, .0005, .9972, .0001, .0010, .0002, .0003, .0001,0.0,.0001,.0005

I= 2 +0, -0003,.0151

I= 3 0075,0.0,.0116,.0111

I= 4

I=5

I= 6 NIM-D 10070, .0004, .4351, .0030, .3896,0 .0, 0002, -0001,,.0028, .0002, .0042, .0022, «1700
I=7 NIM-P 20034, .0037, «2533, .0418, .5110, .0002, .0002, .0009, .0266, .0020,.0350, .0022,.1264
I= 8 NIM-S 0031, .0043, .0046, .1734, .6363, .0012, .0001,.1535, .0068, .0004,0.0,.0001,.0140
I< 9 NS-1 0081, .0989, .0065, .2130, .5337, .0028, .0001,.0651,.0173,.0106,0.0,.0019, .0420

I=10 SCH-1 20295, 0003, .0003, .0096, .0811, .0012, .0001, .0003, .0004, .0005,0.0, .0100, .8706
INPUT NET INTENSITIES FOLLOWED BY A PERIOD FOR THE ANALYTE ELEMENTS IN STANDARDS AND
ENTER 0.0 FOR EACH UNANALYZED ELEMENT:

Tel sroz 0.0,7. ,0.0,15- 414373. 20.0, 166. ¢42-194.,240.0,25.
I= 2 BCS-309 0.0, 4.,7. 6369. ,4083. ,2*0.0, 2626. »210. , 24736. ,2*0.0,920.

I=3 BCS-367 0.0,12.,297. ,2022. ,4503. ,2*0.0,7404. , 28386. ,7515. »2*0.0,491.
I= 4 BR 0.0,64. 574. ,955. ,4988. ,2%0.0,8719. , 12693. , 30193. ,2*0.0,6504.
Ie5 NBS-77 0.0,5.,17. ,6183. ¢3945.,2%0.0,12571. ,159. ,37519.,2*0.0,505.
I= 6 NIM-D 1888. 21. ,4776. ,2*0.0, 44. , 288. ,290. ,2*0.0,10281.

I=7 NIM-P 22. »2*0.0, 7080.
I= 8 NIM-S 16. ,2#0.0,739.
I=9 NS-1 0.0,219. ,27.,2178. ,6966. ,2*0.0, 38381. , 1417. ,12295. ,2*0.0,2305.
I=10 SCH-1 0.042. 74-784. 5968. 42*0.0,235. 57165728. 5 2*0.0,41813.

INPUT I.D. OF SPECIMENS TO BE ANALYZED :

el BX-N

I= 2 DI-N

I= 3 a

104


30
40

45

46

48
55

60
65

70

100

110

120
125

130

140
150
160

GOTO 40

RX(I,J)#IX(I,J)

CONTINUE

GOTO 55

IF(KK7.EQ.'N *)GOTO 50

DO 46 I=1,M1

DO 46 J=1,N6

DO 46 I8=1,N

IF(NOA(J) -EQ.NOA1 (18) ) IS(I,J)=IS(I,J)/(1.0-D*IS(I,J))

CONTINUE

DO 48 I=1,M

DO 48 J=1,N6

DO 48 [8#1,N

IF (NOA(J) -EQ.NOAL (18) ) IX(I,J)#IX(I,J)/(1.0-D*IX(I,J))
CONTINUE

CALL CALRI

WRITE(6,545)

DO 200 La1,M

IF(KK1.EQ.'Y ')WRITE(6,550)NX(L) , (NOA1(I) ,RX1 (L,I) ,1#1,N)
IF(KK1.EQ.'N ')WRITE(6,550)NX(L) , (NOA(I) ,RX(L,I) »-I=1,N)
DO 60 I=1,N6

CIM(I)=0.0

IE(RX(L,I) .LT.0.0)RX(L,1)=0.0

CX(L,I)*RX(L,I)

CONTINUE

Lie]

DO 130 I=1,N6

IF(KK1.EQ.'N *)GOTO 90

DO 70 18=1,N

IF(NOA(I) -EQ.NOA1(I8))GOTO 90

CONTINUE

GOTO 130

SCI(I)=0.0

IF (ABS (CX(L,I)-CIM(I)) «LE.0.0001)GOTO 130
a=0.0

DO 100 I9=1,N6

COM=QM+CX (L, 19)

CONTINUE

(CM=CM-CX (L,I)

DO 110 J#1,N6

IF (K1.EQ.3)SCI (I) #SCI(I)+CX(L,J) *Al (I,J)
IF(K1.EQ.2) SCI (I) #SCI (I) +CX(L,J) *(Al (I,J) +A2 (1,5) *CM)
IE (K1.EQ.1)SCI (I) #SCI(I)+CX(L,J)* (Al (I,J) +A2 (I,J) *OY
(1.0+4A3 (I,J) *(1.0-CM) ))

CONTINUE

IF(K1.EQ.3)GOTO 125

DO 120 Jal,N2

KKeJ+1

DO 120 KeKK,N6

SCI (I) =SCI (I) +AIIK (I ¢KyJ) *CX(LyJ) *CX(L,K)
CONTINUE

CIM(I)*CX(L,I)

CX(L,1)@RX(L,I)*(2.! O+SCI(I))

CONTINUE

DO 160 Iel,N6

IP(KK1.EQ.°N ")GoTO 150

DO 140 1881,N

IF(NOA(T) .EQ.NOA1(I8))GOTO 150
CONTINUE

GoTo 160
IF(ABS(CX(L,I)-CIM(I)) -LE.0.0001)GOTO 160
GOTO 170
CONTINUE
GoTo 180

39


3.1B Calculated Compositions for Cr-Fe-Ni Alloys Using one Type Standard

(Continued)
SMP.NO.=5054 RECR 0.32903 FE 0.47045 NI 0.00061
Lz 6 CeCR 25.5768 FE 72.0678 NI 0.1508
TOTAL= 97.808
SMP.NO.=5202 R=CR 0.27360 FE 0.44948 NI 0.06575,
l= 6 CECR 21.7448 FE 62.9068 NI 14,9388
TOTAL= 99.598
SMP.NO.=5364 R=CR 0.33031 FE 0.31895 NI 0.11419
l= 6 C=cR 28.1798 FE 47.2798 NI 23.9438

TOTAL= 99.408

‘TABULATION OF RESULTS (%)

SMP.NO. ‘TOTAL CR FE NI
5054 97.80 25.576 72.067 0.150
5202 "99.59 21.744 62.906 14.938

5364 99.40 28.179 47.279 23.943

DO YOU WISH TO COMPARE THESE RESULTS WITH OTHER PREVIOUSLY KNOWN VALUES FOR THESE ‘SPECIMENS (Y/N) ? Y
ENTER KNOWN CONCENTRATIONS OF SPECIMENS :

‘SMP.NO.#5054 2577, 7250, .0015.
‘SMP.NO.=5202 +2130, .6303,.1480
‘SMP.NO.=5364 +2784, 04721, .2357
TABULATION OF RESULTS (%)
SMP.NO. TOTAL CR FE NI
5054 98.42 25.77 72.50 0.15
97.80 25.58 72.07 0.15 —
ABS.ERR, -0.19 -0.43 0.00
REL.ERR. -0.74 -0.59 0.00
5202 99.13 21.30 63.03 14.80
99.59 21.74 62.91 14.94

ABS.ERR. 0.44 -0.12 0.14
REL.ERR. 2:07 -0.19 0.95

5364 98.62 27.84 47.21 23.57
99.40 28.18 47.28 23.94

ABS.ERR. 0.34 0.07 0.37
REL.ERR. 1.22 0.15 1.57

AVG.ABS.ERR. 0.32 0.21 0.17
AVG.REL.ERR. = 1.34 0.31 0.84

65


aaaaaaa

aaanaana

el ll dd en}

SUBROUTINE CHALIN(CINT,WV, IDLINE)

THIS SUBROUTINE CALCULATES THE CHARACTERISTIC LINE INTENSITY
OF AN X-RAY TUBE SPECTRUM USING THE NBS ALGORITHM.
(UNIT: PHOTONS/E/STRD)

NBS 24-JUL~1984

COMMON K15

COMMON /TUBE2/IDTUBE, VOLT, TOFAGL,WINTHI

CALL ATNUM(IDTUBE, IZ)

Z=FLOAT (IZ)

IF (IDLINE. EQ. 'KA') FZ=3.22E6/(9.76E4+Z**4)—. 39
IF (IDLINE.EQ. 'KB') FZ#5. 13E5/(2.05E5+Z**4)-.014
IF (IDLINE. EQ. ' LA‘) F2=2.02E7/(2.65E6+Z**4)+.21
IF(IDLINE.EQ. 'LB‘) FZ=1.76E7/(6.05E6+Z**4)—.09
U2WV*VOLT/12. 398

ReEXP (~.5* ((U-1.0)/(1.17#U+3. 20) ) **2)
RATIO=R* FZ* (U*ALOG (U) /(U-1.0)-1.0)

CALL CINLIN(HINT,WV)

CINTsRATIO*HINT

RETURN

END

SUBROUTINE SBATWT (NAME, ATWT)

THIS SUBROUTINE PROVIDES THE ATOMIC WEIGHT WHEN A
CORRESPONDING ELEMENT NAME IS GIVEN.

NBS 04-SEP-1984

DIMENSION AW(94)

DATA AW/1.00797, 4.0026,6.939,9.0122, 10.811, 12.01115,14.0067,
15.9994, 18.9984, 20.183, 22.9898, 24.312, 26.9815, 28.086, 30.9738,
32.064, 35.453, 39.948, 39.102, 40.08, 44.956,47.90,50.942,51.996,
54.938,55.847, 58.933, 58.71,63.54,65.37,69.72,72.59, 74.922, 78.96,
79.909,83.80,85.47,87.62,88.905,91.22,92.906,95.94,98.0,101.07,
102.905, 106.4, 107.870, 112. 40,114.82, 118.69, 121.75,127.60,
126.904, 131.30,132.905,137.34,138.91,140.12,140.907,144.24,147.0,
150. 35,151.96, 157.25, 158.924, 162.50, 164.930, 167. 26, 168.934,
173.04,174.97,178.49, 180.948, 183.85, 186.2,190.2,192.2, 195.09,
196.967, 200.59, 204.37, 207.19, 208.980,210.0,210.0,222.0, 223.0,
226.0,227.0,232.038,231.0,238.04,237.0,242.0/

CALL ATNUM(NAME, IZ)

AIWT=AW (IZ)

RETURN

END

35


€Ls°T

OW

000°0- =z10°0

8LS°T

Tt0°o

wSL°T

ied

vto°o §=66TU"U)= @z0"O = wz0"0— ZO": TSO"O
€T0°0 §=sto°oO §=61Z0°O «= Ez0°0 = 9200S B¥00
z00°0- 20°0 § zz0°0 §=¢z0°0 §=61z0"0 = 900°0
Too°a- szo°0 20°0 yz0°0 § 8 800°0

z00°0- 620°0 820°0 s00°0

z00°0- Z€0°O 800°0

zoo"o- T10°O

$z0°0-

866°0- 866°0- Z66°0- 166°0- 066°0- G86°U- 886°0- 486°0- 9L6°0-
SLT Z9L°T «29L°T OSL*T OWL" (OTS
6y6°I- €86°I- ECET*e- B6T°Z- YST°Z- Lte*e- €Le°%—  ETE°Z— EELS Z-
IN ve} ad NW wo A
az [x4 9% 4 ve ix4

x47

w

62

(9) > saLATWN

sgguoad S€°SS *AYIIWOID
AI O°Sh = ALG |

(WALSAS ‘TWLNGWGTS)
NOLIVNOG VIO NI 3SN WOd SINGIDIGIIOO Vid TV DISWa

9€2°0
S@z°O
6z€°0
Tzt°o
90€°O
16z°0
182°0
L2°0
6S2°0

196°0-

0z@9°T

0z0°2@-
1s
ot

9LT°O
e9T°O
Twz°0
stz°O
g¢z"0
Tz"o0
stz°o
602°0
z6T°O
ste°o

9L6°0-

s9s°T

680°2-
Ww
et

000°0
o00°0
“00°o
o00"0
000°0
000°0
000°0
o00"0
o00"o
00°0
000°0
000°0
o00"o
o00°0

000°0

OW Ze

an Ty

0 6

IN 8%
0 lz
aa 9%
Nel SZ
w
At
Is oT
Wet
a9

Ww

68


y8To0"O

‘Ovo as0v0"0

024 E96S0°0 Zols 9SLIs"0

*oosoy = *bLI ZIT

*LOE9y «= *YEZHLIT
*Tev9h = *EbZ9SOT
*096Ly « “EZ9ZSZT
*76e8b «= “EZZTEOT
*€2zey — *GUGYBIT
*y69Sh =“ IS9BUTT
“Sheep = *OLSOTIT
"6pS9p = *LOLBETT
*@@zey = *489760T
“Tecee = 008699T

€ozaa ZOlL

y6z06"0 €9000°0
B£6p0'L YY¥TTO"O
(pSto"o §=Ov000"0
OfsvT°O StzOU"O
ozctz*o ¥zu00"0
SoTT0"O yecco"o
ZEseT*O G6TLZ0°0
Ssotu*o 09900°0
@0610°0  pyzzu"O
byou0"a = zt000"0

€0zaa zolL

*€Lg00T

“4Las9t

*sou98
“(S216
“£C606
"672066
*LESTS
*97868
*ec08a
“SZ7Sb6
OTLTHT
ovo

€vo00°0
eyyT0"O
@0S00°0
Lz4z0°0
16200°0
86200°0
TEtvI*oO
sb2ze°o
zzzo0°0
0¢000°0

ow

Trv6z"0

eoztw £y000°0

€0%aa 616Z0°0
dW £¥000°0

zor

OzwNey

N-KG="ON'dWS

————-NOILWuaLI SWI 40 SLINSau-——

OT-aLz0v2") =Zv v0-a68S0z°0 =Tv
ZI-SEELBB*O-=ZW  9U-3TSEEG"O =IV
QT-30SSET°O =Z¥ p0-aPL60T"O =TW
TI-dS8v0T"O =Zv SO-aSTSST*O =Tv
60-3TL69T°O =Z¥ 0-9S7699°0 =Iv
OT-32Z2v06°0 =Zv O-9S7S6°0 =IV
60-aSS6P6"0-=Zv €0-3009TZ°0 =Iv
LO-aS60ST*O-=ZW £0-3L8920°0 =IV

(CUNT “TauaTWOHKt

00+300000°0 =OV €ozaa

00+300000°0 Ov zon
00+300000°0 =ov wo
00+300000°0 =0v oz
00+300000°0 =Ov zoIs

00+300000°0 =0v DW
00+300000°0 =O ozyN

“INI “SvaW=X)

SINITD1Za900 JS1 GILVINIIVO 30 NOLLWINGVL

*ZL6Sb9

*1e6z8L
*S669T9
*6S6L6S
"402079
*S60bSP
*49s979
“GS6tZ9
*9L8KES
*Ts0z09
*€€0006
ozy

0€000°0
Tez90°o
€8pbT°O
48000°0
ot0v0"70
y00z0"0
L6ETO"O
y9Tto°o
g€p00°0
81000°0

crs]

& + (N/A) SINGTD143909 451 JNO INTHd OL INWM 10K 0d

XoXvZveXelV=k (b)
XeXeZveXelwtOw=A (2)
3 NOMLVU@ITYO Hod 3S OL LNWM MOA Od SaAuNO JS1 40 SdAL LVM

bee

*OSLbT

*UZst
*Z69bT
TIM
“LT Let
70690T
“6zust
*OTLOT
*609bT
*y980T
“6TbbT
zoIs

bytgo"o
vipey-o
Sz6S°0
v6rby"O
zISze°O
6z97°0
peBec’o
bz80E*O
69¥LZ°0
08966°0

zoIs

*SSEZT «= -°298S.

“etelt =“ E6S2T
*pSLOT
*B9E01
*SESOT
“piss
*Tosor
*z0cot
*98S0T
*9zsot

corw ‘ow

*sbOv

*6L06

OZWN

XelWsA
XeTwtOwe=A (1)

SAMA goWugAW

T-H0S="0N"GIS
T-SN=ON°GLS
‘S-WIN="ON"GLS
d-WIN="ON"GLS
G-WIN= "ON "GIS
£L-SAN=°ON°GLS
d="ON"GLS
L9€-SOd="ON"GLS
60£-SO@=°ON*GLS
ZOIS="0N°GLS

* STUVONVIS WOUd SGILISNGINI Bud GaLVINITWO

ZbpL00°0 §=£€Z000°0
€Sz0z*0 g0900°0
G¢ILT°O L¥y00"0
Spyto"O §LI9EZ"°O
4vzu070 §SzS0b°0
ogeas*O 68¥00°0
04260°O =ETbzT"O
TOT6T"O €¥8Y0°0
S0so9°0 99T00°0
s000°0 00u0"0

coz Ww OW

zz000°0
14z60°0
$0v00°0
‘SE€00°O
9€000°0
45000°0
$620°0
TTp00°O
Tz€00°0
00000°0

otWN

T-H9S="ON"dIS
T-SN="0N "CLS
S-WIN="ON"QLS
d-WIN®*ON°QLS
G-WIN=*ON"GLS
£L-SaN=°ON°GLS
Uds°ON"GLS
L9€-S0a="0N°GLS
60£-S9G="ON°aLS
ZOIS=*0N°GLS

+ S@NGNVIS 40 SGILISNIINI JALLVIaY GaIVINITO

A é (N/K) SQIVGNVIS WOUd SATLISNGINI Bund GRLWINTIVO
8 SQUVGNVIS JO SGILISNIINI SALLYIGY GBLVINDIWO LN INIud OL INWM NOK Od
N. 2 (N/A) SWIL Gad YOd SATLISNAINT Loge) OL INVM NOK OG
TA A et 4 Oe sete 10°0°Z000"* *¥SLa* *OSTZ**
*SSOL‘ *EEGES

veetaer

W66-SEN SI

SL-SeN oo =I
3) es
N-id Zsl
N-X@ Tel

PSUNGWGTS GAZATVNYNA HOS (NOILOWtd LHO1aM)SNOTLVYINGONOD WING
GNV SNAWIO3dS NI SBLATVNV YOd SSILISNAINI LGN JANI

V6G-SEN SS =I
Yl-SEN ob I

105


——

UPDATE 5/20/85

SUBROUTINE APAFD

SYSTEM.

NBS 04-SEP-84

aaaaaaa

REAL MAC,MU

DIMENSION CAM(12) ,-UCO(12) ,>UCE(12
+ XINT1 (2,11) ,UC(12,12),
+ C(5,3) CL(12,4) -TE(12) -Al

DIMENSION SWDB(12) ,12(12)

COMMON K15, Kl,N, IELE, NE, NO, KK2,CAM, 1Z, ITP, ITS

COMMON /COESUB/A1,A2
COMMON /TUBE1/XINT,XINT1,ND
COMMON /TUBE2/IDTUBE, VOLT

THIS SUBROUTINE PERFORMS MOST OF THE CALCULATION FOR
OBTAINING THE ALPHA COEFFICIENTS USED IN FUSED DISC

) ,SWDB1(12) ,XINT(2, 300),
TELE (12) ,NE(12) ,NO(12),
(12,12) ,A2(12,12)

COMMON / SDSUB/TP, TS ,C, CL, IE, UC, UCO,NS5, UCF, CA, CByF,CLOT

COMMON /WFRA/WLI,WB,WO,WF

DATA CLOI/.25/
C:FILTER

COMMON/FILTER/KFILT (12)
C:FILTER

NS5=N

WRITE (6,190)

READ (5,*) K12

GL=0.

WRITE (6,180)
180  FORMAT(' GRAMS OF SAMPLE:',$)
READ (5,*) GS
WRITE (6,182)
182  FORMAT(' GRAMS OF L12B407:',$)
READ (5,*)GF
IF(K12.EQ.1) GO TO 4
IF(K12.EQ.2) WRITE (6,184)
184  FORMAT(' GRAMS OF LIF:',$
IF (K12.£Q.3) WRITE (6,186)
186 FORMAT(' GRAMS OF LIBO2:',$)
READ (5,*)GL
4 CONTINUE
TWT=GF+GL
F=GS/ (TWT+GS)
GO TO (6,7,8) ,K12
6 WLI=.0821
WB=.2557
WF=0.
WO=.6623
Go TO 9
7 ~WLI=(GF* .0821+GL* 2675) /TWT
WB=GF* .2557/TWT
WO=GF* .6623/TWT
WF=GL* .7325/TWT
Go TO 9
8  WLI=(GF*.0821+GL*.1395)/TWT
wB= (GF*.2557+GL* . 2173) /TWT
WO=(GF* .6623+GL* .6432) /TWT

24


100

110
120

130

140

150

160

210
215

220

230
240

250

260
270

IF(KK1.EQ.'Y ')WRITE(6,530)NS(I) ,(RS1{I,J) ,J=1,N)
IF(KK1.EQ.'N ')WRITE(6,530)NS(I) , (RS(I,J) ,J=1,N)
CONTINUE

IF(KK1.EQ.'Y ')J7#0

DO 140 I=1,N6

Mll=M1

DO 110 18=1,N

IF(NOA(I) .EQ.NOA1(I8))GOTO 120

CONTINUE

GOTO 140

IF(KK1.EQ.'Y ')J7eI7+1
1P(I)#0.0

DO 130 Lel,Ml
IF(CS(L,I) EQ.0.0)Klie1
IF(CS(L,I) .EQ.0.0)MlleMll-1

IF(CS(L,I) «EQ.0.0)GOTO 130
IP(I)#IP(I)+IP1(L,1)
CONTINUE

IF (K11.NE.1) IP(I)*IP(I) /FLOAT (M1)
IF(K11.EQ.1) IP(I) @IP(I) /FLOAT(M11)
TF(K11.EQ.1)Kll=2

IF(KK1.EQ.'Y ') IPP(J7) =IP(I)
CONTINUE

IF(KK1.EQ.°Y ')WRITE(6,540) (NOA1 (J) ,J=1,N)
IF(KK1.EQ.'N ')WRITE(6,540) (NOA(J) ,J@1,N)
DO 150 I=1,M1

IF(KK1.EQ."Y ')WRITE(6,550)NS(I) , (IP11(I,J) ,J#l,N)
IF (KK1.EQ.'N ')WRITE(6,550)NS(I) » (IP1(I,J) -J=1,N)
CONTINUE

IF (KK1.EQ."Y ')WRITE(6,555) (IPP(J) ,J=#1,N)
IF(KK1.EQ.'N ')WRITE(6,555) (IP(J) ,J#1,N)
IF(M1.NE.1)GOTO 210

WRITE (6,557)

K3=3

GoTo 215

WRITE (6,560)

READ(5,*) K3

IF (K3.EQ.1.OR.K3.E0.3)N9=1

IF (K3.EQ.2.0R.K3.EQ.4)N9=2

WRITE (6,570)

READ(5,510) KK4

IF(KK1.EQ.'Y )J7=0

DO 270 Lal,N6

'N ")GOTO 240

oN
«NOA1(I8))GOTO 230

J79J7+1

DO 250 I=1,Ml
X(I)#IS(I,L)
¥(1)sRS(I,L)
CONTINUE

CALL SVLSF2(S,K3,N9,M1)
DO 260 I=1,3
A(L,1)#=S(I)
IF(KK1.EQ."Y ')AA(J7,1)*A(L,I)
CONTINUE

CONTINUE

DO 320 L=1,M
IF(KK1.EQ.*Y ')J7=0

DO 320 I=1,N6
IF(KK1.EQ.'"N ')GOTO 300
DO 280 I8=1,N

45


$00°0- ySE°0- SOE*U- ¥8Z°0- 120°O- ZTO°U- VyoO"O- 000°0 s£0°0-
eI€*O- 692°0- OSZ°O- ¥IO'O- yO0"O- TU0°O 000°0 8£0°0-

64b°0 «= €8h°0 = G0Z"O- WET"O os veT*O = 00°08" 0-

66v°0 =ZEZ"0 = OTZ*O-—-96T*O = 000°0 Ss Lz *0-

Stc"0 | G6TZ°0— 86T"O = 0000 ~— vOb*0-

b60°0 §=680°0 §=000°0 §=—L90°0-

€20°0 §=6000"0 = €S0"0-

000°0 = Ty0"0-

0u0°O

ZEO"U- «ELO"O- =—GYT*O- ~GET*O- YBT"U- 680°O- £40°0- §S0°0- 0u0°0 000°U-

gu’ = BS0°Z)086"O = 6L9"O)-ZTS*O) S87") WGT"O Ss EOT°U = 000"0 Ss 80S°Z

€0@dd «=6tOCNN «ZOTIL §=6TOIVO §=TO2 H COTS SO%d ZOTIS E02IV TOTOW
ve 4 ce v4 61 oT st oT eT at

(eT) €OzTV taLAIVNW

Saquoad SC’SS ?AWLAWORD
AN O'S UD ALGDUVL

(watsas = ag1xo)

NOLINNOE VIOD WI SSN Od SINATIIGSAOO Wid IW GTUHAH

€c0°0-
se0°0~
¢sb°o-
86£°0-
9L€*0-
T90°0-
660°0-
L€0°0-
000°0

000°0

000°0-

T0z"*z

TOZWN
WT

oT0°O-
Tt0°0-
06T*0-
esT°0-
bST°O-
€1T0°0-
oTO°0-
g00°0-
000°0
000°0
000°0
000°0
000°0-
Zve°o
ix) ae)

€0%ad 97
COZNW SZ
ZOllL 2
TOIW 02
TOZ 4 6T
€or s oT
s0¢ d ST

88

cous oT
cOZTw ET
TOTOW 21
TOZWN IT
€ol99 WIV
w
Ww


MZHACODWGNH

A

Zctz+yer

FIGURE te STRUCTURE OF PROGRAM CALCO

MAIN PROGRAM CALCO

SUBROUTINE
CHAW.

SUBROUTINE
ABSEDG

- SUBROUTINE
YIELD

SUBROUTINE
JUMRAT

SUBROUTINE
CTNLIN

SUBROUTINE /<——>

ALPHA

SUBROUTINE
< CHALIN
SUBROUTINE

TUBDAT

SUBROUTINE
AFIOX

SUBROUTINE
SBATWT

SUBROUTINE
BDCOEF

I

REAL FUNCTION
MAC OR MACFUN

I

DATAFILE
MACPRM.DAT

SUBROUTINE
APAFD

SUBROUTINE
INFTGT

DATAF ILE
TGTWR.DAT



NBSGSC - A FORTRAN Program
For Quantitative X-Ray Fluorescence Analysis

G. Y. Tao* and P. A. Pella

Center for Analytical Chemistry
National Bureau of Standards
Gaithersburg, Maryland 20899 U.S.A.

and

R. M. Rousseau
Geological Survey of Canada
Ottawa, Canada

ABSTRACT

A FORTRAN program (NBSGSC) was developed for performing quantitative
analysis of bulk specimens by x-ray fluorescence Spectrometry. This program
corrects for x-ray absorption/enhancement Phenomena using the comprehensive
alpha coefficient algorithm Proposed by Lachance (COLA). NBSGSC is a
revision of the Program ALPHA and CARECAL originally developed- by R.M.
Rousseau of the Geological Survey of Canada. Part one of the program (CALCO)
performs the calculation of theoretical alpha coefficients, and part two
(CALCOMP ) computes the composition of the analyte specimens. The analysis of
alloys, pressed minerals, and fused specimens can currently be treated by the
Program. In addition to using measured x-ray tube spectral distributions,
spectra from seven commonly used x-ray tube targets could also be calculated
with an NBS algorithm included in the program. NBSGSC is written in FORTRAN
IV for a Digital Equipment Corporation (DEC PDP-11/23) minicomputer using
RLO2 firm disks and an RSX 11M operating system.

Key words: Alpha coefficients; comprehensive algorithm; fundamental
Parameters; interelement corrections; Program; quantitative analysis; x-ray,

EL

*Guest Researcher from Shanghai Institute of Ceramics, Academia Sinica, The
People's Republic of China.

iit


60
70

80

100

110

120
500

510
520

530

540
550
560
570

CONTINUE

GOTO 100

WRITE (6,650)

DO 80 I=1,M1
WRITE (6,660)I
READ(5,670)NS(I)
CONTINUE

WRITE (6,680)

DO 90 I=1,Ml

WRITE (6,690) 1,NS(I)
READ(5,*) (CS(1,J) ,J=1,N6)
CONTINUE

IF(KK1.EQ."Y ')WRITE(6,695)
IF(KK1.EQ.'N ')WRITE(6,697)
DO 96 I=1,Ml

WRITE (6,690) I,NS(I)
READ(5,*) (IS(I,J) ,J=1,N6)
CONTINUE

WRITE (6,700)

DO 110 I=1,M

WRITE (6,660) I
READ(5,670)NX(I)

CONTINUE

IF(KK1.EQ.*Y ')WRITE(6,710)
IF(KK1.EQ.'N ')WRITE(6,720)
DO 120 I=1,M

WRITE (6,690) I,NX(I)
READ(S,*) (IX(I,J) ,»J=1,N6)
CONTINUE

RETURN

FORMAT (1X, "DO YOU WANT TO INPUT KNOWN CONCENTRATIONS OF UNANALYZ
+ED ELEMENTS (Y/N)? ',$)

FORMAT (Al)

FORMAT(1X, ‘INPUT N6 (NUMBER OF ALL CONSTITUENTS), N(NUMBER OF ANA
+LYTES) AND'/3X,'M(NUMBER OF SPECIMENS TO BE ANALYZED) :',10X,$)

FORMAT(1X,' INPUT N(NUMBER OF ANALYTES) & M(NUMBER OF SPECIMENS T
+0 BE ANALYZED) : ',S) ;

FORMAT(* INPUT NAMES OF CONSTITUENTS (XXXXXXXX) (MAX.=8/LINE) :'/)

FORMAT (8A8)

FORMAT (1X," INPUT NAMES OF ANALYTES (XXXXXXXX) (MAX.=8/LINE) :'/)

FORMAT (" DO YOU WANT TO INPUT ALPHA COEFFICIENTS BY: 1-DATAFILE
+ 2-KEYBOARD ? ',$)

FORMAT(1X,'TYPE IN THE ALPHA COEFFICIENTS :'/)

PORMAT( Xe" INPUT DATAFILE NAME OF ALPHA COEFFICIENTS (XXXXXX. XXX)
+2!

FORMAT (SA2)

FORMAT(' WHAT TYPE OF STANDARDS ARE AVAILABLE: 1-PURE STANDARDS
+ 2-MULTIELEMENT STANDARDS ? ',$)

FORMAT(1X,' INPUT M1(NUMBER OF STANDARDS)’: ',$)

FORMAT(1X," INPUT NET PURE INTENSITIES FOR EACH ANALYTE FOLLOWED
+BY A. PERIOD AND'/3X,'ENTER 0.0 FOR EACH UNANALYZED ELEMENT: '/)

FORMAT(1X," INPUT NET. PURE INTENSITIES FOR EACH ANALYTE FOLLOWED
+BY A PERIOD :'/) .

FORMAT (2X,A2, 4X,$)

FORMAT(1X,"INPUT I.D. OF STANDARDS (<#8 CHARACTERS) :'/)

FORMAT (2X, "I=! ,I2,4X,$)

FORMAT(A8)

FORMAT(* INPUT CONCENTRATIONS (WEIGHT FRACTION) OF STANDARDS :'/)

FORMAT (2X, "I=" ,12,4X,A8,2X,$)

FORMAT(1X," INPUT NET INTENSITIES FOLLOWED BY A PERIOD FOR THE AN
+ALYTE ELEMENTS IN STANDARDS AND'/3X,'ENTER 0.0 FOR EACH UNANALYZED
+ ELEMENT: '/)

FORMAT(1X," INPUT NET INTENSITIES FOLLOWED BY A PERIOD FOR THE AN
+ALYTE ELEMENTS IN STANDARDS :')

42


L00°0- 6ET*O- OZT*O- B8T°U 00° 66T°O Y80°0- 080°0- yYTO"U- LOu"O-
ZIT°O- p60°0- LB8T°O O00"O F6T"O S60°U- B80°V- 610°0- OTO°0-

600"0 §=6T8Z"0 = OU0"0s EYZ"O Cs EBE*O- ~ESE*O- 6L0°O- TSO*O-

BLT"O- 000°0 942°0 USE*O- IZE*O0- LSU°O- TEO°O-

000°0 §=6€0T°O)§=66T"O |S BIO) £60°O = € 80°

000°0 000° 000°0 oc0u°0 000°0

Obz°0 §= 8770s « BBO"O =: TLO"O

000°0 §=69f0°0 §=0z0°0

vro°o = 8TU"0

00°O

S8p°0- Zv"O- 882°0 96b°0 6S¥°T O40"O SST°T- OZ4°0- 689°0- O¥T°O sat

zbz"0- vEz*0- 08z"0- b6Z°0- BIT°O- 000°0 000°0 LE*0- SEE°O- 680°0- £20°0-

OsT°T = g00°T T6T°O- vzZ"O- yYO"O UvOO"O SUT*O- 6I9°% seve*z GET°O- O0E*O-
OW ‘aN ite) IN ao a NW ww A Is Ww
ey tZ 62 8% [x4 9% 4 ve 1x4 ot et

(9%) ga *aLATWNY

Saguogd SESS FAULAWOAD
AL O°Sh | uD NGOUVL

(WaLSAS IWLNaWaTa)

NOILVNDE VIOD NI SN WOd SINZIDIGIION WHd'IV OISva

s90°0
#90°0
tot"o
ato
zso°o
000°0
zou"0
seoro
z10°0
6z0°0
€z0°0
000°0
Sts*st
400°9-
zt6"0-
2

9

OW 7
aN Tb
m9 6%
IN 8%
09 42
ad 9%
NW SZ
wD ve
A &
Is oT
Te et
a9
tw
ca

Ww

wiv

74


3.3A Calculation of Coefficients for Cement Samples as an Example of
an Oxide System

SRUN CALCO

DATE: 03-OCT-84 TIME: 14:12:05

WHICH SYSTEM DO YOU WISH TO ANALYZE:

1-ELEMENT SYSTEM 2-OXIDE SYSTEM 3-FUSED DISK SYSTEM ? 2
INPUT NUMBER OF ANALYTES: 12
INPUT NAMES OF ANALYTES (XXNONS) :

C 103 NA201 MG101 AL203 S1102 P 205 S 103 K 201 CA101 TI102 MN203 FE203
WHAT MASS ABS. COEF. ALGORITHM DO YOU WANT TO USE :
A-LEROUX ALCORITIM 2-HEINRICH ALGORITHM 2? 2
DO YOU WANT TO CREATE A DATAFILE FOR SAVING CALCULATED ALPHA COEFFICIENTS (Y/N)? Y
INPUT DATAFILE NAME OF ALPHA COEFFICIENTS (XXXXXX.XXX)_: OXCEMT.C45
FOR SAMPLE GROMETRY, INPUT INCIDENCE & EMERGENCE ANGLES (DEGREE-xx): 55,35
INPUT THE CHARACTERISTIC LINE NUMBER YOU WISH TO MEASURE (1-KA, 2-KB, 3-LAl, 4-18), 5-~LB2):

I= 1 c 1
I22 NA 1
Ie 3 “G 1
I24 AL l
Ie 5 SI 1
I= 6 P 1
1=7 s 1
I= 8 x 1
I29 aA 1
1=10 TL 1
I=]1 nN 1
I=12 FE 1

DO YOU WANT TO PRINT OUT CALCULATED ALPHA COEFFICIENTS(Y/N): Y

WHICH X-RAY TUBE SPECTRAL DISTRIBUTION DO YOU PREFER:
1-CALCULATED SPECTRUM FROM NBS ALGORITHM ; 2-MEASURED SPECTRUM ? ve

DO YOU WANT TO PRINT OUT THE SPECTRAL DISTRIBUTION(Y/N) ? Y

INPUT NAME OF X-RAY TUBE TARGET (XX) : CR

INPUT VOLTAGE (KV), TAKE-OFF ANGLE OF X-RAY FROM TUBE TARGET(DEGREE), AND
WINDOW THICKNESS(MM) OF X-RAY TUBE : 45.0,26.0,.45

INPUT THE ENDING WAVELENGTH OF X-RAY TUBE SPECTRUM(ANGSTROM) : 2.9956

83


U.S. DEPARTMENT OF COMMERCE
National Bureau of Standards

|! NBS Technical Note 1213

NBSGSC—A FORTRAN
Program for Quantitative -
X-ray Fluorescence Analysis

G ¥ Tao, PA. Pella, and R: M. Rousseau

NBS NBS NBS NBS NBS NBS NBS - VBS s

*S NBS NBS NBS NBS NBS NBS NBS NBS. NE BS. X
NBS NBS NBS NBS NBS NBS NBS <= a
*S NBS NBS NBS NBS NBS NBS NBS NBS NBS Nv
NES NBS NES NBS NBS NBS NES -
*S NBS NBS NBS NBS NBS NBS NBS A BS NES SN
NES NBS NBS NBS NBS NBS NBS X=

*S NBS NBS NBS NBS NBS NBS NBS ‘NBS. NBS Jv
NBS NBS NBS NBS NBS NBS NBS NBS)

. NBS NBS NBS National Bureau Standards
~ tS NBS NBS NBS NBS NBS NBS NBS NBS N BS

© 3S. NBS NBS NBS NBS Bureau of NBS N 'BS NB BSN.

NBS NBS NBS NBS NBS NBS NES NES

S NBS NBS NBS NBS NBS NBS NBS NBS N BS Ni
NBS NBS NBS NBS NBS NBS NPS NBS *

tS NBS NBS NBS NBS NBS NBS NBS NBS | NBS. Ni


PROGRAM WRTTGT

THIS PROGRAM WRITES A DIRECT DATAFILE CALLED
"TGIWR.DAT' TO PROVIDE INFORMATION NEEDED FOR
CALCULATING CHARACTERISTIC LINE INTENSITIES
IN AN X-RAY TUBE SPECTRUM.

NBS 06-SEP-1984

aaaaaaann

DIMENSION DAT(14,11)
OPEN (UNIT=3 , NAME='TGTWR. DAT" , TYPE='NEW' , ACCESS="DIRECT',
+ MAXREC=14,RECORDSIZE=11)
WRITE (6,5)
5 FORMAT (1X,'INPUT DATA BY KEYBOARD: '/)
DO 10 I=1,14
READ(5,*) (DAT(I,J) »J=1,11)
WRITE (3'I) (DAT(I,J) ,J=1,11)
10 CONTINUE
CLOSE (UNIT=3)

c

c THIS PROGRAM PRINTS OUT THE CONTENTS OF
c DATAFILE NAMED 'TGIWR. DAT’.

c

c NBS 06-SEP-1984

Cc

DIMENSION DAT(14,11)
OPEN (UNIT=3, NAME='TGIWR. DAT’ , TYPE="OLD' ,ACCESS=' DIRECT’,
+ MAXREC=14,RECORDSIZE=11)
DO 20 I=1,14
READ(3'I) (DAT(I,J) ,J=1,11)
WRITE (6,100) (DAT(I,J) ,J=1,11)
20 CONTINUE
CLOSE (UNIT=3)
100 FORMAT (/1X, 11 (F8.4, 2X) )
END

110


UPDATE 2 TO NBS TECHNICAL NOTE 1213 12/4/85

This update contains corrections to NBSGSC and are as
follows:

1. Double-headed arrows in Figures 1 and 2 should be removed.
Note enclosed revised figures.

2. The word “overlay” should be deleted from the sentence “overlay
structure of calco" on page 17.

3. Line 18 on page 22 should read:
IF(KK2.Eq.’N’) GO TO 162
4. Line 31 on page 22 should read:
162 N2=N-1
5. Line 230 on page 26 should read:
FORMAT(///1X,'* FUSED DISK:',F6.4,'G SAMPLE
+',F6.4,'G LI2B407",
+F6.4,'G LIBO2’)
END
6. In SUBROUTINE YIELD (Y,IELE,ISR) on page 29, delete line:
ZL=ALOG(ZI)
7. In SUBROUTINE BDCOEF on page 30, the second line following the
statement C K15 EQUALS 1 should read:
UF=WLI*MU( ‘LI’ ,WV1)+WB*MU('B! ,WV1)+WO*UO+WE*MU(/F’ ,WV1)
8. The word "overlay" should be deleted from the sentence “overlay
structure of calcomp" on page 38.
9. At the top of page 41, the word concentrations is misspelled but
should have no effect on the program.
10. On page 21 of update 1 to CALCO the line "DO 50 J=1,N5" is

missing between lines 11 and 12,i.e. it should follow after

IF(ICAS.EQ.2)N5=3

11. In SUBR CALRI and SUBR SVLSF2,the array S should be dimensioned
to 4,i.e.S(4), to be consistent with that in SUBR SLE.

12. Format 196 on page 26,i.e.the mean concentration for LOI is
"25" and is correct. The example on page 103 is incorrect and

should be changed to LOI=25.00



National Bureau of Standards
Technical Note 1213

Natl. Bur. Stand. (US.),

‘Tech. Note 1213,

119 pages (Apr. 1985)
CODEN: NBTNAE

US. Government Printing Office,
.Washington: 1985

For sale by the Superintendent
of Documents,

US. Government Printing Office,
Washington, DC 20402


0.0000
0.0000
1.0727
0.0000
1.8894
0.0000
2.4604
0.0000
3.0824
0.0000
3.8531
0.0000
4.5355
0.0000
5.3268
0.0000
6.1058
0.0000
6.8419
0.0000
7.5844
0.0000
8.3105
0.0000
8.5946
0.0000
9.1309
0.0000
9.6522
0.0000
10.1931

Contents of the permanent datafile called 'MACPRM.DAT' for calculating
mass absorption coefficients using the expression of Thinh and Leroux.
following tabulated values are in the same order as given in Table 1 of
reference 10.

0.0000
0.0000
0.0246
0.0000
0.0548
0.0000
0.1110
0.0000
0.1880

0.0000 °

0.2838
0.0000
0.4016
0.0000
0.5320
0.0000
0.6854
0.0000
0.8669
0.0000
1.0721
0.0000
1.3050
0.0000
1.5596
0.0000
1.8389
0.0000
2.1455
0.0000
2.4720

0.0000
0.0000
3.0300
0.0000
3.0300
0.0000
3.0300
0.0000
3.0300
0.0000
3.0940
0.0000
3.0660
0.0000
3.0410
0.0000
3.0190
0.0000
3.0000
0.0000
2.9830
0.0000
2.9670
0.0000
2.9530
0.0000
2.9400
0.0000
2.9270
0.0000
2.9160

0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
1.7500
0.0000
2.1200
0.0000
2.5000
0.0000
3.0000
0.0000
3.5500
0.0000
4.4000
0.0000
6.4000
0.0000
6.2000
0.0000
5.9000
0.0000
6.7000
0.0000
7.5000

0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
2.1900
0.0000
3.2600
0.0000
4.6100
0.0000
6.2500
0.0000
8.2000
0.0000
10.4900
0.0000
13.1400
0.0000
16.1600
0.0000
19.5700
0.0000
23.3900
0.0000
27.6300

0.0000
0.0000
9.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
2.7345
0.0000
2.7345
0.0000
2.7345
0.0000
2.7345
0.0000
2.7345
0.0000
2.7345
0.0000
2.7345
0.0000
2.7345
0.0000
2.7345
0.0000
2.7345
0.0000
2.7345

0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0633
0.0000
0.0894
0.0000
0.1177
0.0000
0.1487
0.0000
0.1893
0.0000
0.2292

111

0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
2.8350
0.0000
2.8200
0.0000
2.8050
0.0000
2.7900
0.0000
2.7750
0.0000
2.7600

0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
9.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000

9.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000

0.0000
9.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
9.0000
0.0000

The

0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
“0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000


aaaaaaa

a

aaaagane

aagaN

SUBROUTINE BDCOEF(SW,SWDB,SWLOI,1I,WV1,WV2,K1,KK5,K15,K12)

THIS SUBROUTINE CALCULATES BETA AND DELTA COEFFICIENTS
IN MODIFIED VERSION OF SHERMAN'S EQUATION AT A CERTAIN
WAVELENGTH AND CORRESPONDING X-RAY TUBE SPECTRAL INTENSITY.

NBS 31-OCT-1984

REAL MAC,MU

DIMENSION C(5,3) ,CL(12,4) ,U(12) ,BETA(12) ,DELTA(12) ,UC(12,12),
IE (12) ,UCO(12) , UCF(12) , SWDB(12)

COMMON /BDSUB/TP,TS,C,CL, IE, UC, UCO,N5, UCF,CA,CB,F,CLOI

COMMON/WFRA/WLI ,WB,WO,WF

IF(K15.EQ.2) GO TO 4

K15 EQUALS 1

UO=MU('O ',WV1)

UF=WLI*MU('LI' ,WI1)+WB*MU('B ',WV1)+ WO*UO+WF*MU(' ',WV1)
GO TO 6

CONTINUE

K15 EQUALS 2

UO=MAC('O ',WV1)

UF=WLI*MAC('LI' ,WV1)+WB*MAC('B ',WV1)+WO*UO+WF*MAC('F ',WV1)
CONTINUE

DO 10 J=1,N5

IF(K15.£Q.1)U(J)=MU(IE(J) ,WV1)

IF(K15.EQ.2)U (J) =MAC(IE (J) ,WV1)

CONTINUE

CALCULATION OF BETA COEFFICIENTS
0.081 G/CM2 AL FILTER IS USED FOR ANALYTES CR & MN
WHEN CR TARGET OF X-RAY TUBE IS EMPLOYED.

IF (KK5.EQ.2.AND.K15.EQ. 1) WV2=WV2*EXP (-.081*MU('AL' ,WV1))

IF (KK5.EQ.2.AND.K15.EQ.2) WV2=WV2*EXP (-.081*MAC('AL' ,WV1) )
DEN=CL (1,4) *(U(1)*TP+UC(1,1)*TS)+(1.0-CL(1, 4)) * (UO*TP+UCO(1)*TS)
W=U (1) *WV2/DEN

IF (KK5.EQ. 2.AND.K15.EQ. 1) WV2=WV2/EXP (-. 081 *MU('AL' ,WV1))

IF (KK5.EQ. 2.AND. K15.EQ.2) WV2=WV2/EXP (-.081*MAC('AL‘ ,WV1))
IF(K1.EQ. 3) PHIF=(UF*TP+UCF(1)*TS) /DEN-1.0

IF (K1.NE.3) SBETA=0.0

N2=2

IF(K1.EQ. 3)N2=1

DO 20 J=N2,N5

BETA(J)=(CL(J, 4) *(U(J) *TP+UC(J,1)*TS)+(1.0-CL(J,4)) *(UO*TP+
UCO(1)*TS))/DEN-1.0

IF (K1.NE. 3) SBETA=SBETA+C (I,J) *BETA(J)

CONTINUE

CALCULATION OF DELTA COEFFICIENTS

EF (K) «NE oNE. pSASDELTARO. 0

DO

TP(WVl or SL, 2) .OR.CL(J,1) .GT.CL(1,2))GOTO 40
IF(K1.EQ.3)GOTO 32

UE=0.0

UEI=0.0

UEJ=0.0

DO 30 L=#1,N5

UESUE+(CL(L, 4) *U(L)+(1.0-CL(L,4)) *UO)*C(I,L) *TP
UEI@UEI+ (CL(L,4) *UC(L,1)+(1.0-CL(L,4) ) *UCO(1))*C(I,L) *TS
UEJ=UEJ+ (CL(L, 4) *UC(L,J)+(1.0-CL(L, 4) ) *UCO(J)) *C(I,L)

30


boU'd- BZZ"U-  GBT"O- LYT*U- YTO"O- 000°0 ZEOO- OEO"O- LZ0°O- Sz0°O- LO0°O- cOZdd 9%
L6T°O- 6S1°0- TyI"O- OTO*O- 000°0 vEO°0- ZEO°0- 6Z0°0- 92%0°0- LO0°0- £0ZNW SZ

fvbo TSP°u §=«B6TTU §=—OUD"O.- ss ELE*O- «-BHETU-S-BTETO- 262°0- ~EOT*O- = ZOTIL 27

69b°0 «= SZZ*O-—« 0000S: YTE*U- «HEZ*O- -B9Z*U--YbZ"O--LLO"O- = TOT 02

bEZ°O §©000°0»=—_ Z6Z*O- *TLZ*U-  LbC*O- «-9@Z"O- —S90°O- = TOZ_- «GT.

oo0"0 §=«yS0"U- zS50°0- 9¥0"0- Zpurd- €00°0- €0T S OT

000°0 §=000"0 ~~ -000°0 000°0 §=©00"0 $02 d ST

90

000°0 } ©o00°0- 00d 000°0 zolls oT
000°0- o00"0 oou"o §=— coz ET
000°0 © 000°0 §=— TOTOW zt
, 000°0 = TOZWN TE
‘oo0’o §«= fOT. 9 «MET
bZ0°0- SZ0°0-" YLT*O- G6T*U- LOZ*O- LLU°0- 000°0 co0"d- Z200°0- TOU"O- TUO"O- ToO*O- Ww
SE9'T 9E"T 089°0 ZP°0 -Y¥ETY —UHO"D-«COU"D- Szz"zZ_TUSTT «NNT. ZEVTT Z10°O Ww
€0@ai «= COZNNCZOTIL = TOIVD. {o¢ ¥ LOTS SOZd ZOTIS €O%TW TOTON TO%WN. £0T D
4 se zz oz 6t ot st wt et at t 9

(ST) S0% d *3.LAIVNW

saquoad S€‘SS 2AuIaWOR9
M4 O'S |UD HISOUVL

(WalSAS 3q1x0)

NOILVNOE W109 NI SSN 4Od SINIIDISI9OD VHdIV GINGA


yvo"o

S@p°o

tozaa
9%

€00"O- BIZ*0-  GyT*O- £29°0 EST°O STI°O 420°O 9S0°0

Bh0°O
€42°0
¢OZNW

4

SO@*O- 6ST°U- y6S°O LTO ITT°O L0°0 yS0°O

Lveeo

062°0 = LZTL"0—OFO"U-  TLU°0- - 860°0- BOT *0-
vye°O =6€TO"O =: UZ0°0- 9 B¥0°0- —-090°0-

de4°0 «6(L°0)— L69°0 = 989°0

y6T°O §=688T°O) = LBT°O

cot°O = SbT"O

sot°o

SGE°O = LBT°O- -bSO°U- ThO"U- 920°0- = BTO"O-

Gu9°O- TZL°"0- Tyl°% YSL°O L9S°O0 BSE°O z0z*0

cOovlL
<4

folwO 02x COTS SOea 2OLIS cOzW
4 6 ot sT oT eI

(y ) Cot > *aLATWNW

Sdguded SESS FANLAWOID
A O°Sh =D FLGDUWL

(Wass gQIxo)
NOLLVNDE VIOD NI 3SN YOd SINGIOIAIIOO WHdIV GIuaAH

6£0°0
8£0°0
€It*o-
290°0-
699°0
S8T°O
veto
oro
810°0

zt0°0-

6£0°0

TOTOW
fas

s£0°O
veoro |
LOot*o-
€90°0-
4s9°0
88T°o
Lvr°o
goto
Ts0"0
190°0

vto"o-

060°0-

(OtwN
WT

000°0
000°0
000°0
000°0
000°0
000°0
000°0
000°0
000°0
000°0
000°0
000°0
000°0
000°0
i xe) ae)
9

€O%a4 92
€OZNW SZ
COULL 2
TOTW 02
To? 4 6T
Ol S OT
soz d ST
cous oT
coz €T
TOTSW ZT
TOZWN IT
colo 9
w
Ww

85

wiv


Step _No.

10

FIGURE 3.

START CALCO

—_t

Select Analysis Systen
(1) Element,
(2) Oxide
(3) Fused Dise

Input Number of Analytes
i

Input Name of Analytes

L

Select an Algorithm for
Calc. Mass. Abs. Coef.
(1) Leroux Algorithn

(2) Heinrich Algorithm

© you want to create &
datafile for saving Calc.
Coef.?

Input Datafile Name of
Cale. Alpha Coef.

*If Step 293 }———__

FLOWCHART FOR PROGRAM CALCO

i

Print Out
Cale. Coef.

If Step 11«¥
If Step l1-N

—_

Select fused disc condition:
(1) (2), on (3)

If Step 2=3

Tf Step 2=1 or 2

Print out X*ray Tube
Spectrum Data

*

If Step 139¥

ee

If Step 13=N

If Step 2=1
owr2

Input Mean Conc. of Analytes
in Sample for Fused Disc

Input inoidence and
Emergence Angles

Select Analyte Line Number:
(1) Ka, (2) KB, (3) Lat,
(4) LB1, (5) L62

© you want to print o
Calo. Coef.?

Select X-ray Tube Spectrum
you want to Use: (1) NBS
algorithm and (2) Measured

Input Ending Wavelength for
Xeray tube spectrum

Input Total Number of Wave~

length Intervals of Continuum

for Measured Spectrum

Input Datafile Name of
Measured Spectrum

If Step 1292

Input Voltage, Take-off

Angle and Be Window Thickness

Tf Step) of X-ray Tube
1ze1 F
Input Name of X-ray
Tube Target

*This means if option 3 is selected in Step 2, etc.

10

Do you want to print out
the spectrum data?

Step No.

22

a

20

19

18

15

14


Mo MDM ME
1 1 6 3
2 2 7 3
3 2 8 3
4 2 9 3
5 3 10 4
R(10) Energy jump for each edge ZI

Conversion of IZ from integer to real mode
ZL LN(Z) Logarithm of ZI

(10) Additional Variables in MACFUN

c Coefficient in the expression:
wg(A) = CyEi yap ant
CK Coefficient in the expression:

wi (A) = Ci amt

EP Energy edge

K,L1,L2,L3 Energy of each absorption edge
M1,M2,M3,M4, M5, Energy of each absorption edge

N1

NCK1,NK,NL1,NL2, The value of n in the above expression
NL3

NM1 ,NM2 ,NM3 ,NM4, The value of n in the above expression
NM5 ,NN1

(11) Additional Variables in AFIOX

AFOX Atomic fraction of a given element in its
oxide

AWE Atomic weight of a given element

AWO Atomic weight of oxygen

(12) Additional Variables in ABSEDG

C1(4),C2(4),C3(4) Coefficients for computing the absorption edge
energies
w Nab Wavelength of absorption edge

(13) Additional Variables in CHAWV

D1(6) ,D2(6) ,D3(6) ‘ Coefficients for computing the characteristic
line wavelength
w Wavelength of characteristic line

55


3.3B Calculated Compositions of Cement Samples Using Different
Calibration Curves

'SRUN CALCOMP

DATE: 03-OCT-84 TIME: 13:35:08

WHAT TYPE OF UNKNOWNS DO YOU WISH TO ANALYZE :
1-ELEMENT SYSTEM 2-OXIDE SYSTEM 3-FUSED DISK SYSTEM ? 2
DO YOU WANT TO INPUT KNOWN CONCENTRATIONS OF UNANALYZED ELEMENTS (YAN)? ¥
INPUT N6 (NUMBER OF ALL CONSTITUENTS) , N(NUMBER OF ANALYTES) AND.
M(NUMBER OF SPECIMENS TO BE ANALYZED) : 12,8,2
INPUT NAMES OF CONSTITUENTS (XXXXXXXX) (MAX.=8/LINE) =

Lol NA20 GO AL203 S102 P205 S03 K20
CAO TIO2 MN203 FE203
INPUT NAMES OF ANALYTES (XXXXXXXX) (MAX.=8/LINE) =

AL203 S102 S03 K20 CAO TIO2 MN203—-FE203

DO YOU WANT TO INPUT ALPHA COEFFICIENTS BY: 1-DATAFILE 2-KEYBOARD ? 1

INPUT DATAFILE NAME OF ALPHA COEFFICIENTS (XXXXXX.XXX):  OXCEMT.C45

WHAT TYPE OF .STANDARDS ARE AVAILABLE: 1-PURE STANDARDS 2-MULTIELEMENT STANDARDS ? 2
INPUT M1 (NUMBER OF STANDARDS) : 7

INPUT I.D. OF STANDARDS (<=8 CHARACTERS) :

I*1 633

I= 2 634

I=3 635

Is4@ 636

I=5 637

I= 6 638

Ix7 639
INPUT CONCENTRATIONS (WEIGHT FRACTION) OF STANDARDS :

Ie] 633 0075, .0064, .0104, .0378, .2188, .0024,.0220, .0017, .6450, .0024, .0004,.0420
I= 2 634 +0162, .0015, .0330,.0521,.2073, .0010, .0221, 0042, .6258, .0029, .0028, .0284
I= 3 635 +0324, .0007, .0123, .0629, .1841, .0017, .0707, .0045, .5983, .0032, .0009, .0261
I= 4 636 +0116, .0011, .0395, .0302, .2322, .0008, .0231, .0959, .6354, .0018, .0012, .0161
Ie5 637 +0169, 0015, .0067, .0328, .2307, .0024, .0238, .0025, .6504, .002

I= 6 638 +0095, .0013, .0383,.0445,.2148, 0006, .0234, .0059, 620

I=7 639 +0100, .0065, .0126, .0428, .2161, .0008, .0248, .0006, .6576, .003: ' 60008, .0240

INPUT NET INTENSITIES FOLLOWED BY A PERIOD FOR THE ANALYTE ELEMENTS IN STANDARDS AND
ENTER 0.0 FOR EACH UNANALYZED ELEMENT:

Tel 633 3#0.0,277\7\22. , 20360. ,0.0,6017. ,11983.,149102, 77902. ,46., 28869.

I=2 634 #00, 3761. 519134. ,0.0,5913., 31595. , 145546. , 9590. , 329. , 20078.
635 340.0, 4886. ,17241. ,0.0, 19390. ,32989. , 138586. ,10675.,106.,19107.

I= 4 636 3*0.0,2295.,21785. 0.0,6310.,41964. , 146070. ,5504.,128.,1)504.

I=5 637 30.0, 2450. ,22113. ,0.0,6433. ,18455. , 153049. ,6619. ,65. 12363.

Ie 6 638 340.0, 3195.,19743, 2 554425258.

Ix7 639 140. » 20348. ,0.0,6832. ,3794. ,153133.,10041.,91.,16592.,

INPUT I.D. OF SPECIMENS TO BE ANALYZED :

Ie1 BLACK
I= 2 WHITE
INPUT NET INTENSITIES FOR ANALYTES IN SPECIMENS AND
ENTER CONCENTRATIONS (WEIGHT FRACTION) FOR UNANALYZED ELEMENTS:

I=1 BLACK 18475. , .0029,9174. ,65774. ,144509. ,7806.,97., 20489,
Is 2 WHITE 0004, .0262, 3134. , 20372. ,.0009,995! + 82080. , 134125. ,6881.,318., 33818.
DO YOU WANT TO CORRECT INTENSITIES FOR DEAD TIME (YN) 2? ON
DO YOU WANT TO PRINT OUT CALCULATED RELATIVE INTENSITIES OF STANDARDS &

CALCULATED PURE INTENSITIES FROM STANDARDS (YM) 2 ¥

CALCULATED RELATIVE INTENSITIES OF STANDARDS :

97


g00°0- S¥T°O YO0D"O § SST"O SIT°O- B0T°O- TUT°O- %60°0- OzO°U- TI0°0- ¥50°0
vst°O §=G00"O)—TST°O)LZT*O- = GET*O- ZTT"O- vOT°O- #20°0- HIO°O- £€S0°0

g00°0) §=6960°0 E8T"0) YLT°O BYT°O = OYT*O = 840°0 ~- ~OL0°O ~=—0S0°0.

og0"0 §=6000°0 )=— 000") 000" )= 0000) 000°0 §9=—:000°0 = :«000°0

Otz"o §= Oz" «T6T"O = OBT°O)=—t90°0)= 6HO"O = TUO"O

000°0 §=6©000°0 §=6T00°0)=8t0°0)=—Ez0"0 = 690°0

000°0 §=6000°0 = 9T0"O = Tz0°0 = 990°0

000°0 §=6st0°0 §=66T0°0 = €90°0

€to°o §=6LtTO°O §=— 090"

00°00) zz0°0

<to°o

000°0

BbE°O- y6Z°O- GOVE 000°O F¥6"O- LIL°G- sBBy°O- SS9°O- 9T9°0- bIb"O 914°0 LSZ*6E
4LT°O- = TLT°O- =TTT*G- 000°O O0U"U- SZE°O- H6Z°0- 99Z°0- BEZ*O- £90°0- TS0°0- S00°U-
€s9°0 = BES"OSEO"O COU" yGO"O- ENW°< «LETS §«BZETT «=SES*E = ZEETO- «BSH*O- © B6°0-
OW an 9 IN @ ai tw wo A Is N re)
(4a w 6 4 (74 9% Se ve & vt et y

(82) IN *3LKTWNV

Samuoad SE‘SS *xuLaWOdD
Al O°Sh =D BERNE

(WAISKS “IVINGWITA)
NOLINNOS WIOD NI 2SN WOd SINGIDIGI30O WIV JISva

OW Zh
ON ty
2 6%
IN 8
0 lz
ai 9%
NW SZ
DW
Ae
Is oT
TM et
o9

aw

aw

Ww

wiv

76


aaanaaa

10

20

40

REAL FUNCTION MAC(INAM,WV)

THIS SUBROUTINE GENERATES MASS ABSORPTION COEFFICIENTS
AT A GIVEN WAVELENGTH FOR VARIOUS ELEMENTS ACCORDING
TO HEINRICH.

NBS 04-SEP-84

DIMENSION C1 (9) ,C2(9) ,C3(9) ,EC(9) ,CN(4) »R(10)

DIMENSION D1 (4) ,D2(4) ,D3(4)

DATA Cl/-.0397931,-.0339160 ,-.0865397 ,-. 2283427, 1.251788,
8349031, .4422173,.2514096, .2729506/

DATA C2/2. 423000, 2.825262, 3.323153, 4.311724,-7.837999,
~4.149247,-.9792409, 9319132, .6889060/

DATA C3/5.509104,9.035256, 10.25054,12.00253,-11.58026,
-3.338016, 3.153478 ,8.035612,7.424300/

DATA CN(3) ,CN(4)/2.6,2222/

DATA R/1.0,1.0,1.17,1.63,1-0/1.16,1.4,1.621,1.783,1.0/

DATA D1/~.2322294,~.2544711,.2562163,1.359165/

DATA D2/4.070053, 4.769245, 1.15119,-9-492116/

DATA D3/-6. 220746 ,-10.37878 ,-5.684848,18.64081/

CALL ATNUM(INAM, IZ)

E=12.398/W

2I=1Z

ZL*AL0G (ZI)

DO 10 I=1,9

EC(I) EXP (Cl (I) *ZL*ZL+C2(I)*ZL-C3(I))

CONTINUE

CN (1) SEXP (-.0045522*ZL*ZL-.0068535*ZL+1.070181)

CN(2)#2.73

IF(IZ.LT.42)GOTO 20

CN(2)=EXP (=. 1131595*ZL*2L+.8368829*ZL-. 5459687)

CONTINUE

DO 40 M=1,10

IF(M.EQ.10)GOTO 30

IF(E.LT.EC(M) )GOTO 40

MI=4-M/3-/ 4-4/7

C=EXP (D1 (MI) *ZL*ZL+D2 (MI) *ZL#D3 (MI) ) /R(M)

MACSCAWV**CN (MI)

RETURN

CONTINUE
END

36


anaaaa

10

15

40

55

SUBROUTINE SVLSF2(S,K1,N9,N)

THE SUBROUTINE PERFORMS A LEAST-SQUARES FIT FOR

SINGLE VARIABLE.
NBS 24-MAY-1984

DIMENSION S(3) ,X(20) ,¥(20) ,A(3,4) -T(5)
DOUBLE PRECISION S,A,X,¥,T1,T2,T,S1,S2,S3,V,U,Pl

COMMON /LSFSUB/X,Y
N10=N9+1

N11=N9+2

N12=N9*2+1
IF(K1.EQ.1.0R.K1.EQ.2)GOTO 15
T1=0.0
IF(K1.EQ.4)T2=0.0
$1=0.0
IF(K1.EQ.4)S2=0.0
IF(K1.EQ.4)S3=0.0

DO 10 I=1,N

IF(X(I) .EQ.0.0)X(I)=1.0E-20
Tl=T1+X(I) *¥ (I)

IF (K1.EQ.4) T2=T2+X (I) *X(I) *¥(I)
S1=S1+X (I) *X(I)

IF (K1.EQ.4)S2=S2+xX (I) **3
IF (K1.EQ.4)S3=S3+X (I) **4
CONTINUE
IF(K1.EQ.3)S(1)#0.0
IF(K1.EQ.3)S(2)#T1/S1
IF(K1.EQ.3)S(3)=0.0
IF(K1.£Q.3)GOTO 70
N10=N10-1

Nll=N11-1

A(1,1)=S1

A(1,2)=52

A(1,3)=T1

A(2,1)=S2

A(2,2)=S3

A(2,3)=T2

GOTO 55

DO 30 I=1,N12

v=0.0

U=0.0

DO 20 J=1,N

IEF (X(J) -EQ.0.0)X(J)=1.0E-20
Pl=X (J) **(I-1)

UsU+P1

IF(I.GT.N10)GOTO 20
VaV+Y (J) *P1

CONTINUE

T(I)=U

IF(I.GT.N10)GOTO 30
A(I,N11)#V

CONTINUE

LL=0

DO 50 I=1,N10

DO 40 J=1,N10
A(1,J)=T(J+LL)

CONTINUE

LLaLL+1

CONTINUE

CALL SLE(S,A,N10)
IF(K1.EQ.1)S(3)20.0


Update 1 to NBS
Technical Note 1213 - 5/20/85

by
B. Vrebos* and P. A. Pella
Center for Analytical Chemistry
National Bureau of Standards
Gaithersburg, Maryland 20899 U.S.A.

This update includes two modifications of NBSGSC, one of which will
speed up the NBSGSC program considerably when Leroux's table of mass absorp-
tion coefficients are selected. The other modification allows for optional
selection of the aluminum filter over the x-ray tube window which is no
longer automatically selected if this update is implemented. The subroutine

Real Function MU(INAM, WV)-UPDATE 5/20/85 should replace the one on page 37.

——Note—the-changes_in Program_ CALCO-UPDATE 5/20/85, pgs. 17-18, subroutine

ALPHA-UPDATE 5/20/85, pgs. 19-23, and in subroutine APAFD-UPDATE 5/20/85, pes

24-26.

ee

*Guest scientist from the Catholic University of Leuven, Department of
Metallurgy and Materials Engineering, de Croylaan 2, B-3030 Leuven
(Heverlee), Belgium.


TOFAGL o Take-off angle in x-ray tube

WINTHI Window thickness of x-ray tube
Ww A A given x-ray wavelength
WVMIN Amin Short wavelength limit of x-ray tube at a

given voltage

(6) Additional Variables in CTNLIN

F Intermediate variable

HINT IpAd Integral intensity of primary spectrum
PSE, TB Intermediate Variables

R CSC 6 Cosecant of take-off angle in x*ray tube
Zz Conversion of IZ from integer to real mode

(7) Additional Variables in CHALIN

FZ,R,U . Intermediate Variables

RATIO Calculated ratio of intensity of
characteristic line to that of the
corresponding continuum from x-ray tube

(8) Additional Variables in INFTGT

IDTGT(7) Chemical symbols of seven commonly used X*ray
tube targets

(9) Additional Variables in MAC

c Coefficient in the expresion:
: g(a) = cy ® AML
c1(9), C2(9), Coefficients for computing the absorption edge
c3(9) energies
cN(4) ny The value of n in the above expression
D1(4) ,D2( 4) ,D3( 4) Coefficients for computing the necessary value
of C
E Energy of the wavelength WV
ED(9) Eab Energy of each absorption edge
INAM Chemical symbol of a given element
MI 7 Number for selecting the proper coefficient

for canputing C

54


60

70

aaqaaqaaaa

100
120

140

160

180
200

220

240
260

IF(K1.EQ.4)GOTO 60
GOTO 70

N10=N10+1
N1l=N11+1
S(3)=S(2)
S(2)=S(1)

S(1)=0.0

RETURN

END

SUBROUTINE SLE(S,A,N)

THIS SUBROUTINE IS USED TO SOLVE
SIMULTANEOUS LINEAR EQUATIONS

NBS 22-MAY-1984

INTEGER P,Q,0
DIMENSION A(3,4) ,S(4) ,0(3)
DOUBLE PRECISION A,E,S,R

Nl=N+1

DO 220 I=1,N

P=I

@1

E=A(I,1)

DO 120 J=I,N

DO 100 K=l,N

IF (ABS (A(J,K)) «LE.ABS(E))GOTO 100
E=A(J,K)

OK

P=J

CONTINUE

CONTINUE

IF(ABS(E) .GT.1.0E-30)GOTO 140
THE LARGEST ELEMENT IS EQUAL TO ZERO
WRITE (6,260)

STOP

TO CHANGE P-TH ROW WITH I-TH ROW
DO 160 K=1,N1

S(K)=A(I,K)

A(I,K) =A(P,K)

A(P,K)=S(K)

CONTINUE

TO ZERO OUT Q-TH COLUMN

DO 200 J=1,N

IF(J.EQ.I)GOTO 200

IF(A(J,Q) -EQ.0.0)GOTO 200
R=A(J,Q)/A(I,Q)

DO 180 K=1,N1
A(J,K)=A(J,K)-A(I,K)*R
CONTINUE -
CONTINUE

O(I)=0

CONTINUE

DO 240 I=1,N

Q=0(I)

S(Q)=A(I,N1)/A(T,Q)

CONTINUE

RETURN

FORMAT (/1X,"NO UNIQUE SOLUTION')
END

49


gua" uv0"D-QV0"O_ YUU" GuUTUs dU": 0U"O— OUO"—s GNU" UG" = OU" OW cy
€vo°0 §=0p0"0 = LEO"O BEO"O =TEO"O = 8ZO"O_-« SZO"O)=vOU"O = £000 =: 0000 ON Tb
0v0°0 §=uovru ~= youd §=—:000°0 = TO0"U =~ TOO" ~=«G00"0-«OT0"O = BT0°0 9 6%
000°0 0v0°0 000°O v00°d T00°O 800°0 600°0 LT0°0 IN 8%
000°0 §=60u0"0 )§=— 0000 = T00"O = L00°0)= G00"O = 9TU"O 00 4%
000°0 §=©000°0 §=6000°0 §=—L00°0)9 800°0 = STOO ai 9
000°0 §=6000°0)§=y00°0)S L00°0 = ETO"O NW SZ
000°0 §=©s00°0 §=69900°0 _ z10°0 WwW
vouro §=s00°o = TI0"O Ae
000°0 += z00°0 Is oT
T00°0 ‘Te et
000°0 a9 MIV

000°O §= BZU"T- E9Z*O- — LET°O- OZI"O- =ZEO"O- £40°O LET°O _2ZE°O Olb*h E£6L°S 098°¥- ev
000°0 §=000°0 §=—sbO°0- TvO"0- 8f0°O- vEO"O- TEO°O- 8Z0°0- SZ0°0- 900°0- S00°0- 000°0- ww
000°0 §=290°O- G6rZ°O 2HT°O §=OP0"D = LSO"O- « GHT*O- SEZ°U- 9TE°O- L28°O- O98°0- L86°0- Ww
OW an nD IN ive} aa NW wo A Is Ww re)
(42 te 6% 8% [x4 9% 14 ve ee oT ia 9

(2b) OW 2aLATVNY

saquoad Se‘SS ?AULaWOgD
4 0°SR - uD ALIOUVL

(WGLSAS “TWINGWATS)
NOILWNDE VIO NI SSN YOd SINSIDIGIIOD VAdTW SISWa

79


£¢0°0-

096°T

€0¢a4
9%

S00°0-  B8Z°0-  EvZ°0- véZ*0- G6IO"O- TIU°0- 000°0

8¢0°0-

Sso°T

EOCNW
SZ

€SZ°0-  cT@*u-  PGT°0-  ZTO"U- S00"v- 000°0

Tsv°O 4S¥°0 = BGT" bBT*O = b00"0
vLv°U  =vez"0 GOZO G00"0

o€¢°0 = STZ*0 = o0U"0

ygo°O = u00"0

000°0

OyT*O- T8t°U- S8T°U- TEU°0- 9490°0- 000°0

T8L°O
coll

zz

2S°0) = 68E°0)— SET°O. = SS0°0 =: vou"0
Tova 02M €0TS SO¢d ZOTIS
4 6. oT st vt

(v1) ZOTIS *aLxIvNW

Saauogd S€’SS *AuLaWOaD
AN 0°Sh HD tg DuVL

(waLsas aq1xo)

veo"0-
ye0°O-
Ofb°0-
Le °0-
6bE°0-
190°0-
6b0°0-

000°0

TOO*u-

ose*e

coz
eI

T¢€0°o-
€€0°U-
96E°U-
€bEU-
Tee*o-
9s0*O-
Sv0"0-
000°0

000°0

To0*0-

220°

TOTSW
ras

NOILWNOS VIOD NI 3SN YOd SLNAIDIGIIOD VudTV GlUgAH

8¢0°0-
0€0°0-
LYE*O-
LT€*0-
L62°0-
Tso*0-
o0vo"o-
000°0

0v0°O

000°0

TOoO"0-

9SL°T

TOZWN
Aas

800°0-
600°0-
yvr"o-
OzT*O-
Orr"o-
00°0-
900°0-
000°0
000°0
000°0
000°0
000°0
000°0-
Ist°o
ol 2
9

€0%ad 9%
€OZNW SZ
COULL 2
TOTW 02
To? 4 60
€Ol s oT
s0% d ST
zolls oT
cOzTv CT
TOTSW 27
TOCWN TT
colo 9
Ww
Ww

89

weIW


700 FORMAT (1X,' INPUT I.D. OF SPECIMENS TO BE ANALYZED :'/)

710 FORMAT (1X," INPUT NET INTENSITIES FOR ANALYTES IN SPECIMENS AND'/
+3X,'ENTER CONCENTRATIONS (WEIGHT FRACTION) FOR UNANALYZED ELEMENTS:
7)

720 FORMAT(' INPUT NET INTENSITIES OF SPECIMENS TO BE ANALYZED :'/)

END

43


UPDATE 5/20/85

REAL FUNCTION MU (INAM,WV)

Cc
Cc THIS SUBROUTINE GENERATES MASS ABSORPTION COEFFICIENTS AT
Cc A GIVEN WAVELENGTH FOR VARIOUS ELEMENTS ACCORDING TO
Cc LEROUX ALGORITHM. (1979 VERSION).
Cc
c NBS 04-SEP-1984
Cc
IMPLICIT INTEGER (I,J)
IMPLICIT REAL (A-H,K-2Z)
C: LEROUX
. Cc CHANGES TO SPEED UP
~ C STORED IN BUFFER BUFF, ONCE USED, SO MUCH LESS DISK ACCESS

DIMENSION BUFF (20,24) , IBUFF(20)
DATA IBUFF/20*0/,JBUFF/0/
C: LEROUX

CALL ATNUM(INAM, IZ)
E=12.3981/WV
I=JBUFF
IF(I.EQ.0) GOTO 1
IF(I.GT.1) GOTO 4 1
IF(IBUFF(I).EQ.1Z) GOTO 2
GoTo 1

4 CONTINUE
DO 3 I=1,JBUFF
IF(IBUFF(I).EQ.1Z) GOTO 2

3 CONTINUE

l_ CONTINUE —

JBUFF=JBUFF+1
OPEN (UNIT=3, NAME='MACPRM.DAT' , TYPE='OLD' ,ACCESS='DIRECT',
1 MAXREC=94, RECORDSIZE=24)

READ(3'IZ) (BUFF(JBUFF,II) ,II=1, 24)
CLOSE (UNIT=3)
I=JBUFF
IBUFF(I)=1Z

2 CONTINUE
IF(E.GT.BUFF(I,2)) GO TO 30
IF(E.GT.BUFF(I,7)) GO TO 40
IF(E.GT.BUFF(I,9)) GO TO 50
IF(E.GT.BUFF(I,11)) GO TO 60
IF(E.GT.BUFF(I,13)) GO TO 70
IF(E.GT.BUFF(I,15)) GO TO 80
IF(E.GT.BUFF(I,17)) GO TO 90
IF(E.GT.BUFF(I,19)) GO TO 100
IF(E.GT.BUFF(I,21)) GO TO 110
IF(E.LT.BUFF(I,23)) GO TO 120
MU=BUFF(I,1)*BUFF(I,23) *WV**BUFF (I, 24)
GO TO 150

30 IF(IZ.GT.57) GO TO 120
IF(E.LT.BUFF(I,4)) GO TO 35
MU=BUFF(I,1)*BUFP{I, 2) *WV** BUFF(TI,3)

GO TO 150

35 MU=BUFF(I,5) *WV**BUFF(I,6)
GO TO 150

40 MU=BUFF(I,1)*BUFF(I,7) *WV**BUFF(I,8)
Go TO 150

50 MU=BUFF(I,1)*BUFF(I,9) *WV**BUFF(I,10)

37


1.8808
18.8773
1.9675
18.9350
2.0468
18.9909
2.1283
19.0446
2.2065
19.0969
2.3068
19.1472
2.3981
19,1957
2.4912
19.2376
2.6009
19.2812
2.7080
19.3223
2.8196
19.3611
2.9317
19.3979
3.0485
19.4320
3.1737
19.4643
3.2960
19.4943
3.4249
19.5219

2.5750
51.9957
2.5750
53.7685
2.5750
55.6177
2.5750
57.4855,
2.5750
59.3896
2.5750
61.3323
2.5750
63.3138
2.5750
65.3508
2.5750
67.4164
2.5750
69.5250
2.5750
71.6764
2.5750
73.8706
2.5750
76.1110
2.5750
78.3948
2.5750
80.7249
2.5750
83.1023

1.6883
0.0000
1.7677
0.0000
1.8418
0.0000
1.9228
0.0000
2.0058
0.0000
2.0898
0.0000
2.1730
0.0000
2.2635
0.0000
2.3654
0.0000
2.4687
0.0000
2.5749
0.0000
2.6818
0.0000
2.7922
0.0000
2.9087
0.0000
3.0265
0.0000
3.1478
0.0000

2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000

Values - Continued

1.5440
0.0000
1.6113
0.0000
1.6756
0.0000
1.7412

0.0000

1.8118
0.0000
1.8845
0.0000
1.9498
0.0000
2.0236
0.0000
2.1076
0.0000
2.1940
0.0000
2.2810
0.0000
2.3673
0.0000
2.4572
0.0000
2.5507
0.0000
2.6454
0.0000
2.7430
0.0000

2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000

1.2172
8.7080
1.2750
9.0458
1.3325
9.3942
1.3915
9.7513
1.4533
10.1157
1.5146
10.4864
1.5763

10.8704 _

1.6394
11.2707
1.7164
11.6815
1.7932
12.0998
1.8716
12.5267
1.9489
12.9680
2.0308
13.4185
2.1161
13.8799
2.2019
14.3528
2.2911
14.8393

115

2.4000
2.6500
2.4000
2.6500
2.4000
2.6500
2.4000
2.6500
2.4000
2.6500
2.4000
2.6500
2.4000
2.6500
2.4000
2.6500
2.4000
2.6500
2.4000
2.6500
2.4000
2.6500
2.4000
2.6500
2.4000
2.6500
2.4000
2.6500
2.4000
2.6500
2.4000
2.6500

1.1852
8.2516
1.2412
8.5806
1.2949
8.9178
1.3514
9.2643
1.4093
9.6169
1.4677
9.9782
1.5278
10.3486
1.5885
10.7394
1.6617
11.1361
1.7351
11.5440
1.8092
11.9587
1.8829
12.3850
“1.9601
12.8241
2.0404
13.2726
2.1216
13.7336

- 2.2057

14.2087

2.2000
2.6144
2.2000
2.6144
2.2000
2.6144
2.2000
2.6144
2.2000
2.6144
2.2000.
2.6144
2.2000
2.6144
2.2000
2.6144
2.2000
2.6144
2.2000
2.6144
2.2000
2.6144
2.2000
2.6144
2.2000
2.6144
2.2000
2.6144
2.2000
2.6144
2.2000
2.6144

0.3758
7.5140
0.3979
7.7901
0.4163
8.0711
0.4357
8.3579
0.4491
8.6480
0.4717
8.9436
0.4872
9.2441
0.5062
9.5607
0.5381
9.8812
0.5655
10.2068
0.5950
10.5353
0.6250
10.8709
0.6543
11.2152
0.6901
11.5637
0.7220
11.9187
0.7588
12.2839

2.4790
2.3554
2.4720
2.3554
2.4660
2.3554
2.4600
2.3554
2.4540
2.3554
2.4480
2.3554
2.4420
2.3554
2.4360
2.3554
2.4300
2.3554
2.4250
2.3554
2.4190
2.3554
2.4140
2.3554
2.4080
2.3554
2.4030
2.3554
2.3980
2.3554
2.3930
2.3554


———————————— — —— ———

UPDATE 5/20/85

Z=CL(3,d)
CL(3,3) =CL(MM,J)
CL(MM,J)=Z

38 CONTINUE
NAM=LE (3)
IE (3) =IE (MM)
IE (MM) =NAM

40 CONTINUE

IF(ICAS.EQ.1)N5=2
IF(ICAS.EQ.2)N5=3
IF (K15 «EQ. 1)UCO(J)=MU('0 ",CL(J,1))
IF(K15.EQ.2) UCO(J)=MAC('O ",CL(J,1))
DO 50 K=1,N5
IF(K15.EQ.1)UC(J,K)=MU(IE(J) ,CL(Ky1))
TF(K15.£Q.2) UC (J,K) =MAC(IE (J) +CL(K,1))
50 CONTINUE
Il=1
12=4
IF (ICAS.EQ. 2) 11=5
IF(ICAS.EQ.2)12=5
pO 90 I=11,12
sw1=0.0
SWDB1(1)=0.0
C:FILTER KK5=1
C:FILTER IF (IDTUBE.EQ.'CR' -AND. IE(1) -EQ.'CR') KK5=2
C:FILTER IF (IDTUBE.EQ.'CR' .AND. IE (1) -£Q-'MN') KK5=2
___C:FILTER
KK5=KFILT (IT)
C:FILTER
K12=0
DO 60 K=1,ND
IF(XINT(1,K) -GT.CL(1,2))GOTO 70
CALL  DCOLF (SW, SWDB,SWLOT, I, XINT(1,K) /XINT(2/K) ¢K1,KK5,K15,K12)
SW1=SW1+SW
SWDB1(1)=SWDB1(1)+SWDB(1)
60 CONTINUE
70 po 80 K=1,11
IF(XINT1(1,K) -EQ.0.0)GOTO 80
LF(XINT1(1,K) «GT.CL(1,2))GOTO 80
CALL BDCOEF (SW, SWDB, SWLOL, 1,XINT1(1,K) ,XINT1(2/K) ¢K1,/KKS,
+ K15,K12)
sw1=SW1+SW
SWDB 1 (1)=SWDB1(1)+SWDB(1)
80 CONTINUE

G(1)=(SW1/SWDB1(1)-1.0)/C(T,2)
90 CONTINUE

IF(ICAS.EQ.1)GOTO 100
eee tT MN, M) = (G (5) *C(5, 2)-ALFA(M) *C(5-2)-ALFA( MM) *C(5,3))
+ /(C(5,2)*C(543))
DO 95 J=1,4
Z=CL(MM,J)
CL(MM,J)=CL(3,J)
CL(3,J)=2
95 CONTINUE
NAM=IE (MM)

21


UPDATE 5/20/85

10

20

C:FILTER
C:FILTER

WF=0.
CONTINUE

IF(KK2.NE.'Y¥ ')GOTO 5

WRITE (6,192) IDTUBE, VOLT, ITP, ITS, (1Z(I) ,I=1,N)
WRITE (6,194) (IELE(I) ,NE(I) ,NO(I) ,I=1,N)

WRITE (6,196) (CAM(I) ,I=1,N)

WRITE (6,198)

DO 100 I=1,N

CA=CAM (I)

CB=1.0-CA

DO 10 J=1,4

Z=CL(1,d)

CL(1,J3)=CL(I,J)

CL(I,J)=Z

CONTINUE

NAM=IE (1)

IE(1)=IE(I)

IE(I)=NAM

DO 20 J=1,N
IF(K15.EQ.2) GO TO 15

K15 EQUALS 1

uco(J)=MU('O ',CL(J,1))
UCF (J) =WLI*MU('LI',CL(J,1) ) +WB*

1 MU('B ',CL(J,1))+WO*UCO(J)+WF*MU('F ',CL(J,1))

Go TO 18

K15 EQUALS 2

15

18

UCcO(J)=MAC('O ',CL(J,1))
=WLI*MAC(*LI' ,CL(J,1))+WB* _

1 MAC('B ',CL(J,1))+WO*UCO(J)+WF*MAC('F ',CL(J,1))

CONTINUE
SWDB1(J)=0.0
DO 20 K=1,N
IF(K15.EQ.1)UC(J,K)=MU(IE(J) ,CL(K,1)
IF(K15.EQ.2) UC(J,K) =MAC(IE(J) ,CL(K,1))
CONTINUE
sw1=0.0
SWLOI1=0.0
KK5=1
IF (IDTUBE.EQ.'CR'.AND.IE(1) .EQ.'CR') KK5=2

C:FILTER IF (IDTUBE.EQ.'CR' .AND. IE (1) .EQ.'MN") KK5=2
C:FILTER

KK5=KFILT(TI)

C:PILTER

30
40
50

DO 40 K=1,ND

IF(XINT(1,K) .GT.CL(1,2))GOTO 50

CALL BDCOEF(SW,SWDB,SWLOI,1,XINT(1,K) ,XINT(2,K) ,K1,KK5,K15,K12)

SW1=SW1+SW

SWLOI 1=SWLOI1+SWLOI

DO 30 J=2,N

SWDB1(J)=SWDB1(J)+SWDB(J)

CONTINUE

CONTINUE

DO 70 K=1,11

IF(XINT1(1,K) -EQ.0.0)GOTO 70

IF(XINT1(1,K) .GT.CL(1,2))GOTO 70

CALL BDCOEF(SW,SWDB,SWLOI,1,XINT1(1,K) ,XINT1(2,K) ,Kl,KK5,
K15,K12)

25


NBS Technical Note 1213

NBSGSC—A FORTRAN
Program for Quantitative
X-ray Fluorescence Analysis

R. M. Rousseau

Bureau of Standards Geological Survey of Canada
Gaithersburg, MD 20899 Ottawa, Canada

April 1985

wr or
ia wt

‘ :

% é

,
fomay ot ©

US. Department of Commerce
Malcolm Baldrige, Secretary
National Bureau of Standards
Emest Ambler, Director


6L°0T 00°O
ot°o 00°0
fe°ce 00°O
zo0°0 00°0
80°0 00°0
90°0 00°0
Ov-s- = =—00°0
oz*0- = 00°o
Pier 4 ou°o
BE°e 00°0

Lprez = S0°0
eee = G00
€ozad ONAN

00°0 9L°T
00°0 vo"o
00°0 00°O
00°0o 00°0
00°0 To°0
00°u To°0
00°o gert-
00°O €0°0-
00°0 Be
00°0 Tee
00° u°o
00°O 00*°O
00°u 80°0
00°O 30°0
00°0 98°2-
00°0 vo*o-
boro sere
vo°o Over
0o°0 9S°b~
00°0 1T*0-
o°o Oe°s
00°0 U4
cozu COIL

Cisats
oto

gbre
8t°O
8t°S
02°S

L8°eT
6T°0

O24

gg
oc

essa ceded

S8SE 88se

e
€
3

00°0

tos

Nd (N/K) SAMND NOLLVUGITWO JO 3dAL UGHLONY AML OL INWM 04 00

B5es
éécé dddcd dddd

segs

ane

0%

99°T
19°0

oo°T
s9°0
$8°S9
02°S9

“s°T
98°0
vs*ss
89°bS

Tet
76°0
LL°9L
S8°SL

Lor
6£°0
T6"9
ts°9e

cure
Sc°o

.SS°L

Oers

cols

coz

(3) SLinsgd JO NOLLVINEVL

To°Lb
z0°0

00°OST
€0°0
$0°0
zoo

69°I-
To°0-
8s°0
6s°0

eevee
10°0
%0°0
€0°u

00°0
00°0
vo°o
boro
SS*bS~
90°0-
s0°0
"0

OW

6S°Lb
oT°o

v6°9
€b°0
t9°9
0z°9

cerety
Lt°0
ze°o
sT°O

vort
vo°o
68°E
S8°€

00°00T-
vo°o-
00°0
boro
L9°9T-
To°0-
$0°0
y0°O

OCWN

00°O = * waa" Ta OAW

00°O )=— “ua *Saw° AW

00°O)|8=*uua* 13d

00°O §8=—*wua “Sav

9%°O = OE * TOT.

92°0 |= 19°66. W66-SEN

oo°O) | * wu“ 13d

oo°u =" wua “SEW

Z2°O = LOOT

@°O 8=— 19°66. 9L-SaN

oo°O) |= “waa 1a

00°O 86 “uu “Sav

o9°0 | LT* TOT

09°0 = 8L°66. Ls)

oo°O |= “waa 139d

00°0) |= "uaa “Saw

o9°T = 6T°66.

o9°T = LL°66. N-id

oo°o) |= “uaa 13u

00°O = "ued “SW

et°2t 80° tor

LU°2T 12°66 N-X@
Tol ‘WIOL = “ON*dWS

107


00+30000°0 00+390000°0 0+90000°0 00+90000°0 00+30000°0 00+30000°0 00+30000°0

0000°0

nT

0000°0 0000°0
to rau]
b0-372892°0 $SS6°%
O-30Z0€°O SSSe°%
O-4388EE*O SSSL°%
vO-4L8LE°O sss9°2
vO-a8IZp°O SSSS°z
v0-a7899°O Sssp°z
v0-d08Ts* GSSSE°Z
vO-aeTLS°O SSS2°2
vO-9€879°0 SSST°?
vO-aetbe°O $SS0°%
vO-d6L6E°O SSS6°T
v0-3009b °O ssse°T
vO-3TTES*O SSSL°T
v0-302T9°O $SS9°T
O-a9SE0L°0 ssss°T
vo-3€908°0 SSSb°T
vO-4TTZ6°0 SSSE°T
€0-a8p0T°O SSSz°T
€O-aL8TT"O SSST°T
€0-g8EET°O sSS0°T
€0-966bT°O $SS6°0
€0-a99yT°O $Ss8°0
€0-abEsI°O $SSL°0
€0-39861°O sssy°0
€0-3€802°0 $SSS°0
€0-39202°O SSsb°O
€0-aZ6pT°O SSSE°O
VZO° yI (wa

0000°0 .
im

vO-9LbL2°0
vO-aT60E°O
O-g3S9bE °O
bO-3TL8t°O
vO-a80Eb°O
vO-a6LLb°0
vO-ab87S°0
vO-abz8S°0
O-aT0p9"0
bO-d0pSE*O
vO-3L600°0
O-aSELb°O
v0-3S90S°0
$0-a9679°0
vO-ATEZL°O
v0-a€878°0
¥0-aSS06°0
€0-aSLOT°O
€0-39TZT°O
€0-a69€1°O
€0-3zest"o
€0-d00LT*O
€0-a9y8T"O
€0-3z10z"°0
€0-3680¢°0
€0-9EL6T°O
€0-a8S2T"O

VZ0° v1

usy’o

0000°0

val

SSE6°%
ssea°z
SSEL°2
sstorz
SSES°Z
SSEp°e
ssee°e
SSEZ*Z
Sseree
SSt0°%
SSt6°T
ssee°T
SSeL°t
SSE9°T
SSes°t
SStp°t
Sseert
SSEZ*T
GSEI°T
SSEO°T
SSt6°0
SS€B8°0
SSEL°O
ssey9°O
ssts°o
sstv°o
sste°o

0000°0

en

vO-apT8Z°0
vO-av9TE°O
vO-abbSE°O
v0-aSS6£°0
v0-a66£b°O
vO-4LL89°O
0-d68ES°0
b0-3LE6S°0
0-a12S9°0
0-3Sh9E°0
vO-aLT2b°0
vO-SEL89°0
¥0-a279S°0
b0-3EL9°0
vO-dZEbL°O
vO-380S8°0
v0-a¥0L6°0
€0-aZOTT*O
€0-49bZT°O
€0-310vT*O
€0-aS9ST"O
€0-3vELT"O
€U-a868T"O
€0-3S€02°0
€0-38802°0
€0-3006T*O
vO-3S6¥6°0

(w)WaW7 WC0° oT

3 (WA) SSANNOIHL MOGNIM 3a.

NOLINGIMISIG TWULoadS 36NL AVU-X GBLVINITWO

0000°0
ca

SST6°%
sste°z
SSTL°e
Sst9°%
SSTS°2
SSTe°z
SSTE°?
SSTZ°%
SSTT°2
SSTO°Z
SST6°T
Sste°T
SSTL°T
SSI9°T
SSIS°T
SSTb°T
SSTE°T
SSTe°T
SSTT°T
SSIO°T
SST6°0
SST8°0
SSTL°0
Sst9°O
SSTS°O
SSTb°O
SSTE°O

00+30000°0 00+30000°0

0000°0

Ta

vO-aT88z°O
0-dLEZE°O
bO-abz9E°0
bO-azp0v"O
b0-3260b°0
¥0-49L69°0
¥0-396¥S°0
b0-20S09°0
v0-3€099°0
bO-SESLE°O
vO-azbep"O
v0-asTOS°O
vO-ab8LS°0
v0-asS99°0
b0-38f9L°0
v0-3L€48°0
0-48S66°0
€0-30ETI"O
€0-3922T°O
€O-3EEHT°O
€0-a66ST"O
€0-9892T°O
€0-46261°O
€o-ass0z°0
€0-98L02°0
€0-3708T"O
vO-a8TyS°O

(w) VOW W20" oI

0000°0
wi

$s68°%
$S6L°%
SS69°%
SS6S°2
SS6°2
SS6E°Z
ss62°%
SS6T°%
ss60°2
$S66°T
ss68°T
SS6L°T
Ss69°T
SS6S°T
‘ss6p°T
SS6E°T
$562°T
SS6T°T
SS60°T
$S66°O
sS68°0
$S64°0
$S69°0
$S6S°0

SS6E°O
$S62°0

Wwvaw1

O°9% 3 (3TUNGG) TION 430-FAVL
u°sh AN Ww *199uWL San Avu-X

WALTUOSTY SEN ONISN.

20-3LZ9€ °O
osgo°z

v0-a8192°0
vO-d0S62°0
bO-aZTEE*O
$0-aSOLE°O

vO-3T9TS°O
¥0-40S6S°O.
0-ae¥89°0
0-388L°O

¥0-a2268°0
t0-azz0T°O
€0-a8STT"O
€0-3L0CT"O
€0-399bT°O
€0-3€E9T°O
€0-aT0BT"o

€0-38S02"°0
€0-d699T"O
00+30000°0

W20° oI

T0-dESEZ"O
016z°2

ww

$SL6°%
SSL8°%
SSLL°2
Ssi9°%
ssis°%
SSLp°z
SSLE°Z
ssez°e
SSLT°S
SSLO°Z
SSL6°T
SSLB°T
SSLe°T
SSZ9°T
ssis°T
SSce°t
SSLE°T
sslz°T
SSLT°T
SsLo°T
$SL6°0
ss28°0
SSLL°0
$S29°0
Ssis*0
SSLb°0
SSLe°O
$S12°0

(woo

67


CLOI

UCF(J)

BETA(I)

CF

DELTA(I)

DEN, PHIF, SBETA
SDELTA,T1, 72,73
u(I)

UE,UEI,UEJ
UF

uo

W
Wi
we

CINT

DATTGT(2, 11)

DFSP( 6)
EDGE
IDLINE(4)
K11

KK11
ND

RLA

CLor

upCA)

(4)

By (Ak)

645 Ok)

Hy Ak)

uPAR)

Ho (AK)

Kk
Ip (Ay) dA

(5)

Loss of ignition treated as a concentration
Ratio of sample to fused disk weight
Calculated relative intensity

Mass absorption coefficient of flux at
wavelength A

Additional Variables in BDCOEF

Intermediate variables
Ratio of flux to fused disk weight

Intermediate variables
Intermediate variables

Intermediate variables

Mass absorption coefficient of element I at
wavelength A,

Intermediate variables

Mass absorption coefficient of flux at
wavelength A,

Mass absorption coefficient of oxygen at
wavelength Ay,

Intermediate variable
Wavelength of primary spectrum

Integral intensity of primary spectrum at
wavelength A,

Additional Variables in TUBDAT

Calculated intensity of characteristic line
emitted from X-ray tube with NBS algorithm.

Wavelength and intensity ratio of each
L~-series characteristic line to that of Ly,
line

Datafile name of x=ray tube spectrum
Ending wavelength of primary spectrum
Symbols of characteristic lines Ky, Kg, Ly» Lg

Optional swtich for choosing: (1) calculated
or (2) measured primary spectrum

Optional switch for printing out data of
primary spectrum used

Number of wavelength intervals (.02A) between
wavelengths WVMIN and EDGE

Calculated intensity of Lg line emitted fran
x"ray tube

53


00+30000°0 00+90000°0 ud+a0000"0 o0+av000"0 au+g0000"0

0000°0 00u0°0 0000°0
ei €o1 71
bO-ap9Lz°0
b0-ap9te*O
b0-3609¢°0
b0-az0Tv"o
90-a990°0
bu-abbzS°0
0-3668S°0
vO-avTs9"0 998z°z
vO-3€6£2°0 998T°z
b0-a8tze8"0 9980°%
v0-aIZsE°0 9986°T
vO-aSSTb"O 998e°T
b0-3€16°O 998L°T
vO-a6T8S"0 99e9°T
60-a0689°0 = ysaS°T
bO-a8LT8°0 = 998R°T
¥0-30696"°0 998E°T
€O-aypTT*O 998z°T
€0-azseT°o 99eT°T
€0-a06ST°O 9980°T
€0-a0yst"0 = 99860
Co-asytz"0 = 9988"
€0-320S7"0 998L°0
€0-acyez"0 suguru
€0-apbze°O 998s°0
€0-a96Se°0 999b°0
€O-3EELE"0 = -yyBE*O
€0-a6s0E Oo 9982°0
NCO" eI (w)vaw1

sUSTM NOX og

0000°0
m1

vO-a0082°0
b0-3602E°0
bO-avoce*o
¥0-aL0z0"°0
v0-aT9Lb°0
¥0-g0LES"0
0-aLE09°0
0-3S929°0
%0-39SS2°0
v0-a680C°O
O-a6E9E°0
v0-3967b"°0
v0-az80S*0
v0-g0z09"0
bO-ayETL*O
b0-aT9¥8"0
€0-3ZU0T*O
€0-aS8IT°O
€0-3L6ET°O
€0-a1v9T "0
t0-36T6T°O
€0-a0£2z-u
€0-3ELS7°0
€0-a262°0
€0-a8Tee oO
€0-a009t°O
€0-3z02E “0
€0-a9suz "oO

ZO" I

osv'o

0000°0 0v00°0 0000°0
va ta can

9996°Z = O-3GTEZ"0. 996°%
9998°% ~— vO-a9ECE°O 99b8°%
9994°% 0-3008E "0 99bL°Z
9999°Z = vO-aETED"O 9999°%
9998" yO-aeLen°0 g9ps°z
9990°% =~ ¥0-3G60S"0 9900"
y99°Z = PO-ABLTY"O 99nE°%
999¢°% = wO-98T6Y"O 99be°%
9S9T°% — pO-azzLL°0 99bT°%
9990°Z = WO-AIGTE*O. 990°
9996°T = O-3I9LE°0 9906°T
9998°T — ¥0-3Zbbb"0 99b8°T
999L°T — O-aeSzS°0)—_yobL"T
v0-382z9°0 99r9°T
bO-ae8EL°0 990S°T
bvO-aes28°0 990b°T
€0-aLE0I°O g9pe'T
€0-aszzT°o 99be°T
€O-appoT°O 990T°T
9990°T = €0-av69T°O 9990°T
9996°0 €0-a8L6T"O 9966°0
9998°0 = €0-3967Z"0 99880.
9994°0 —£0-3S99Z°0 9962°0
gy9y°0 = EO-aBTUE"O = 99890
y9¥S°O = £0-306EE°0 990S°0
99980 = £0-aS89t"0 996b"0
999€°0 = €0-avEYE*O 999E°0
999%°0 = €0-37ZL0z°0 9992°0

(WOW W20%eE (vow

€°0

000°L

SuoTITPUCD xNTZ 3eUM

0000°0
ta

0-36662°0
v0-aSzpE°O
0-36686°O
¥0-a2Zpb"0
v0-38660 "0
0-g0E9S"0
¥0-aIze9°0
O-3EL0L°0
0-31682°0
¥O-dL6zE°O
bO-aesec*O
0-a6SP°O
vO-aLES"O
0-atb¥9°0
0-a6£92°0
¥0-3SS06°0
€0-aZL0T°0
€0-a99zT°0
€0-a16rI°O
CO-aBHLT°O
€0-36£07°0
€0-ac9ez"0
€0-381LZ"0
€0-a€60€°O
€0-36SPE°0
€0-a8tZe Oo
€O-a8Ise°o
€0-36221°0

WZ0* oI

t4T1 JO sweup
000°S = *Lonazt1 Jo sweup
saTdwesg Jo sueup
2 é208TT + LonaztT + etdwes - €

ATI + LOnaZt1 + etdues - 2
LOnaztT + etdwes - 1

00+90000°0 04+30000°0 00+30000°0 00+g0000°0

0000°0
Ww

70-a990S°0
Ose0°%

y0-g080E *O
bO-ayTSE°O
§0-3666E°O
bO-JEES°O
0-30 TS*O
O-ae9S°0
0-39999°0
v0-aZEZL°0
¥0-3£908°0
¥0-3L0%6°0
O-a6TOR"O
vO-aTSLe°O
0-3Sz79S°0
0-39999°0
v0-av062L°0
bO-39£6°0
€0-360TT*O
€0-360€T°O
€0-309ST*O
€0-av0st°o
€0-3101Z"*0
€0-azevz"0
€0-az6Lz°0
€0-a69TC"0
€0-aszse°O
€0-a9€LE°0
€0-aveee“o
00+40000°0

(w)vaWe WZ0° I

+ (WASSANNOTHL MOGNIM 3a O°yz ? (3THOGG)TIONY 4g0-BIVL
0°09 FAM =D S499UVL SEAL. AVU-X

WALIHODTY SON ONISN

NOLINGIMISIO ‘TWwuloads 3a AVE-x GalwingIVvo

TO-aL9T€*O
ot6z*z

9902°0
(Ww) an

102


90
100

110

190

194
196
198
200
210
220

230

IF(I.EQ.1)GOTO 100
DO 90 J=2,I

JJ=J-1

22A2(I,JJ)
A2(I,JJ)#A2(I,J)
A2(I,J)=Z
CONTINUE

CONTINUE

IF(KK2.NE.'Y ')RETURN
DO 110 I=1,N
WRITE (6,200)1I2(1) ,TELE(I) ,NE(I) ,NO(I) ,Al(I,1),(A2(I,J)-)J=1,N)
CONTINUE
IF(K12.EQ.1)WRITE (6,210)GS,GF
IF(K12.EQ.2) WRITE (6,220)GS,GF,GL
IF (K12.EQ.3) WRITE (6, 230)GS,GF,GL
RETURN
FORMAT (1X,'WHAT FLUX CONDITIONS DO YOU WISH :'/
+ 3X,'1-SAMPLE + LI2B407',/
+ 3X,'2-SAMPLE + L12B407 + LIF',/
+ 3X,'3-SAMPLE + LI2B407 + LIBO2 ? ',$)
FORMAT (1H1,//36X,'MODIFIED ALPHA COEFFICIENTS FOR USE IN COLA EQ
tUATION! //57X," (FUSED DISK SYSTEM)',////,
SSX," TARGET: ',A2,2X,F5.1,' KV',/
+ 55X,'GEOMETRY: ',12,',',12,' DEGREES',///,
+ 58X,'MATRIX CONSTITUENTS ' //18X,12(6X,12))
FORMAT (/15X, 'LOI' , 3X, 12(1X,A2,11,1HO,I1,2X))
FORMAT (/1X,'MEAN CONC.',2X,' 25.00 ',12(2PF6.2,2X))
FORMAT (/3X, 'ANALYTE')
FORMAT (/2X, 12, 2X,A2,11,1HO,11,13F8.3)
FORMAT (///1X,'* FUSED DISK :',F6.4,'G SAMPLE +',F6.4,'G LI2B407")
FORMAT(///' * FUSED DISK :',F6.4,'G SAMPLE +',F6.4,'G LI2B407 +',
+F6.4,'G LIF')
FORMAT (///1X,'* FUSED DISK :',F6.4,'G SAMPLE +',F6.4,'G LI2B407',
+F6.4,'LIBO2')
END

26


IF (XINT(1,K) «GT.CL(1,2))GOTO 70 .
CALL BDCOEF (SW,SWDB,SWLOI,I,XINT(1,K) ,XINT(2,K) »K1,KK5,K15,K12)

SW1=SW1+SW

SWDB1 (1)=SWDB1 (1)+SWDB(1)
60 CONTINUE
70 DO 80 Kel,11

IF (XINT1(1,K) -£Q.0.0)GOTO 80
IF(XINT1(1,K) .GT.CL(1,2) )GOTO 80
CALL BDCOEF (SW,SWDB,SWLOI,I,XINT1(1,K) ,XINT1(2,K) ,K1,KK5,
+ K15,K12)
SW1=SW1+SW
‘SWDB 1 (1)=SWDB1 (1)+SWDB (1)
80 CONTINUE

G(I)=(SW1/SWDB1(1)—1.0)/C(I,2)
90 CONTINUE

IF(ICAS.EQ.1)GOTO 100
ALJK (II, MM,M) = (G(S) *C(5,2)-ALFA(M) *C(5-2)-ALFA (MM) *C(5,3))
+ /(C(5,2)*C(5,3))

DO 95 J=l,4
2=CL(MM,J)
CL (M1,3)=CL (3,5)
CL(3,J)=2

95 CONTINUE
NAM=IE (MM)
TE (MM) = IE (3)
TE(3)=NAM

100 CONTINUE

c

IF (ICAS.EQ.2)GOTO 110
IF(K1.EQ.1)Al (IZ ,M)=G (3)
TE CRL-EQ2)AL (IL 4M) 0 (G(2)*C(242)-G(2) #C(142))/(C(242)~
+ C(1,2))
IF (K1.EQ.1)A2(II,M)#G(1)-G(3)
IF(K1.EQ.2)A2 (II ,M)= (G(2)-G(1)) /(C(2,2) -C(1,2))
IF(K1.EQ.1)A3(IZ,M)=(G(1)-G(2))/(G(2)-G(3))-1.0
IF(K1.EQ.2)A3 (II ,M)=0.0
ALFA(M)=G (4)
110 CONTINUE
IF (ICAS.EQ.2)GOTO 120
IF(N.EQ.2)GOTO 120
DO 118 I=3,N
TsI-1
DO 115 Jel,4
2=CL(11,J)
CL(I1,J)=CL(I,J)
CL(I,J)=2
us CONTINUE
NAMSIE(I1)
IE(11)=IE (I)
IE(I)=NAM -
1s CONTINUE
ICAS=ICAS+1
GOTO 30

120 IF(II.EQ.1)GOTO 150
DO 140 J=2,Ir
JJaJ-1
ZeAl(II,JJ)
Al (II,JJ)=Al (II,J)
Al(II,J)=Z
Z#A2(II,JJ)
A2(II,JJ)"A2(1I,J)

21


440°0
ost*z
6ce'r
‘ses"0
weprez
€ozaa

$000°0
s0z0°o

vozo"o

‘%000°0
tutu"

82Z00°0

‘$0S0°0
s0T0°0

40L00°0

sororo
‘eoGu"o

zv000"0

‘soso°o
SOET*O

9000 *0*°0*0"0* Ta00"*HIZ0**0zS0°*0°0*Z000° ‘azS9° *as0z**zZ000°*0z90° “900°

*£000° SR CLR

soe" 126S°*b000° ‘y000"*o9TO"

42EZ° “000° *0°0' THz" *LT00* *L0U0" ‘0°0' E100" “oe Lo" “eses**Tt00"*9000°*LtZt*

VG6-SEN=°ON*dWS

N-KG="ON"dIS

= SNIWID9dS 30 SNOTLVLINIONOO NMONM USING
& é (N/A) SNGWIOGdS SS3HL YOd SUMIVA NMONN XISNOIARId UIHLO HLIM SLINSTY SGHL BAVdWOD QL HSIM NOK OO

00070 G00" TOO SyI"z © 94E°S YOU'D Oz" TS8*SY TeB"OZ ShO"O EC9°9 O9z*U OE*TOT W66-SGN
000°0 = 000°O—YLT*Z OFZ*OONS*E §©—000°0 LO") ObS*SS ESBTLE BLS"O BIE"O O%Z°0 HL°OUT —9L-SAN
Osoa —000"0T8O"U T¥L"UYEBTY © 000"O»:OTO"D--ZLL"9L OTB*ZE Shoo BBE 009°0 LI*TOT co)
OTO"O §—Gyurd «= EYE". = THO"O_HIT*D © 000°O §— 60" ETETSE EOP°SS YOTO O00"O 009"T GI*66 N-wa
soo G00" OUE"Z = LT" USO"O = DDU"O-OET"OzSS*L © BBO"SS BhOO EHUD OLT“ZT BU" LOT N-xe
ONH §€02D = ZOIL ND (OZ ECS SORES ZOIS. EZTV «OO COZWNCIO: THIOL “ONS
(8) sLinsay 40 NOTLVInavL
NOE*TOT = THIOL
tuL00 = cozaa
ON 8G00°0 =» EZ 8TTO“O ZOLL aspt-z Gv 89LE°S 0z¥ 8000°0 €0s
Sotd 8ISe°s9  ZOIS btes*O¢ §=—EOZ TV ASHO"O Oow 8€69°9 OzWN 809z"0 loms> £1
€6000°0 | ¢ozad Zt000°0§= 01k.
Ovo zz0su"o Oz 9ag6s*0 —ZOIS Sotoz"y ~—-eOzTV E0000 oN S8Z790°O = OZWN=V66-S@N="ON*dWS
pecoot <TeL0L
sost'z = c0zad
ONN 8000"0 = COZ BULT“Z ZOlL e0Ez*0 Ov t0ys"T ‘Oz¥ $000°0 €os
SOzd WuvS"SS —ZOIS BESB*LE EZTV NALS" OW SBTE*O OZWN 80zz"0 Toles € #1
469z0°0 = Oza T2SZ0°0 OTL.
Ovo ozpTo"o OH uyosy"O = ZOIS LtELE*O §=—-EOZTV Z9S00°0 OW 66Z00°0 = OZWN=4_— YL -SAN="ON*
MAI°TOT ~1viOL
wece't. = cOzad
ONW 8000°0 = E0ZLD 8800 ZOIL et¥e°0 Ov t9E8"F 0z¥ ¥000°0 €0s
Sod WZLL"9L = ZOIS AOLB*ZE OZ TW ASHU"O Oow 8ag9°€ OzwN 8009°0 Toso £1
zeyto"o = €0zaa TG000"D = ZOIL
” Ovo vespute Ozu 6vIzZL"0 = zoTS OSszt"0 © cozTv E0000 Cow O¥YEO"O = OZ WN HO=*ON*dWS
W166 =TWLOL
wses"o— €0zaa
ONW 8OpO"O =» EOZD NEVE’ ZOIL stporu ov Wwito Ozw 8000°0 fos
SOzd NET6"YE = ZOIS AEOV"RS §=— EZTV BYYU'O 09H $000°0 OzwN 8009°T 1oiso € #1
zsuuo"o = €ozag zz9T0"O§=— ZOIL
‘ova gu1U0"0 O2N GStuE*o = ZOIS yyzestu = ORT EvuOUU 09% 00000°0 = OZ Nett Nede"0N "dis
‘8a0°TOT =TVLOL
Wwevez—gOzaE
nw 8ouuu = OZ BYE *z Olt suzt*o Ov 8us0°0 Oz 80u0°o €0s
s0zd 82s" zors #a0°Ss = EOZTV BayO'O OW t6p0"O O2WN AOLT*ZT Tore 6 #1

106


aanaaaaa

aaaaaaa

10

100

SUBROUTINE CTNLIN(HINT,WV)

THIS SUBROUTINE CALCULATES THE CONTINUUM INTENSITY OF THE X-RAY
TUBE SPECTRUM AT A GIVEN WAVELENGTH USING THE NBS ALGORITHM.
(UNIT: PHOTONS/A/E/STRD)

NBS 04-SEP-1984

REAL MAC,MU

COMMON K15

COMMON /TUBE2/IDTUBE, VOLT, TOFAGL,WINTHI

WVMINS12.398/VOLT

TS=.185*WINTHI

R=.0174533*TOFAGL

CALL ATNUM(IDTUBE, IZ)

Z=FLOAT (IZ)

IF (K15.EQ. 1) PSE=MU (IDTUBE, WV) * (WWMIN®* (1.65) -WV** (-1.65))/

+ SIN(R)

IF(K15.EQ.2) PSE=MAC ( IDTUBE WV) * (WWMIN®* (~1.65) -WV** (~1.65))/

+ SIN(R)

* Fel O+PSE*(1.0+ er miei #8 (-1))/(1.0+2. 56E3*WVMIN

+ *Z#8(-2)) /(.25*PSE+1.0E4

HINT=2. 72E-6*2* (WV/WVMIN~1.0) *WV*# (-2) #E®* (-2)#

+ EXP(-.35*TB*WV**2.86)

RETURN
END

SUBROUTINE INFIGT(K1, IDLINE, DATIGT, IDTUBE)

THE SUBROUTINE PROVIDES THE DATA NEEDED
FOR CALCULATING CHARACTERISTIC LINE INTENSITY
OF AN X-RAY TUBE SPECTRUM.

NBS 04-SEP~1984

DIMENSION IDLINE(4) , IDTGT(7) ,DATIGT (2,11)

DATA IDIGT/*SC','CR',"MO',"RH', "AG, "W ',"AUT/
Kl=2

IF (IDTUBE.EQ. 'SC* .OR. IDTUBE.EQ. ‘CR’ .OR. IDTUBE.EQ. 'MO') Kl=1
IF(K1.EQ.1) IDLINE(3)=* °
IF(K1.EQ.1)IDLINE(4)=" *

IF(IDTUBE.EQ.'W '.OR. IDTUBE.EQ. 'AU') Kl=3
IF(K1.EQ.3)IDLINE(1)='  *

IF(K1.EQ.3) IDLINE(2)=* -*

DO 10 I=1,7

IF (IDTUBE.EQ.IDIGT(I))GOTO 20

CONTINUE

WRITE (6,100)
STOP

TleI

Nl=2*I1-1

N2=N1+1

OPEN (UNIT=3 ,NAME="TGTWR. DAT’ , TYPE=' OLD’ ,ACCESS="DIRECT',
+ MAXREO=14, RECORDSIZE#11)

READ(3'N1) (DATIGT(1,J) ,J#1,11)

READ(3'N2) (DATTGT(2,J) ,J#1,11)

CLOSE (UNIT=3)

RETURN

FORMAT(/1X,"ERRER: THE NAME OF X-RAY TUBE TARGET YOU INPUT IS NO
+T CORRECT !'/3X,'IT SHOULD BE ONE OF THE SEVEN TARGETS: SC, CR, MO
+, RH, AG, W& AU.')

END


Contents of the Permanent Datafile Called 'TGTWR.DAT'

3.0320 2.7800 0.0000 0.0000 0.0000 0.0000 9.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.9000 9.0000 0.0000
2.2910 2.0850 0.0000 9.0000 0.0000 0.0000 0.0000 9.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.9000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
0.7100 0.6320 0.0000 0.0000 0.0000 0.0000 9.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
0.6140 0.5460 4.5970 4.3740 4.1300 4.2530 4.2890 3.9440 0.0000 9.0000 0.0000
0.0000 0.0000 1.0000 0.5400 0.1150 0.1070 0.0700 0.0680 0.0000 0.0000 0.0000
0.5610 0.4970 4.1540 3.9350 3.7030 3.8340 3.8700 3.5230 0.0000 0.0000 0.0000
0.0000 0.0000 1.0000 0.5270 0.1880 0.0840 0.0520 0.1070 0.0000 0.0000, 0.0000
0.0000 0.0000 1.4760 1.2820 1.2450 1.2630 1.3020 1.0980 1.0680 1.0620 1.6780
0.0000 0.0000 1.0000 0.4660 0.1790 0.0740 0.0470 0.0810 0.0130 0.0180 0.0290
0.0000 0.0000 1.2770 1.0830 1.0700 1.0680 1.1060 0.9270 0.9050 0.8980 1.4600

0.0000 0.0000 1.0000 0.4580 0.2060 0.0740 0.0470 0.0990 0.0100 0.0200 0.0310

‘3.8. GOVERNMENT PRINTING OFFICE: 1985 461 105 20084

117


RS1(M1,1I) Ri
S(3)

x(20)

x¥(20)

CXT(M, I)
DIF(M,I) ALR.

DIFR(M,I) E.R.
EA(I)
ER(I)

TOTT(M)

Program
CREMAC

RECREMAC

WRITGT

REWRTTGT

Calculated relative intensity of standards
Coefficients of least squares fit

Independent variables in least squares fit

Dependent variables in least squares fit

Additional Variables in GETERR

True concentration of unknowns

Absolute error of calculated concentration for

unknowns

Relative error of calculated concentration for

unknowns

Average of absolute error
concentration for unknown

Average of relative error
concentration for unknown

Sum of true concentration

of calculated

of calculated

for unknown

2.3 Description of Permanent Datafiles

Function

Create the data-
file of
MACPRM.DAT

Print out the
contents of the
datafile
MACPRM.DAT

Create the data-
file of
TGTWR .DAT

Print out the
contents of the
datafile

TGTWR .DAT

Remarks

Storing the parameters needed for computing
mass absorption coefficients with the Leroux
algorithm .

For user to check if the contents of the
datafile MACPRM.DAT are correct

Storing the wavelengths and intensity ratios
of L-series lines to La line for seven types
of x-ray tube targets

For user to check if the contents of the
datafile TGTWR.DAT are correct

59


0.7702
17.5165
0.8256
17.6481
0.8838
17.7775
0.9437
17.9048
1.0060
18.0291
1.0721
18.1326
1.1400
18.2062
1.2171
18.2781
1.2928
18.3506
1.3613
18.4209
1.4346
18.4913
1.5110
18.5613
1.5753
18.6282
1.6540
18.6932
1.7228
18.7564
1.8000
18.8179

2.6000
27.9399
2.6000
29.2001
2.6000
30.4912
2.6000
31.8138
2.6000
33.1694
2.6000

34.5614 .

2.6000
35.9846
2.6000
37.4406
2.6000
38.9246
2.6000
40.4430
2.6000
41.9906
2.6000
43.5689
2.6000
45.1840
2.5750
46.8342
2.5750
48.5190
2.5750
50.2391

0.0000
2.8500
0.0000
2.8500
0.0000
2.8500
0.0000
2.8500
0.8697
2.8500
0.9305,
2.8500
0.9990
2.8500
1.0650
2.8500
1.1367
2.8500
1.2044
0.0000
1.2728
0.0000
1.3374
0.0000
1.4028
0.0000
1.4714
0.0000
1.5407
0.0000
1.6139
0.0000

0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
2.4471
0.0000
2.4471
9.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000

Values - Continued

9.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.9976
0.0000
1.0622
0.0000
1.1234
0.0000
1.1854
0.0000
1.2422
0.0000
1.2974
0.0000
1.3569
0.0000
1.4198
0.0000
1.4806
0.0000

0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4472
0.0000
2.4471
0.0000
2.4471
0.0000

0.0000
4.2375,
0.0000
4.4647
.
0.0000
4.6983
0.0000
4.9392
0.0000
5.188)
0.0000
5.4528
0.0000
5.7143
0.0000
5.9888
0.7961
6.2663
0.8485
6.5488
0.9013
6.8348
0.9511
7.1260
0.9999
7.4279
1.0515
7.7368
1.1060
8.0520
1.1606
8.3756

114

0.0000
2.6980
9.0000
2.6900
0.0000
2.6820
0.0000
2.6740
0.0000
2.6660
0.0000
2.6580
0.0000
2.6500
0.0000
2.6500
2.4000
2.6500
2.4000
2.6500
2.4000
2.6500
2.4000
2.6500
2.4000
2.6500
2.4000
2.6500
2.4000
2.6500
2.4000
2.6500

9.0000
3.9380
0.0000
4.1561
0.0000
4.3804
0.0000
4.6120
0.0000
4.8521
0.0000
5.1037
0.0000
5.3594
0.0000
5.6236
0.0000
5.8906
0.0000
6.1642
0.0000
6.4404
0.0000
6.7215
0.0000
7.0128
1.0269
7.3118
1.0802
7.6171
1.1309
7.9303

0.0000
2.6144
0.0000
2.6144
0.0000
2.6144
0.0000
2.6144
0.0000
2.6144
0.0000
2.6144
0.0000
2.6144
0.0000
2.6144
0.0000
2.6144
0.0000
2.6144
0.0000
2.6144
0.0000
2.6144
0.0000
2.6144
2.2000
2.6144
2.2000
2.6144
2.2000
2.6144

0.0000
3.7301
0.0000
3.9288
0.0000
4.1322
0.0000
4.3414
0.0000
4.5571
0.0000
4.7822
0.0000
5.0119
0.0000
5.2470
0.0000
5.4827
0.0000
5.7234
0.0000
5.9643
0.0000
6.2079
0.0000
6.4593
0.3300
6.7162
0.3457
6.9769
0.3602
7.2428

0.0000
2.3554
0.0000
2.3554
0.0000
2.3554
0.0000
2.3554
0.0000
2.3554
0.0000
2.3554
0.0000
2.3554
0.0000
2.3554
0.0000
2.3554
0.0000
2.3554
0.0000
2.3554
0.0000
2.3554
0.0000
2.3554
2.4980
2.3554
2.4920
2.3554
2.4850
2.3554


800°0- O00°O § BET°O ZET°O- HZE°O- LIT*O- G6OT*O- TOT"O- €20°0- ETO°O-

000°O = =9ET"O —SHT*O- LET"O- G6ZT°O- OZT*O- ZTT*O- Lz0°0- LTO°O-

000°0 =©000°0 §=— 0000) 0000 =: U0" = W000 = (000°0 §=— u00"0

66T°O §=T6T°O §«ZeT"O «=2LT°O = T9T°O = zS0°0 = O00

000°0 §=6000°0 §=©000°O §=00°0 610°0 pz0°0

000°0 §=000°0 )§=6t00"°0 = BTO"O = Zz0°0

000°0 §=©000°0 = 9T0"0 = 0z0°0

000°0 «=Ft0°O = 8TO"O

€to°o = 9T0°"

000°0

bl2°O- [2Z°0- 000°O z298°0- HIL*U- yBy"O- HS9°0- LI9*O- ELS°U- 995°0 606°O
SST°O- TST*O- O0U"O OOU"U- YOE"O- BLZ°O- ZSZ*0- LZZ°0- HOZ*O- YSU°0- vbOO-
Ssb°O = 2SE°0 = COUN ZGO"O- waETZ GLO°Z = BBL*T EIS*E ESz°T 60v"0- UzS‘"0~
OW wa Ley IN @ aa NA wo A Is Ww
ao we 6 8 “& bo L4 ra ix4 vt et

(62) 09 23LKTW

SdquOgI SE‘SS *AMLIWOGD
AN 0°SH «=D BLGOWWL

(GISKS ‘TwLNawaTa)
NOLLVNDE W109 NI 3SN Wd SINGIDI4gI09 VidIW OISVa

6¥0°0
870°0
000°0
T00°0
990°0
¥90°0
190°0
8s0°0
9S0°0
6t0°0
st0°0
000°0
zL9°6t
voo"0-
S6°0-
3
9

OW ZF
aN tb
M2 62
IN 8%
0 4%
a 9%
NW SZ
ww
Ae
Is oT
Wet
a9
aw
ww

Ww

welv

77


aaaaaaa

aaaaaaaaa

t+eeteeeete

+e eee

SUBROUTINE ABSEDG (WV, IELE, ISR)

THIS SUBROUTINE CALCULATES THE WAVELENGTH OF AN ABSORPTION
EDGE FROM THE CHARACTERISTIC LINE WAVELENGTH.
THIS EMPIRICAL FIT IS NOT RECOMMENDED BELOW 1 KEV.

NBS 04-SEP-1984

DIMENSION C1 (3) ,C2(3) ,C3(3)

DATA C1/-.0397931,-. 0865397 ,-.2283427/

DATA C2/2. 423000, 3.323153,4.311724/

DATA C3/5.509104, 10. 25054, 12.00253/

CALL ATNUM(IELE, IZ)

ZI=IZ

ZL*ALOG (ZI)

IE(ISR.EQ.1.OR. ISR. EQ. 2) W=EXP(C] (1) *ZL*ZL+C2 (1) *2L-C3(1) )
IF (ISR.EQ. 3. OR. ISR.EQ.5) WW=EXP(Cl (3) *ZL*ZL+C2 (3) *2L-C3 (3))
IF (ISR. EQ. 4) W=EXP (Cl (2) *ZL*ZL+C2(2) *ZL-C3(2))
WV=12.398/WV

RETURN

END

SUBROUTINE JUMRAT (JUMP, IELE, ISR)

THIS SUBROUTINE PROVIDES JUMP RATIOS (1-1/R)

FOR K OR L III ABSORPTION EDGES.

FROM REFERENCE: E.P.BERTIN, 'PRINCIPLES & PRACTICE OF
X-RAY SPECTROMETRIC ANALYSIS’ SECOND
EDITION, 1975. P977-979

NBS 04-SEP-1984

DIMENSION JK (94) ,JL(94)

REAL JK,JL,JUMP

DATA JK/3*1.0, 970, .965, «959, 953, .948, «943, .937, «932, +927,
-921,.916,.911,.903,.895,.899,.887,.890,.883,.883,.886,
-886, 884, .878, .881, .873, .874, 868, .865,.862,.861,.855,
-857,.858,.854,.858,.854,.852,.860,.856,.853,.852,.847,
+856, .848, .846, .840, .845, 843, .839,.838, .835,.832,.828,
2835, .830,.828,.833,-831, 827,824,827, .819,.818,.812,
-818,.813, .807, .808, .816, -801,.805,.791, .803, .807,.805,
£797 4680176795 ,6791 76788 ,2*0.0 6788 ,3%0.0,0772,020,
2773,0.0,.779/

DATA JL/27*0.0, 639, .652, 824, 824, .825, +795, +782, 782,760,
© 763 07444 075246748 46735407285 0722 40708 90731, 6706,
-690, .692, .693,.673,.660, -664, 650, «653, «649, .648,
-632,.635,.629,.624,.630,.627,.633,.630,-631,.636,.650,
-659,.637,.611,.618, .586,.615,.618, .626,.605,.581, :
-620,.590,.583,.600,.591,.572,2*0.0,.573,3%0.0,.581,
0.0,.562,0.0, .556/

CALL ATNUM(IELE, IZ)

IF (ISR.EQ.1.OR. ISR.EQ. 2) JUMPsJK (IZ)

IF (ISR.EQ. 3.OR. ISR.EQ. 4. OR. ISR.EQ.5) JUMP=JL (12)

RETURN

END

.

28


000°0 = GOT"O--960°0)-960°0HhO"OsTyu"O)S«YEOO = EcutU §=6z0°O~—s«z0"O g00°0 Ota 92
Q00°0 §=—000°0 = 0000 )=— 000") W000 =: U00"0 = wU0"0)Ss:000°0 +=: 00u"0 000°0 EOZNW SZ

000°0 =©000"0 = vO0"Y = S00"N =: g00"0 )»=- 9000 )= 400"0 Ss g00"U~—s STU" ZOUIL 2

0u0°0 =—¥00°0 = U0"0S S00"): 900° += L000 = s0U"0—s BTO"O TOTO 0z

voo"u §=¥00"O §=6S00°0)»S 900°0)= Luu"0 Ss 8000 ~—s 8 T0°0 TO2 W 6T

au0°0 =©000°0 §=000°0 Ss 100°0 = T00"0 = yoo" €Ol S$ 9T

000°0 =6y00*a §=—000°0 §=—T00°0 §=—900°0 $02 d ST

95

000°0 = 000°0 000°0 s00°0 zouls bT
000°0 000°0 = ¥00°0 coz Ww tt
o00°0 §=£00°O TOTSW 27
z00°0 TOWN IT
| 000°0 €ol1399 WIV
Tvo"o- G00"O = BUT"O- EOT"U- EOT*O- ybO"V- UyUTG- YEO"O- £E0°O- 620°0- Yz0°O- 9g00°0- w
bIT°O 000°D = EeS*<  SGZ"Z_SYZz"Z = GBT"O = BBU"D-««SZO"O- ~—GOT*O- T0Z"0- SLz°0- 90L°0- Ww
€0¢da = LOZNN «ZOTIL «[TOIV «1OZ A COTS S0Z da ZOTIS. « cOzIN «TOIDN «TO? CEO 0
9% st ce 4 6T ot ST as et cas 1 9

(s2) €OZNW 73LAIVNY

SaguoaI SE’SS =AuLaWOID
AI O°Sh «=D 2La9uWL
[
(WALSAS 301x0)

NOLLVNOG VIOD NI BSN Od SINIIDIAIION Wid GIugsH


FIGURE 2.

STRUCTURE OF PROGRAM CALCOMP

SUBROUTINE MAIN PROGRAM < 3} SUBROUTINE
DATAIN CALCOMP GETERR
SUBROUTINE
CALRI
SUBROUTINE SUBROUTINE

SVLSF2 SLE



b2o°0 §=6T40°0)— BYU"0Ss S90"D_)_ZY0"0 = SOO = LSU"O
000°0 = 000°0 = 000°0 += 000°0 §=ovu"0 §=000°0 += 0000
000°0 §=0u0"0 §=6000"0 )=Ss 0000 = To0"0~=—s TOO"U

000°0 =000°0 §=000°0 §=000"0 = tou"0

000°0 =«a0u"0 §=000°0 = t00"0

000°0 000°0 000°0

000°0 = 000°0

000°0

6€2°T av0°O = FEE*O- B9z°0- 861° 0- QIT°O- 820°O- 180°0  00z°0

9£0°0- 000°0 250°0- Lv0"0- EU°0- GEO"O- SEO*O- ZE0°0- 620°0-

T10°0 = guu"o LE“ ZSZ"OTHT"O = SEU" = 9Y0"O- ~U9T*O- GHZ*U-
OW aN no IN fee) ai NW w A

ch w 6% 82 lz 9% ‘4 be ix4
(1) GN ?aLATWNY

Saquogd SC‘SS ?AuLaWO"D
AN O°Sb

(WaLSAS “IWLINGWGTA)
NOLLWNO VIOD NI 3SN YOd SLNIIDIZIIOD WudIV DISva

8eu"0
000°0
ot0°o
600°0
800°0
400°
900°
$00°O

sou'o

962°C

L00°0-

caps

900°0-

608°0- 9b8°0-

‘Is
ot

Ww
eT

9€0°0
000°0
0z0°0
610°0
L10°0
9T0°0
sTo°o
vro°o
z10°0
200°0
z00°0
000°0
09L"s
T00°0~
986°0-
re)
9

ge

tp
w
6
8%
lz

‘4
ve
1x4
oT
et

Ww
ww
Ww

78


00+30000°O 00+30000°0 00+30000°0 00+30000°0 00+30000°0 00+30000°0 00+30000°0

0000°0 0000°0 0000°0
TT eo1 71
¥0-37897°0 SSS6°%
bO-g0Z0£°O sss8°z
vO-ae8te°O SSSL°Z
vO-3L8LE°O $ss9°z
O-381Zb°O ssss°z
bO-37890°O sssb°z
vO-g308TS"0 SSse°z
vO-gETLS°O SSSz°z
vO-3£879°0 SSST°Z
vO-a8EvE°O sSs0°%
¥O-36L6E°O SSS6°T
v0-3009b°0 ssse°T
bO-aTIES*O SSSL°T
O-30ZT9°O ssso°T
O-adSEOL*O SSSS°T
o-g€908°0 SSSb°T
vO-3TTZ6°0 SSSE°T
€0-38v0T°O Sssz°T
€0-3L8IT°O SSST°T
€0-38eET°O SsSO°T
€0-3669T°O SSS6°0
€0-3999T°O $ss8°o
€0-3rE8T°O SSSL°O
€0-3986T°O $ss9°O
€0-3€807°0 $sss°O
€0-3bZ02°0 sssp°o
€0-aZ60T°O SSSE°O
W20° oT

0000°0
131

0-3Lb2z°0
vO-3T60E *O
¥0-3S9E°O
vO-3TL8E°O
O-380£b°O
vO-36LLb°0
b0-3082S°0
b0-39z8S°0
O-3T0¥9°0
bO-30bSE°O
O-3L60b°0
bO-3SELb°O
b0-3S95S"°0
v0-30629°0
bO-3TEZL°O
0-3£878"°O
v0-3SS¥6"°0
€0-aS20T°O
€0-g9TZT"O
€0-369ET°O
€0-aZEST*O
€0-300LT"O
€0-3998T°O
€0-3zT0Z"0
€0-36802"°0
€0-3EL6T°O
€0-38SZT°O

(vw) wow NZO° eI

osp"o

0000°0
ver

SSE6°Z
ssee°z
SSEL°Z
SSE9°Z
SSES°e
SStp°z
SSEE°Z
SSEZ°Z
SSET°Z
sseo°z
SSE6°T
ssee°Tt
SSEL°T
SSE9°T
SSES°T
SSEb°T
SSEE°T
SSEZ°T
SSET°T
Sseo°T
SSE6°0
SSEB°O
SSEL°O
$S€9°O
SSES°O
SSEb°O
Ssee°o

0000°0
eI

0-abT87°0
vO-ab9TE°O
O-abbSE°O
vO-3SS6E°O
bO-366C0°0
bO-3LL8°O
v0-a68£S°0
0-4LE6S°O
vO-31zs9°O
0-aS¥9E°O
bO-3LTZb°O
bO-3EL8b°O
v0-3279S°0
bO-3EL99°O
vO-3ZEbL°O
v0-380S8°O
¥0-30L6°0
€0-aZ0TT°O
€0-39bZT°O
€0-aTOvT°O
€0-aS9ST°O
€0-3vELT°O
€0-3868T°O
€0-3S€0Z°0
€0-38802°0
€0-3006T*°O
0-3S606°0O

(www WZ0°eI

2 (WA)SSNDDIKL MOGNIM 3d

NOLINGIUISIG TWulogds Fan AWu-X GaLWINIIWO

0000°0
7a

SST6°%
ssta°z
SSTL°2
SST9°%
SSTS*Z
SSTb°%
SSTE*%
ssTz*z
SSIT*Z
SSTO°z
SST6°T
sste°t
SSTL°T
Sst9°T
SSIS*T
SSTp°T
SSTE*T
SsTz°T
SSIT*T
ssto°t
SST6°O
Ssts°O

SSTL°O"

Sst9°0
SSTS°O
SStp"O
SSTE"O

00+30000°O 00+30000°0

0000°0
Ta

vO-3SSSZ°0
yo-3T88z°O
O-ALEZE*O
¥0-3vZ9E°O
b0-aZb0°O
bO-3Z600°0
0-39L6b °O
¥0-396bS°0
0-30S09°O
0-3€599°0
O-GESLE°O
v0-aZbeb°O
v0-3STOS°O
b0-ab8LS°0
vO-3SS99°0
p0-38£9L°0
O-4LEL8°O
0-38S66°0
€0-30ETT"O
€0-392ZT°O
€0-JEET"O
€0-466ST°O
€0-a89LT°O
€0-d6z6T°O
€0-3SS02°0
€0-38L02°0
€0-dZ08T°O
v0-a8T¥S"0

(w)vawe1 WZ0°sI

0000°0
WI

SS66°Z
$S638°%
SS6L°Z
$S69°%
SS6S°%
sS6p°z
SS6E°Z
$S62°Z
SS6T°Z
$S60°%
$S66°T
ss68°T
SS6L°T
$S69°T
SS6S°T
SS6b°T
SS6E°T
$S6z°T
SS6T°T
SS60°T
$S66°0
$S68°0
$S6L°0
$S69°0
$s6S°0
SS6b°0
SS6E°O
$S6z°0

7Z0-4L79€°O
0sg0°%

vO-a8T92°0
vO-30S67°0
O-aZTEE*O
vO-aSOLE°O
vO-a6ZTb"O
vO-a98Sb°0O
O-3LL0S°0
O-a09S"°0
b0-399T9"°0
¥0-35929°0
vO-aS98E °O
O-36900°0
vO-aT9TS"O
0-J30S6S°0
v0-g€b89°0
vO-a8r8L°0
vO-37L68°0
€0-dZz0T°O
€0-a8STT"O
€0-3L0ET°O
€0-3995T°O
€0-3EE9T*O
€0-aT08T"°O
€0-38S6T°O
€0-3ZL02°0
€0-38S02°0
€0-3699T°O
00+30000°0

(w)waWeT WCO°sT

O°9z : (squad) TIONY 430-DiVL
O°sh FAN wo S13 DuVL JanL AWu-X

WHLTUOSTV SBN ONISN

TO-d£SEZ°O
OT6z°z

wi

SSL6°Z
$S28°%
SS2"e
$S19°%
SSLS°z
SSLb°%
SSLE°S
GSL2°z
SSLT°Z
$S20°%
SSL6°T
ssze°T
SSLL°T
$Si9°T
SSLS°T
SSLb°T
SSLE°T
SSLz°T
SSLT°T
SSLO°T
SSL6°0
$si8°0
SSLL°O
$S29°0
SSLs°O
SSLb°O
SSLe°O
$Slz°0

(w) vow

84


Both ary and aj k are primed to indicate that the coefficients represent
variablés which “in practice, however, are treated as changing predictably
within relatively narrow limits. The three constants G1, Gp, and a2 in
equation 2 are calculated from hypothetical binary samples. For example, in
alloy systems, a, is the value of the coefficient near the Cy = 1.0 limit (in
practice computed at Ci = 0.999; C. = 0.001). The value for ao is the range
within which ar; will vary when thé concentration of the analyte decreases to
the C; = 0.0 limit (in practice computed from two binaries C; = 0.001, 0.999;
C; = 0.999; 0.001). The a. coefficient expresses the rate with which af; is
made to vary hyperbolically within the two stated limits. In practice, it is
generally computed from three binaries where Cy; =0.001, 0.5, 0.999; Cc. =
0.999, 0.5, 0.001. Since a, can take on positive, zero, or negative values,
O55 can be computed for thé entire composition range from C; = 1.0 to 0.0.
The af k coefficients are included to compensate for the fact that the total
interdlSnent correction cannot be strictly represented by a sum of binary
matrix effects. A value for ay k calculated from equation 3 (Cj = 0.30, Cj =
0.35, Cy = 0.35) where the binary af and a, are calculated at the Cj =
0.30, Chk = 0.70 level can generally” be used to represent the entire 5K
array.

For the multi-element assay of alloys, all the coefficients in equation 1
are calculated. For such specimens as cements, a3 is nearly equal to zero,
so that ire) in equation 2 can be simplified to

Ofj = +a Cy. (4)

Note that ay here is equivalent to that coefficient in the Claisse-Quintin
model and equation 2 now reduces to the Claisse-Quintin expression. Hypo-
thetical binary standards where C; = 0.2 and 0.8, and C3 = 0.8 and 0.2 are
generally used to calculate aij values,

For fused specimens, another simplification in equation 2 can be made
because the concentration of the flux is by far the major constituent and can:
be held relatively constant. In this case 02, a3, and 85k are approximately
zero, so that aj; reduces to a;; in the conventional “Lachance-Traill (6)
expression. Hypothetical binary Standards are used to calculate Oi5 values
where C; equals the mid-range of the concentrations in the analyte.

We propose that NBSGSC is suitable for routine analysis of alloys, and
minerals both as powders, and as fused specimens. Once the theoretical alpha
coefficients are calculated and saved in a data file, the user can employ
them at any time along with measured X-ray intensity data on standards and
unknowns to obtain concentrations. Theoretical alpha coefficients only pro-
vide the general relationship of matrix influences on the analyte, and user-
defined real standards are used to rescale it for matching experimental rea-
lity. Therefore, appropriate standards are very important for obtaining good
results as is the case with other fundamental parameter methods [1,7]. Since
NBSGSC is generally written in Standard FORTRAN Iv, it should be readily
adaptable to most minicomputers in laboratories which use X-ray fluorescence
Spectrometry.


0.1800
15.0268
0.2035
15.2038
0.2315
15.3807
0.2565
15.5452
0.2850
15.7132
0.3221
15.8756
0.3575
16.0348
0.3936
16.1942
0.4303
16.3507
0.4684
16.5071
0.5046
16.6595,
0.5400
16.8097
0.5850
16.9573
0.6271
17.1037
0.6699
17.2453
0.7175
17.3824

2.6000
11.8667
2.6000
12.6578
2.6000
13.4737
2.6000
14.3256
2.6000
15.1997
2.6000
16.1046
2.6000
17.0384
2.6000
17.9976
2.6000
18.9856
2.6000
19.9995
2.6000
21.0440
2.6000
22.1172
2.6000
23.2199
2.6000
24.3503
2.6000
25.5140
2.6000
26.7112

0.0000
2.8500
0.0000
2.8500
0.0000
2.8500
0.0000
2.8500
0,0000
2.8500
0.0000
2.8500
0.0000
2.8500
0.0000
2.8500
0.0000
2.8500
0.0000
2.8500
0.0000
2.8500
0.0000
2.8500
0.0000
2.8500
0.0000
2.8500
0.0000
2.8500
0.0000
2.8500

0.0000
12.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000

Values - Continued

0.0000
179.4100
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
9.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000

0.0000
2.7345
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000

0.0000
1.5265
0.0000
1.6539
0.0000
1.7820
0.0000
1.9210
0.0000
2.0651
0.0000
2.2163
0.0000
2.3725
0.0000
2.5316
0.0000
2.6977
0.0000
2.8655,
0.0000
3.0425
0.0000
3.2240
0.0000
3.4119
0.0000
3.6043
0.0000
3.8058
0.0000
4.0180

113

0.0000
2.7300
9.0000
2.7300
0.0000
2.7300
0.0000
2.7300
0.0000
2.7300
0.0000
2.7300
0.0000
2.7300
0.0000
2.7300
0.0000
2.7300
0.0000
2.7300
0.0000
2.7300
0.0000
2.7300
0.0000
2.7300
0.0000
2.7220
0.0000
2.7140
0.0000
2.7060

0.0000
1.3586
0.0000
1.4762
0.0000
1.5960
0.0000
1.7272
9.0000
1.8639
0.0000
2.0058
0.0000
2.1555
0.0000
2.3067
0.0000
2.4647
0.0000
2.6251
0.0000
2.7932
0.0000
2.9669
0.0000
3.1461
0.0000
3.3303
0.0000
3.5237
0.0000
3.7270

0.0000
2.6144
0.0000
2.6144
0.0000
2.6144
0.0000
2.6144

* 0.0000

2.6144
0.0000
2.6144
9.0000
2.6144
0.0000
2.6144
0.0000
2.6144
0.0000
2.6144
0.0000
2.6144
0.0000
2.6144
0.0000
2.6144
0.0000
2.6144
0.0000
2.6144
0.0000
2.6144

0.0000
1.3231
0.0000
1.4358
0.0000
1.5499
0.0000
1.6749
0.0000
1.8044
0.0000
1.9396
0.0000
2.0800
0.0000
2.2223
0.0000
2.3705
0.0000
2.5202
0.0000
2.6769
0.0000
2.8379
0.0000
3.0038
0.0000
3.1733

0.0000

3.3511
0.0000
3.5375

0.0000
2.3554
0.0000
2.3554
0.0000
2.3554
0.0000
2.3554
0.0000
2.3554
0.0000
2.3554
0.0000
2.3554
0.0000
2.3554
0.0000
2.3554
0.0000
2.3554
0.0000
2.3554
0.0000
2.3554
0.0000
2.3554
0.0000
2.3554
0.0000
2.3554
0.0000
2.3554


N é (N/A) AAMNO NOLLWUGITVO 20 SdAL UGILLONY AUL OL LNWM NOK Od

ze 0uY_ NTT BZ"T U0 zT*T yore: = TO", = 00D) 000) 070 ovo “Ra TOY

toro uu"0SsTO"O,BT*O = WTO SL"O- SOO. 270-070-000) 00D 00“ “SaV"OAY

Se*y UD ZLTT_—S9Z- O"D.-—TBTT = BTOT- HOTT- 00°09 ~— 000» 00"0 oto sua"

z0°0 000 = TO"U=S«9STO-"  0T0 = 0670 BTU-  SZ*U- 0070-000 G0" 000 | "Ha "SaV

evo LOO S70 O90ZTE*O | GSTUS HTT. ELTEZ «GOTO 99TT = 9070 SEO z0" OT

gv°0 §— 60°O-SBS*OOT*IZTETUG9GY «99 = BGTEZ GOTO: N9T = 90D MEO BO"OOT LBZ

ovo = vue «U"SZ_—zwTT- «UTD STE OTD = 9G*T 00D) 00D «0070 ooo aT

0070 §©«g0'u «= U0 UO «GOD ST*E_=— 070 E0".- 70-00") 070 Uo“

wero «= TOO SOTDek*Z_—ZT"O THE ST'O, 9ST TUT ETO TT" 027019766

veto «100, hOTDsCTB*Z=ZE"O «COTES ST"O ESE. «TOD ET"O TKO OZ" Sh°86 9820

4s8z- OTD WTO LL" UTD ESTO- THT. LO 0" (000 0"0 ro eat

Zo"O- 00° 000 —Of*0- + -00°0~=—«O5*0-  20°0 = G00 G0"Y = 0070 0070000 “RSV

S070 00°0-s vO cazt aU ZBEY «HOTT. «= ST6T «TTY OS" "0 GOO 6L"86,

20° —-00"O-—«OhTOZGZE BETO ZvTvS HTT «MOET HT"O S70 = G0" GOO (OF wstta

Cr a a oS a eo ce a oc so "Hua"

oo" —00°O-20°Y_=—E0"O- 0070 ZETU- 00) =~ CT70.=— 000-000-0070 ua "Ea * SEY

€v°0 © 00"0-2T"0— SBTOT«2z70 $9749 960) TELE COTO OB" OTD STO _2T°66

fp'0 00° §~=—«T*O«BBTOT«zz"0 L649: YSU CTBTLT «= EO"D 080) 00D STO SE“6G zstta
Od a fis) IN o aa nw rs) ry Is w 2 WIOL “ON"dWS

(0) SLINSTY 40 NOILVINGVL

9¥00"*£000° '8S00**9TIZ** TEO0" “69Gy°*99TO" “BEEZ * *G01 * *9000°*9E00°
vE00" * TUY* “HOU0" “ T8z0* *ZTO0* *00E6° *STOU" “ESTO * TO 00° * {100° *0Z00"
L000 *u"0" OF00" *26zT**BEU0* *ZvbY9* *ZPTO" *YO6T* *y! '0S00°*0°0"6000" USTID=°ON'diS:
€¥00*“0*U0TOU* “Bani * ‘2Z00" *LEL¥* *9G00"* TELI**E000" 0800" “0°0"STOU" @SITD="ON' dS

. .? SNQWIQGdS JO SNOLLWLLNGONOD NMONN UGING
2 (VA) SNAWIDGdS JSGHL UOd SAMIVA NMONN KISNOIATHd UAHLO HLIM SLINSTY ASGHL TVdwOO GL USIM 0k OG

€av'o aLv°O §«zZ6S°U SOYUZ OTETO T6S*OS beP°T OEL*EZ 060°0 O99"T a90°O' —U9E"O ZO*OUT L821

Te°u = olu"o —OSO"U--Y¥L*Z)«UZT"O«BST*¥G «IST°O T9S°T Oto°O «LTO OTTO uoz*e 19°66 962

Isv°o vuv'o §—- EOP"O«EZUTZE OBE" GTA"ED BEDE «= USE"GT GFL" §005°0 §— G00"0- 060" GL" 86 wSstta

4@v°O—-G00"D-—s«YIT"O §=—- S¥B"OT -O2Z°0 = GP9"LY EYG"O §=STE°LE OEU"D 0080 00°0 ‘ost-o c1°66 esta

Ow en a2 IN oo aa AW wo A 1s N 2 Tok ‘ON"aS
(W) slinszy 0 NoLLWwinavL

82


Appendix 4: Listing of Programs for Creating and Reading Permanent Datafiles
PROGRAM CREMAC
THIS PROGRAM CREATES A DATAFILE NAMED 'MACPRM.DAT*
FOR SAVING PARAMETERS NEEDED FOR CALCULATING MASS
ABSORPTION COEFFICIENTS WITH LEROUX ALGORITHM.
(1979 VERSION)

NBS 06-SEP-1984

aaaaaaana

IMPLICIT INTEGER (I,J)
IMPLICIT REAL, (A-H,K=-Z)
OPEN (UNIT=3,NAME='MACPRM.DAT' , TYPE='NEW' ,ACCESS='DIRECT’,
1 MAXREC=94, RECORDSIZE=24)
DO 50 1=1,94
WRITE (6,100)I
READ(5,*)C,K,NK,EP,CK1,NCK1,L1,NL1,L2,NL2,L3,NL3,
1s M1,NM1 ,M2,NM2,M3,NM3 ,M4,NM4,M5,NMS,N1,NNJ
WRITE (3'I) C,K,NK,EP,CK1,NCK1,L1,NL1,L2,NL2,L3,NL3,M1,NM1,M2,
1 NM2,M3,NM3,M4,NM4,MS,NMS,N1,NN1
50 CONTINUE
CLOSE (UNIT=3)
100 FORMAT(' Z=',13)
END

PROGRAM RDCREMAC
‘

THIS PROGRAM PRINTS OUT THE CONTENTS OF THE
DATAFILE NAMED 'MACPRM.DAT’.

NBS 06-SEP-1984

aaaaann

IMPLICIT INTEGER (I,J)

IMPLICIT REAL (A-H,K-2)

OPEN (UNIT#=3,NAME='MACPRM.DAT* ,TYPE='OLD' ,ACCESS="'DIRECT’ ,
1 MAXREC#94, RECORDSIZE=24)

— DO 10 I=1,94

READ(3'I) C,K,NK,EP,CK1,NCK1,L1,NL1,L2,NL2,L3,NL3,M1,NM1,
1 M2,NM2,M3,NM3 ,M4,NM4 ,MS,NMS,N1,NN1

WRITE(6,100) C,K,NK,EP,CKl ,NCK1,L1,NL1,L2,NL2,L3,NL3,M1,NM1,
1 M2,NM2,M3,NM3 ,M4,NM4 ,MS,NMS,N1,NN1

10 CONTINUE
CLOSE (UNIT=3)
STOP

100 FORMAT (/1X, 12F9.4)
END

109


v00"0- =8s0°U

490°0

000°0) = EZU"U- =TTO°O- O10°G- 600°0- 800°0-
000°0 §=6€Z0°0- ~OTO°O- 600°0- 800°0- 400°0-
000°G =6£80°0- ETO°D 610°O 9z0°0 § z£0°0
000°0 =000°0 000°0 word 000°0

foo*u §=Tou°O §=T00°0 §=200°0

000°0 =000°0 000°0

000°0 =©000°0

000°0

St0°O- LE0°O- B0Z"0- 000°0 650°O- I£0°0- 6Z0°0- 420°O- Szo°0-

860°0- 98T°O- ¥E0°O-- 000°O BIS*Z 68Z°0 LBT*D y¥0°V z0°0-

€0¢aa
9%

COZNW
4

covIL
(<4

TOIVD TORN COTS SOZd ZOTIS OZ
C4 6r oT st or €I

(oz) TOTO *aLATVNY

Saguoad SE‘SS *ANLIWOGD
A 0°Sh = ALaDeWL

(waLsAS ‘301Xx0)

NOILLWNDS W109 NI 3SN YOd SINGIDI A300 Vad GIugAn

£00°0-
900°0-
sco°o
000°0
200°
000°0
000°0
000°0
000°0

€z0°0-

t21°o-

TOT
a

900°0-
s00°0-
€vo°o
000°0
200°0
000°0
000°0
000°0
000°0
000°0

1z0°0-

7c0z"0-

To?Ww
lis

z00°0
z00°0
820°O
000°0
900°0
€00°0
z00°0
z00°0
z00°0
100°O
1T00°0
000°0
800°0-
zL9°0-
tor3
9

€ozaa 92
COCNN SZ
ZOmls 2
TOTW 0c
Tor W GT
€Ot S 9T
soz 4 ST
zouls oT
cOcW tT
TOTSW ZT
TORW IT
fol39 wrIV
uw

93

w


Appendix 3: Examples for Alloy, Oxide, and Fused Samples

3.1A Alpha Coefficient Calculation for Cr-Fe-Ni Alloy System Using
Measured X-ray Tube Spectral Distribution from the Literature

DATE: 02-OCT-84 TIME: 15:39:03

WHICH SYSTEM DO YOU WISH TO ANALYZE:

1-ELEMENT SYSTEM 2-OXIDE SYSTEM 3-FUSED DISK SYSTEM ? 1
INPUT NUMBER OF ANALYTES: 3

INPUT NAMES OF ANALYTES (XXS): CR FE NI

WHAT MASS ABS. COEF. ALGORITHM DO YOU WANT TO USE :

1-LEROUX ALGORITHM 2-HEINRICH ALGORITHM ? 2
DO YOU WANT TO CREATE A DATAFILE FOR SAVING CALCULATED ALPHA COEFFICIENTS (YM)? N
FOR SAMPLE GEOMETRY, INPUT INCIDENCE & EMERGENCE ANGLES (DEGREE-XX): 63,33
INPUT THE CHARACTERISTIC LINE NUMBER YOU WISH TO MEASURE (1-KA, 2-KB, 3-LAl, 4-LB1, 5-LB2):
Iel aR 1 .
Ix2 FE 1
I= 3 NI 1
DO YOU WANT PRINT OUT CALCULATED ALPHA COEFFICIENTS(Y/N): Y
WHICH X-RAY IE SPECTRAL DISTRIBUTION DO YOU PREFER:
1-CALCULATED SPECTRUM FROM NBS ALGORITHM ; 2-MEASURED SPECTRUM ? 2
DO YOU WANT TO PRINT OUT THE SPECTRAL DISTRIBUTION(Y/N) 7? Y
INPUT NAME OF X-RAY TUBE TARGET (XX): W

INPUT VOLTAGE(KV) , TAKE-OFF ANGLE OF X-RAY FROM TUBE TARGET(DEGREE), AND
WINDOW THICKNESS (MM) OF X-RAY TUBE : 45.0,26.0,1.0

INPUT THE DATAFILE NAME OF X-RAY TUBE SPECTRUM(XXOXXX. XXX) : SDXT75.W45

INPUT TOTAL NUMBER OF WAVELENGTH INTERVALS FOR CONTINUUM (MAX.=300) : 117

61


2.2 List of Symbols and Variables in CALCOMP

(1) Main Program

Variable Names Common Symbols Remarks
A1(I,J) a Coefficient of element J on element I
A2(I,J) ag Coefficient of element J on element I
A3(I,J) a3 Coefficient of element J on element I
AIJK(I,J,K) af 5k Cross coefficient of elements J and K
on element I
CIM(I) Intermediate concentration during interation
process
CM Concentration Cm = 1-C; = 5 Cj
s
CS(M1,1) Cy Concentration of standard
x
CX(M,I) Cy Concentration calculated or fixed for
unknown
x
CX1(M,I) Cy Concentration calculated or fixed for
unknown
D Dead time
IDATE(5) Date from computer's real-time clock
Pp
IP(I) 7 Intensity of pure element I
s
IS(M1,1) ae Intensity of standard
ITIME( 4) Time from canputer's real*time clock
~ x
IX(M,I) iy Intensity of unknown
K1 Optional switch for analyzing (1) element or
(2) oxide, or (3) fused disk system
K2 Optional switch for using (1) pure or
(2) multielement standard
KK5 . Optional switch for obtaining error message
KK6 Optional switch for trying another type of
calibration
KK7 ‘Optional switch for dead time correction
M Number of unknown(s)
M1 Number of standard(s)
N Number of analytes
N6 Number of all constituents

57


aaaaaaaaAaAaAAANAANNAAANAANAANAAANADNA

10

+

Appendix 1: Listing of CALCO and CALCOMP Programs
PROGRAM CALCO

THIS IS A REVISION OF VERSION 1 OF A FUNDAMENTAL PARAMETER
COMPUTER PROGRAM FOR CORRECTION OF INTERELEMENT EFFECTS FOR
QUANTITATIVE X-RAY SPECTROMETRY. THE ORIGINAL PROGRAM WAS
WRITTEN BY R.M.ROUSSEAU OF THE GEOLOGICAL SURVEY OF CANADA
(GSC) AND CONTAINS THE PROGRAMS ALPHA AND CARECAL WHICH’ WERE
EXTENSIVELY MODIFIED AT NBS. THE NBSGSC PROGRAM CONTAINS THE
COMPREHENSIVE LACHANCE ALGORITHM(COLA) FOR CORRECTION OF INTER-
ELEMENT EFFECTS.

CALCO IS A REVISION OF ALPHA FOR CALCULATING THEORETICAL ALPHA
COEFFICIENTS, AND CALCOMP IS A REVISION OF CARECAL FOR CALCULA-
TING CONCENTRATIONS IN ANALYTE SPECIMENS.

OVERLAY STRUCTURE OF CALCO :
MAIN PROGRAM——-——CALCO

SUBROUTINE: ALPHA , APAFD, ATNUM , CHAWV , ABSEDG
JUMRAT, YIELD, APIOX,BDCOEP, TUBDAT
CINLIN, INFTGT, CHALIN, SBATWT

REAL FUNCTION——MAC, MACFUN

DATAFILE TGTWR. DAT, MACPRM «DAT

*

AUTHORS: G.Y. TAO AND P.A. PELLA DATE: 04-SEP-1984
CENTER FOR ANALYTICAL CHEMISTRY, NATIONAL BUREAU OF STANDARDS
GAITHERSBURG MD 20899 U.S.A.

AND R.M.ROUSSEAU
GEOLOGICAL SURVEY OF CANADA, OTTAWA, CANADA KTA-0E8

* GUEST RESEARCHER FROM SHANGHAI INSTITUTE OF CERAMICS,
ACADEMIA SINICA, THE PEOPLE'S REPUBLIC OF CHINA

DIMENSION IELE(12) ,NE(12) ,NO(12) ,Al(12,12) ,A2(12,12),
A3(12,12) ,AIJK(12, 12,12) , IDATE(5) , ITIME(4) ,NAMPIL (5)
COMMON K15,K1,N, IELE,NE,NO

COMMON /COESUB/A1 ,A2,A3,AIJK

CALL DATE(IDATE)

CALL TIME(ITIME)

WRITE (6,90) IDATE, ITIME

WRITE(6,100)

READ(5,*)K1

WRITE(6,105)

READ(5,*)N

IF(K1.EQ.1)WRITE(6,110)

IF(K1.EQ.1) READ(5, 120) (IELE(I) ,»I=1,N)
IF(K1.NE.1)WRITE (6,130)

IF(K1.NE.1)READ(5,140) (IELE(I) ,NE(I) ,NO(I) ,I=1,N)
WRITE (6,145)

READ(S,*)K15

WRITE (6,150)

READ(5,160)KK1

IF(KK1.EQ.'N ')GOTO 10

WRITE(6,170)

READ(6,180) NAMFIL

CALL ALPHA

IF (KK1.EQ."N *)GOTO 20
CALL ASSIGN(3,NAMFIL, 10)

IF (K1.£Q.3)A1(1,3)=0.0

IF (K1.EQ.3) WRITE (3, ,ERR#15)Al (1,3) ,(Al(I,2) ,T#1,N) ,(Al(I,1),
(A2(I,J) »J=1,N) ,-T=1,N)

IF(K1.EQ.1)WRITE(3,* -ERR#15) ((Al(I,J) ,Je1,N) ,(A2(I,J) »J=l,N) »
(A3 (I,J) ,J=1,N) , ((AIIK(I,J,R) >K#1,N) ,J=1,N) ,I=1,N)
IF(K1.EQ.2)WRITE(3,* ,ERR#15) ( (Al (I,J) -J#1,N) »(A2(I,J) J=l,N) »
((AIIK(I,J,K) -K#1,N) ,J#1,/N) ¢I#1,N)

17

Cater Kabat,

Phen

eo

hep
aye

x

\


aanaaa

10
20

30
40
45

50
60

70

SUBROUTINE GETERR

THIS SUBROUTINE COMPARES RESULTS FROM COLA WITH OTHER
PREVIOUSLY KNOWN VALUES.

NBS 05-SEP-1984

DIMENSION CXT(20,13) ,CX(20,13) ,TOTT(20) ,EA(13) ,ER(13),
DIF (20,13) ,DIFR(20, 13) , TOT(20)

DOUBLE PRECISION NX(20) ,NOA(13) ,NOA1(13)
COMMON K1,N6,N,M,M1,K2,KK1,KK6

COMMON /GETSUB/NOA, NOA1,NX,CX,TOT

IF (KK6.EQ.'Y ')GOTO 45

WRITE (6,500)

DO 10 I=1,M

WRITE (6,505) NX(T)

READ(5,*) (CXT(I,J) »-J=1,N6)

CONTINUE

DO 40 L=1,M

TOTT(L)=0.0

DO 30 I=1,N6

CXT(L, 1) *AINT(1.0E4*CXT(L,I)+.5)/100.0
TOIT (L) =TOTT (L) +CXT (L,I)
CONTINUE

CONTINUE

DO 80 I=1,N6

EA(I)#0.0

ER(I)=0.0

IF(KK1.EQ.'N ')GOTO 60

DO SO I8=1,N

IF(NOA(I) .EQ.NOA1(I8))GOTO 60
CONTINUE

GOTO 80

DO 70 L=1,M
DIF(L,1)*CX(L,I)-CXT(L, I)
IF(CXT(L,1I) -EQ.0.0) DIFR(L,I)=0.0
IF(CXT(L,I) .EQ.0.0)GOTO 70
DIFR(L,I)#100.0*DIF(L,1)/CXT (L,I)
EA(I)=EA(I)+ABS (DIF(L,I))

ER(I) =ER(I)+100.0*ABS (DIF (L,I))/CXT (L,I)
CONTINUE

EA(I)#EA(I) /FLOAT(M)

ER(I)=ER(I) /FLOAT(M)

CONTINUE

WRITE (6,510) (NOA(I) ,I=1,N6)

DO 90 Lal,M

WRITE (6,520)NX(L) ,TOTT(L) » (CXT(L, I) ,1#1,N6)
WRITE (6,530) TOT(L) , (CX(L, I) ,1=1,N6)

WRITE (6,540) (DIF(L,I) , Ie1,N6)

WRITE (6,550) (DIFR(L, I) ,1#1,N6)

CONTINUE
WRITE (6,560) (EA(I) ,1e1,N6)
WRITE (6,570) (ER(I) »1@1,N6)

RETURN

FORMAT(1X, ‘ENTER KNOWN CONCENTRATIONS OF SPECIMENS :'/)
FORMAT (1X, 'SMP.NO.#' ,A8, 2X,$)

PORMAT (/ (45K, ‘TABULATION OF RESULTS (%)'//

1X, "SMP.NO. *, 1348)

FORMAT (/1X,A8, erT2, 13 (7. 2,1%))

FORMAT (10X,F7.2,13(F7.2,1X))

FORMAT (9X, 'ABS.ERR.' ,13(F7.2,1X))

FORMAT (9X, '"REL.ERR.' , 13(F7.2,1X))

FORMAT (//5X, 'AVG.ABS-ERR. ' ,13(F7-2,1X))

FORUAT(SX, "AVG, REL ERR! 913(F7.2,1X))

47


IDTUBE
IE(I)
ISR(I)

ITP
ITS
1Z(1)
Ki2

KK2

KK5

MAC

MU

N5,NAM
RJM

SW,SW1, SWDB
SWDB1, SWLOI
TP

TS

uc(1,5)

uco(J)

VOLT
XINT (2,300)

XINT1(2,11)

CA
CB

uy QQ)

Hy QQ)

1-1/7

csc ¥,
CSC ¥5
Hy Og)

Wo(Ay)

Chemical symbol of x-ray tube target
Intermediate variable

Analyte line number (Ky, 2-Ke, 3-Lays N-Leys
5-Lgo)

X-ray incidence angle
X-ray emergence angle
Atomic number of analyte I

Optional switoh used for different fused disk
conditions: (1) Sample+ L12B407; (2)
sample+ L12B407+ LIF; (3) sample+LiB02.

Optional switch for printing out calculated
alpha coefficients

Switch for using AL filter when analyzing Cr
and Mn with Cr X-ray tube

Real function for calculating mass absorption
coefficients with Heinrich algorithm

Real function for calculating mass absorption
coefficients with Leroux algorithm

Intermediate Variables

Jump Ratio

Intermediate Variables
Intermediate Variables
Cosecant of incident angle ¥,
Cosecant of emergence angle Yo

Mass absorption coefficient of element I at
wavelength ry

Mass absorption coefficient of oxygen at
wavelength, ay

Voltage (KV) used in X-ray tube

Wavelength and intensity of X-ray tube
continuum

Wavelength and intensity of X-ray tube
characteristic lines

X-ray fluorescent yield
Intermediate variable

Additional Variables in APAFD

Concentration C; used for fused disc system
Concentration cy used for fused disc system

52


scev-o
aper't

8£S00°0

tIve"O
UIST*O

SLe00°0

‘stsu"0
seco

5000°0

sczv-}
4€96°0

LLv0070

Ow 80L0°0
NA SOEL “EZ

Ow €9z00"0

Ow soTO°O
NW 819S°T

Ow BT00U"0

OW 8000°0
NW SUST°6T

Ow syTuo"O

Ow 80000
NW SST6°LT

Ow gpou0"0

ON 8265°0
w 2060°0

9 TLze0°0

‘gN 80S0°0
Ww soTo"o

1 60600"0

@N 8C0r°O
w suvt-o

3 veLvoru

ON A9TT"O
w s0co"o

99 ovétoro

MD %s09°0z
‘A t099°T

IN B9SbE*O

ND wyLz
A WET*O

IN 06606°0

fo veze°2T
‘A tous*o

IN Lvesb"0

> *Sp8°Or
A t0u8*0

IN Sp9ab°O

TI-96b€£9°0 =ZV SO-3STHbL"O =TY 00+300000°0 =ov
6U-JE69ST°O =ZV SO-3TOVGL°O =I¥ 00+900000°0 =0v
OT-36TS9T*O =Zv S0-38L¥68°0 =Iv 00+900000°0 =0v
GO-266LTT*°O =Z¥ O-3ONGPE°O =T¥ 00+900000°0 =Ov
LO-3L190Z"°O-=ZW £0-49Z69T°O =IV 00+900000°0 =Ow
OT-39889T"O =ZW O-3E999T°O =IV 00+900000"0 =OV

IN tOTE*O
Is #090°0

ga LSyI0°O

IN 80ZT*°O
Is s0TT‘o

ad SETOO"O

IN tose’o
1s 800070

a4 becturo

IN 8022°0
Is $000°0

ga 80600°0

$20°00T

09 816S°0S
‘Te 809€°0

NW STSZ°O

=NW1OL
aa
250
wey
819°66 = TWIOL
ic)
wou
=TWLOL
“a

0D REST "HG
‘Tw 8002°0
NW 694Z0°O
46L°86
09 %618°E9
‘Iw 060°0 o=0
NW 9ZTbZ*0 on)
820°66 «= TWO,
09 8609°L9 aa
‘Tw N0ST"O =>
NW 6£622°O wd

9-1
L87Z12="ON*dKS

v=
‘98Z1T="ON*dWS:

en
"ySTTO=ON"anS

L-
ZSTTO="ON*dWS

———NDLIVUaLI_ Lsv1 20 SLinsay——-

CUND*T3U°TIVO=K SANT *SVaW=X)
SIN@IO14s900 431 GBLYINIIWO JO NOLLVINEWL

an : way SENFIDISSIOO 4S1 LNO INIdd OL LNWM N04 0d

KeXeZVeXeIV=A (by)
XoXeZVeKelvtOver (2)

Geksce

XelveA (€)
XeTveOvsA (1)

3 NOLLVUGIIVD Od 35N OL INVM NOK Od SBAUND 4S7 30 SdAL LVM

"eBL6zI “HGISZI “T6EOIT
“epecel “TOzeZt *Z260IT
“¥9BEEl *OLY0ZT *¥SBB0T
“yOvSEL “L6TIZT *SLL60T
“61880T “ST96ZT *LZOTIT
“GLbLEL “6b2UZT *SLETIT
ow [} IN
|
$1600°0 ugu0U"O 66ETU‘O
QovEo"o zEBtoro YEOET*O
£c100°0 vETUO"O oBseo0'o

o4z00°v §26000°0 uPTEUTO

“LEZLZ = *6L09 “TLL6S

*OTTL2 =“ ¥86S “€T86S

*LbT8Z = °L69S “£0665

“e6c9e = * T8PY “69075

“Lttae «= *S1z9 *y9T6S

*ctbe2 = “L109 *ET68S
aa NW

SMWA ZOWEGAV

68212="0N"GIS
88ZTD="ON"GLs:
‘S8ZTD="ON*GLS
€STID="0N°GLS
TSTTD="ON*GLS

»
+ SQUVONVIS WOU SGILISNAINI aund G3LVINIIVO

Tsveg*O. LTEVO"O HSbLT*O
LEOTe*d L0g00"O TEOTZ*O
b6ty6"O EGz00°O LLvIO°O
L2LTS°O LybO0"O § 00zZ"0

68712="0N"GIS
88Z713="ON*GLS
S8ZTD="ON"QLS
ESTID="ON"aLS

81


step
Hou

3

START CALCOMP

Select Analysis system
(1) Element
(2) Oxide
(3) Fused Dise

fixed conc.?

FIGURE 4,

step
Hos

27

26

25

24

Input number of all
Constituents, number of
analytes and number of unk.

FLOWCHART FOR PROGRAM CALCOMP

step
Wo

Print out results
for each unk.

Print out LSF coef.

Do you Want
rint out LSF Coef.:

eviously Known?

Bo you want to Calc.
Ave. Error when Analyte is

Input Conc. of Unk.

Select calibration curve
Type (1), (2), (3), or (4) 30

TE

23

Print out the contents for
Step 22

(1) By Datarile
(2) By Keyboara

3°
Do you want to
Print out RP and 11,100
22 i .
Trot number of anaiyees tron Sas?
and number of unk. = -—
Input names of a Input dead tim
constituents
32
20 Dead Tine
Input names of analytes /K— Correction?
Select Alpha Coef. Input: | (2) 19 Input Int. of unk.

a

Input Int. or Conc.
of Unk.

Input Datafile Wi
‘Alpha Coef.

Ie step ser]

Input 1.D. of Unk.
If step

Keysin Alpha Coef. on
Keyboard

T a

k—!

_t_

Input Int. of Std.

Select the type of Standaré
you use: (1) pure atd, and
(2) multieleaent std.

F

Input Conc, of Std.

(0)

F

Input 1.D. of Std.

Input Pure Int. for each
analyte

——

Input number of std.

ll

Tabulating Results and

Absolute and Relative

Another Calibration

Errors



JK(94)
JL(94)
JUMP

OM1

1D(94)

AW(94)
ATWT
NAME

1-1/7

(4)

(15)

(16)

(17)

Wavelength of characteristic line
Additional Variables in JUMRAT

Jump ratios for the absorption edge K
Jump ratios for absorption edge L
Jump ratio at a given absorption edge

Additional Variables in Yield

Intermediate variable

X-ray fluorescence yield
Additional Variable in ATNUM

Chemical symbols of the element (1294)
Additional Variables in SBATWT

Atomic weight of the elements (1+94)
Atomic weight of a given element
Chemical symbol of a given element

56


ABSTRACT

INTRODUCTION... ..

PROGRAM STRUCTURE . .

OPERATING PROCEDURE .

REFERENCES .
APPENDIX 1:
APPENDIX 2:
APPENDIX 3:

APPENDIX 4:

TABLE

OF CONTENTS

LISTING OF CALCO AND CALCOMP PROGRAMS

DESCRIPTION OF SYMBOLS AND PERMANENT DATAFILES

EXAMPLES FOR ALLOY, OXIDE, AND FUSED SAMPLES .

LISTING OF PROGRAMS FOR CREATING AND READING

PERMANENT DATAFILES

iv

Page

ili

15
17
51
61

109


o0€0*0-

ste°O-  €L6°0-

vyT*O- 82T°0- y60"0- O0v"0 O00°O0 BLE°O

SLO°O- SbO"O- LTO°O- TTh°O 000°O 68€°0

8yt°O

Too"O)§=6TLS*O L@v*O = OUD STB"O
Too°O) §=690b°0 = 000"0 Ss: 960

ote*o- 000°O OLE*O

000°0 §=©T00°O

000°0

6bS°0 §=—89L°0)S Z98°L69 000°0 = TE6 “OS

B8Eb°O- Sbb°O- 8fh°0- OZP°0- 66£°0- TOO°0- OV0"O 00°0-

Tst°%
Ow

(47

L26°T
‘aN

tw

9b0°O
no
6e

beoro- ptt°O- z2T°0 ovo"o = WTT°O-
IN fee) EEE NW w

8 x4 9% £14 ve

(SZ) NW ?3.LATVNY

SaguOaI SE‘SS *ANLAWOID
A O°Sh HD FLIDUWL

(WALSAS "TWLNGWa71a)

LEes*O-
T6S°0-
ete*t-
LOT*I-
900°T-
6€T°O
000°0
zero

esL°0-
02Z°0-
066°C
A
Lx4

ooT*O-
STT°O-
zee*o-
00€°0-
TLz*0-
S0°O
000°0
“so°O
900°0

$80°U-

6S0°0-

oce"o
Is

oT

NOILWNOT VIO) NI 3SN YOd SINGIOIGsIOO WHdIV OIsva

6S0°0- 6tT"U
TL0°O- =bbT°o
Lbz°O- OST"O
T22°O- ; BbT"O
66T°O- ZHT°O
4v0°0 §=—z00°0
00u°O0 =—.000°0
4vo°0 = z00°0
600°0 §=66£0°0
000°0 = 8T0°0
vto"o
000°0
€2T°o §=—pS9"L
bu°0- s00°0-
T80°O = #68" U-
Ww Pe)
et 9

> GFE 8B 8

a

w
6%

[x4

St
ve
1x4
oT
et

Ww
Ww
Ww

wiv

73


SUBROUTINE ATNUM(INAM, IZ)

c
c THIS SUBROUTINE PROVIDES THE ATOMIC NUMBER WHEN A
c CORRESPONDING ELEMENT NAME IS GIVEN.
c
c NBS 04-SEP-1984
c
DIMENSION ID(94)
DATA ID/'H ',"HE',*LI',"BE',"B ','C ','N','0 ','F ¢,
1 *NE", "NAT, ‘MG! , ‘AL’, ‘sr’, 'p : “s', "cL, ‘AR! 7
1 'SC*,'TI',"V ','CR', "MN", "FE" ,"CO", "NI", "CU", "ZN", GAY
1 'GE','AS',"SE',"BR',"KR',"RB','SR',"y ',
1
1
’
IF(INAM.EQ.ID(I)) GO TO 20
10 CONTINUE
WRITE (6,100) INAM
STOP
20 Iz=I
100 FORMAT(/1X,"ERROR: ',A2," IS NOT A CORRECT ELEMENT NAME AMONG 1
+H-94 PU.')
RETURN
END
SUBROUTINE CHAWV (WV, IELE, ISR)
c
c THIS SUBROUTINE PROVIDES CHARACTERISTIC LINE
c WAVELENGTHS (KA,KB,LA1,LB1,LB2) BY MEANS OF AN
c EMPIRICAL FIT. THIS FIT IS NOT RECOMMENDED FOR
c LINES BELOW 1 KEV.
Cc
c NBS 04-SEP-1984
c

DIMENSION D1 (5) ,D2(5) ,D3(5)

DATA Dl/-.0199726 ,-.060101,-.123941,—.00322523,-.197431/
DATA D2/2. 22412, 2.52781, 3.29533, 2.48613,4.01718/

DATA D3/-5.1774,-5.6437,-9.75836 ,-8.37742,-11.3323/

CALL ATNUM(IELE, IZ)

ZIsIZ

ZL#ALOG (ZI)

WV=#12. 398/EXP (D1 (ISR) *ZL*ZL+D2 (ISR) *ZL+D3 (ISR) )

RETURN

END

27


zu0°0- Oy0°0- £90°O-
€s0°0- 9S0°0-

z00°0-

B0L°0- B6y°0- BSZ°O- HGT°U-

6E°O- BZE*O- ~SLT°O- 6LT°O~

Tea°t) Sv" 9 TT*O- SBT 0-
OW an fis) IN
c47 w 62 8

$90°0; 8S0°0- SbO°O- OT"
Ls0°0- 1S0°0- 8€0°0- O0T"O
gTT°O §=STT°O stt*o 9t°o
tooro = ¥zt"O |= zT°O BHT"O
voo"o §«€€T°O)§=6—LbTO
g00°0 = ovT°0
900°0-
6uT°O- ¥00°O 9ST°O Heo
veT°O- T6T°O-. S6T°O- 602°0-
BbZ°0- TOE°O- GHE*O- LLZ°O-
ve) a NW ww
[x4 :74 4 be

(€Z) A 2SLATWNY

saguogd S€‘SS =AUIaWOD
AN O°Sh «UD ALGO

(WALSKS “TWLNGWATS)

000°0
000°0
000°0
000°0
000°0
000°0
000°0
000°0

000°0
000°0
000°0
A
€

€00°0-
vo0°0-
9v0°0-

sv0°0-

Ty0°o- |

z€0°0-
0z0°0-
490°0
000°0

76Z°0-

cyt°o-

4€0°0
Is
oT

NOILWNOT VIOD NI 3SN WOd SLNSIOTII202 Wd TV SISWE

z00°0
000°0 j
LE0°0-
s€0°0-
Te€0°0-
20°0-
Tto°o-
$90°0
000°0
000°0

zet*o-

STT°o-

9ST°O-
Ww
et

€90°0
190°O
€vo°o
9v0°o
Ts0°O
@s0°O
yg90"0
vso°o
000°0
L€0°0
TEO°O
000°0
s€9°6
Tt0°0-
L16°0-
re)
9

Ow 2p
ay
nD 62
IN 62
@
aa 9%
NW SZ
= 4
A &
Is ot
‘We eT
a9

tag
w

ww

71


3.1B Calculated Compositions for Cr-Fe-Ni Alloys Using one Type Standard

$RUN CALCOMP

DATE: 02-OCT-84 TIME: 15:52:55

WHAT ‘TYPE OF UNKNOWNS DO YOU WISH TO ANALYZE :

1-ELEMENT SYSTEM  2-OXIDE SYSTEM — 3-FUSED DISK SYSTEM ? 1
DO YOU WANT TO INPUT KNOWN CONCENTRATIONS OF UNANALYZED ELEMENTS (Y/N)? N
INPUT N(NUMBER OF ANALYTES) & M(NUMBER OF SPECIMENS TO BE ANALYZED) : 3,3
INPUT NAMES OF ANALYTES (XXXXXXXX) (MAX.=8/LINE) =

boi FE NI
DO YOU WANT TO INPUT ALPHA COEFFICIENTS BY: 1-DATAFILE 2-KEYBOARD ? 2
TYPE IN THE ALPHA COEFFICIENTS :

0.0,-.107, .025,0.0,-.334,—. 328,020, «696, «261, 3*0.0, 3*0.0,0.0,.384,0.0
2.197,0.0,-.179,-.197,0. 297 ,--756,0.0, 588, 3*0.0,3*0.0,-.291,2*0.0
1,314,1.834,0.0,-.178,—.218,0.0,-.68: 745 ,0.0,3*0.0, 3*0.0,3*0.0

WHAT TYPE OF STANDARDS ARE AVAILABLE: 1-PURE STANDARDS 2-MULTIELEMENT STANDARDS ? 2
INPUT M1 (NUMBER OF STANDARDS) : 1

INPUT I.D. OF STANDARDS (<=8 CHARACTERS) :

I=1 5074

INPUT CONCENTRATIONS (WEIGHT FRACTION) OF STANDARDS :

Ie1 5074 +2525, 6838, .0498

INPUT NET INTENSITIES FOLLOWED BY A PERIOD FOR THE ANALYTE ELEMENTS IN STANDARDS =:
I=l 5074 3258. , 4522. 203.
INPUT I.D. OF SPECIMENS TO BE ANALYZED :

I21 5054

I= 2 5202

I= 3 5364

INPUT NET INTENSITIES OF SPECIMENS TO BE ANALYZED :
1 5054 3348. , 4689. ,6.
2 5202 2784.) 4480. ,642.
I= 3 5364 3361. ,3179.,1115.
DO YOU WANT TO CORRECT INTENSITIES FOR DEAD TIME (Y/N) ? N
DO YOU WANT TO PRINT OUT CALCULATED RELATIVE INTENSITIES OF STANDARDS &
‘CALCULATED PURE INTENSITIES FROM STANDARDS (Y/N) ? Y
CALCULATED RELATIVE INTENSITIES OF STANDARDS :
CR FE NI
‘STD.NO.=5074 0.32018 0.45370 0.02079
CALCULATED PURE INTENSITIES FROM STANDARDS :
eR FE NI
STD.NO.=5074 10175. 9967. 9764.
AVERAGE VALUES 10175. 9967. 9764.

BECAUSE ONLY ONE STANDARD IS AVAILABLE, THE ONLY CHOICE FOR LSF CALIBRATION CURVE IS: Y=A1*X.
DO YOU WANT TO PRINT OUT LSF COEFFICIENTS (Y/N) : Y¥

‘TABULATION OF CALCULATED LSF COEFFICIENTS
(X=MEAS.INT.  ; Y=CALC.REL. INT.)

Qa AD= 0.00000E+00 Al= 0.98276E-04 A2= 0.00000E+00
FE AD= 0.00000E+00 0.10033E-03 A2= 0.00000E+00
NI AD= 0.00000E+00 Al= 0.10242E-03 A2= 0.00000E+00

————-RESULTS OF LAST ITERATION—--—-

64


aanaaana

+++

SUBROUTINE ALPHA

THIS SUBROUTINE CALCULATES ALPHA COEFFICIENTS FOR
INTERELEMENT EFFECT CORRECTION USED IN COLA EQUATION
FOR ELEMENT, OXIDE, OR FUSED DISK SYSTEMS.

NBS 04-SEP-1984

REAL MAC, MU

DIMENSION XINT(2,300) ,XINT1(2,11) , TELE (12) »NE(12) ,NO(12),
CL(12,4) , ISR(12) ,1Z (12) ,Al (12,12) ,

A2(12,12) ,A3(12,12) »ALIK (12,12, 12) ,UCO(12) ,UC(12,12) ,C(5,3)
TE (12) ,G(5) ,ALFA(12) ,CAM(12) ,SWDB(12) ,SWDB1 (12)
COMMON K15,K1,N, IELE,NE,NO,KK2,CAM, IZ, ITP, ITS
COMMON /TUBEL/XINT, XINT1, ND

COMMON /TUBE2/IDTUBE, VOLT

COMMON /BDSUB/TP, TS,C,CL, IE,UC, UCO,NS

COMMON. /COESUB/A1,A2,A3,AIJK

DATA C/.001, «5, «999, 63,23, +999, 05, 2001, +7, «35,490.0/035/
IF (K1.NE.3)GOTO 4

WRITE (6,950)

DO 2 I=1,N

WRITE (6,960) I, IELE(I) ,NE(I) ,NO(I)

READ(5,*) CAM(I)

CONTINUE

GOTO 5

IF(K1.EQ.1)GOTO 5

C(1,1)=.2

C(2,1)=.8

C(1,2)=.8

C(2,2)=.2

WRITE (6, 1000)

READ(5, #) ITP, ITS
‘TP=1.0/SIN(ELOAT (ITP) * 0174533)
TS=1.0/SIN(FLOAT (ITS) *.0174533)

WRITE(6, 1010)

DO 10 I#1,N

WRITE (6, 1020) I, IELE (1)

READ(5,*) ISR(I)

CALL ATNUM(TELE(I) ,12(1))

CALL CHAWV(CL(I,1) , IELE(I) ,ISR(I))

CALL ABSEDG(CL(I,2) , IELE(I) ,ISR(I))

CALL YIELD(Y, IELE(I) , ISR(I))

CALL JUMRAT (RIM, IELE(I) ,ISR(I))

CL(1,3)=¥*RIM

CL(T,4)=1.0 .

IF (K1.NE.1)CALL APIOX(CL(I, 4) TELE (I) ,NE(I) »NO(I))
IB(I) *IELE(I)

CONTINUE

WRITE (6, 1022)

READ(5, 1024) KK2

CALL TUBDAT

IF (K1.£Q.3)CALL APAFD

IF(K1.EQ.3) RETURN

DO 170 II=1,N

IF (K1.£Q.1.AND.KK2.EQ."Y ')WRITE(6, 1030) IDTUBE, VOLT, ITP, ITS,
TELE (11) ,12Z(11)

IF (K1.EQ.2.AND.KK2.£Q.°Y ')WRITE(6,1040) IDTUBE, VOLT, ITP, ITS,
TELE (II) ,NE(IZ) ,NO(II) -12(II)

IF(KK2.EQ.°Y ')WRITE(6, 1050) (1Z(I) ,I=1,N)

IF (K1.EQ.1.AND.KK2.EQ."Y ')WRITE(6, 1060) (IELE(I) ,I=1,N)
IP(K1.£.2.AND.KK2.EQ.'Y ')WRITE(6,1070) (IELE(I) »NE(I) »NO(I):,

19


REAL FUNCTION MU(INAM,WV)

THIS SUBROUTINE GENERATES MASS ABSORPTION COEFFICIENTS AT
A GIVEN WAVELENGTH FOR VARIOUS ELEMENTS ACCORDING TO
LEROUX ALGORITHM (1979 VERSION).

nes 04-SEP~1984

aaanaaan

IMPLICIT INTEGER (I,J)
IMPLICIT REAL (A-H,K=2)
CALL ATNUM(INAM, IZ)
£=12.3981/W
OPEN (UNIT#=3 , NAME='MACPRM.DAT' , TYPE='OLD' ,ACCESS=' DIRECT’ ,
1 MAXREC#94, RECORDSIZE=24)
READ(3'I2) C,K,NK,EP,CK1,NCK1,L1,NL1,L2,NL2,L3,NL3,M1,NM1,
1 -M2,NM2,M3,NM3,M4,NM4 ,MS,NMS,N1,NN1
CLOSE (UNIT=3)
IF(E.GT.K) GO TO 30
IF(E.GT.L1) GO
IF(E.GT.L2) GO
IF(E.GT.L3) GO
IF(E.GT.M1) GO
IF(E.GT.M2) GO
IF(E.GT.M3) GO
IF(E.GT.M4) GO
IF(E.GT.MS) GO
IF(E.LT.N1) GO
MUSC*N1*WV**NN]
GO TO 150
30 IP(1Z.GT.57) GO TO 120
IF(E.LT.EP) GO TO 35
MUSC®K*WV**NK
GO TO 150
35 MU=CKL*WV**NCK1
GO TO 150
40 MU=C*L1*WV**NL)
GO TO 150
50 MU=C*L2*WV**NL2
GO TO 150
60 MU=C*L3*WV**NL3
G TO 150
70 MU=C*M1 *WV**NM1
GO TO 150
80 MUSCIM2*WV**NM2
GO TO 150
90 MU=SC*M3*WV**NM3
GO TO 150
100 MU=CEM4*WVP NG
GO TO 150
110 MUSC*MS *WV**NMS
GO TO 150
120 Mu=0.
150 RETURN
END

38aaddaaaa
SESSSsses

606

37


NOA(I) Chemical symbols of constituents

NOA1(I) Chemical symbols of analytes
NS(I) Identification of standard(s)
NX(I) Identification of unknown(s)
x

RX(M,I) Ry Calculated relative intensity of unknown

, x
RX1(M,I) Ry Calculated relative intensity of unknown
SCI(I) Sum of terms a{j Cj and afj, Cj Cy
TOT(M). Sum of concentrations calculated for unknown -

(2) Additional Variables in DATAIN

Ky Optional switch for inputting coefficients by
(1) datafile or (2) key-in on keyboard

KK1 : Optional switch for using fixed concentrations

NAMFIL(5) . Datafile name of ALPHA coefficients

(3) Additional Variables in CALRI

A(I,3) _—_ Calibration coefficient obtained with least
squares fitting of Rg versus "

AA(I,3) Calibration coefficient obtained with least
squares fitting of Re versus W

IP1(M1,1) Calculated pure intensity from standard

IP11(M1,1) Calculated pure intensity from standard

IP(1I) Average of calculated pure intensity from
standards

IPP(I) Average of calculated pure intensity from
standards

K3 Optional switch for choosing a certain type of

least squares fit for calibration:
(1) Y=AO+A1*X; (2) Y=AO+A1*X+A2*X*X;
(3) Y=A1*X; (4) Y=A1*X+A2*X*X
KK3 Optional switch for printing out calculated

relative intensity of standard and pure
intensity calculated from standard

KK4 . . : Optional switch for printing out calibration
. coefficient
NO oe a Fitting exponent of least squares
_ s
“RS(M1,1) Ry : Calculated relative intensity of standards

58


+ SSX, "GEOMETRY: e's" 12," DEGREES! ,///,

+ S6X,' ANALYTE: TL," ,11,1X," ("125") //)
1050 FORMAT (16X, 16 (SX, 12, 1X) ,/)
1060 FORMAT (/17X, 16 (4X,A2, 2X) »/)
1070 FORMAT (/18X, 16(2X,A2,I1,'0" ,11,1X) »/)
1080 FORMAT (/11X,'Al! , 4X, 12F8.3)
1090 FORMAT (/11X,‘A2' ,4X,12F8.3)
1100 FORMAT (/11X,'A3' , 4X, 12F8.3)
1110 FORMAT (/5X, ‘ALJK 2,1X,A2, 1X, F8.3, 1X)
1120 FORMAT (/2X, 'ALJK 2,1X,A2,T1,'0' ,11,1X,F8.3,1X)
1130 FORMAT (/11X, 12,1X,A2, 1X, 12F8.3)
1140 FORMAT (/8X, 12, 1X,A2,I1,°O' ,11, 1X, 12F8.3)

END

23


ez0°u- = 220°O-

ceeet
€0zaa

by4

vOO"O- L9T*U- L2T°U- BUT*O- OU0"O TEO*O- 6Z0°O- LZ0°0- pPz0°0-

€60°T
eOZNW

Se

ObT*0- vOT*O- SBU°0- 000°0 ££0°0- O£0"0- sz0°0- Sz0*O-
dby°O = LSv°O,— OU" LTE*O- 68Z"O- -B9z*O- _ZbZ"O-
cLb°0 =000°0)— U¥Z*0-  9EZ*O- LIZ*0- S6T*O-

O00°U = vEZ*U-  ZTZ*O- BET*O- HLT“ U-

000°0 §=©000°0 §=—000°0 )§=— ovo"

0vd°v §=000"0 §~=— gu0"0

000°0- 000°u

0u0°0

k6T°O- GI2"O- UtZ*O- 000°O 00"O- EOUO- £c00°O- £00°0-
86S°O tTb°O GIE°Y “OOO SSI? G6EB"T SOOT 9PETT
zoulL §=l0lvo 102% {OTS SO%d ZOLIS €0z?IW I0IDW

(<4 4 6t oT st oT eT cas

(91) COT S *aLATWNY

Saqguoad SE‘SS *AWLIWO"D
AN 0°Sh =D 2LGOUVL

(WaLSAS ‘gq1x0)
NOILVNO3 V100 NI GSN YOd SLNGIDIGIGOD WHdTV GIuEAH

¢20°0-
€Z0°0-
0zZ°0-
9LT*O-
9ST°O-
000°0
000°0
000°0
000°0

000°O

z00°0-

LeUT

TOZWN
acs

900°0-
900°0-
z90°0-
s€0°0-
220°0-
000°0
000°0
000°0
000°0
000°0
000°0
000°0
1T00°0-
vIT°O-
Exe) ae)
9

€O%as 92%
€OZNW SZ
ZOTIL 2
TOTW 0%
To? 4 6T
Ot S OT
sO d ST
cous oT
€OZTW tT
TOTOW 21
TOWN IT
€0o1 29
aw

Ww

91

wiv


agnaaanna

10
20

40

SUBROUTINE CALRI

THIS SUBROUTINE CALCULATES RELATIVE INTENSITIES OF ANALYTE
SPECIMENS USING MULTIELEMENT STANDARD(S) AND THE COLA
EQUATION.

NBS O5-SEP~1984

REAL IP1 (20,13) ,15(20,13) ,IP11 (20,13) ,IPP(12) ,IP(13) ,IX(20,13)
DIMENSION SCI (13) ,CS(20,13) ,Al (13,13) ,A2(12,12) ,A3(12,12),
AIIK(12,12,12) ,RS (20,13) ,RS1 (20,12) ,RX(20,13) ,RX1 (20,12)
DOUBLE PRECISION NOA(13) ,NOA1(13) ,NS(20),

X(20) ¢¥ (20) 8 (3) »A(12,3) ,AA(211,3)-

COMMON K1,N6,N,M,M1,K2,KK1,KK6

COMMON /DATSUB/CS, IS, IX,NS

COMMON /COESUB/A1,A2,A3,ALJK

COMMON /LSFSUB/X,Y

COMMON /CALSUB/RX,RX1

COMMON

/GETSUB/NOA, NOA1
EQUIVALENCE (X(1) ,IP11(1,1)) ,(¥(1) ,IP11(1,3)) »(A(2,1) ,IP11(1,5))
e(AA(1,/2) , IP11(1,9)) , (IP1,RX) , (RS1,RXL)
IF(KK6.EQ.'Y *)GOTO 210
N2=N6-1
DO 90 L#l,Ml
IF(KK1.EQ.'Y ')J7=0
DO 90 I=l,N6
IF(KK1.EQ.'N ')GOTO 30
DO 10 18=1,N
IF (NOA(I) -EQ.NOA1(I8))GOTO 20
CONTINUE
GOTO 90
J7sI7+1
SCI(I)=0.0
a=0.0
DO 40 19=1,N6
CMeO4+CS (L, 19)
CONTINUE

(CM=CM-CS (L,I)

DO 50 Jal,N6

IF (K1.EQ.3)SCI(I)*SCI(I)+CS(L,J) *Al (I,J)

IF (K1.EQ.2) SCI (I) *SCI (I) +CS(L,J) * (Al (I,J) +A2 (I,J) *CM)
IF(K1.EQ.1)SCI(I)=SCI(I)+CS(L,J) *(Al(I,J)+A2(I,J)*QY
(1.0+A3 (I,J) *(1.0-CM)))

CONTINUE

IF(K1.EQ.3)GOTO 70

DO 60 J#1,N2

KKaJ+]

DO 60 KeKK,N6

SCI(I)=SCI (I) +AIJK(I,K,J) *CS(L,J) *CS(L,K)

CONTINUE

RS(L,1)#CS(L,1)/(1.0+SCI(I))
IF(RS(L,1I) .£Q.0.0)GOTO 80
IP1(L,I)#1S(L,1)/RS(L,1)

IF (KK1.EQ."Y ')PS1(L,J7)=FS(L,1)
IF(KK1.EQ."Y ')IP11(L,J7)=IP1(L,1)
CONTINUE

IF(KK6.EQ.'Y *)GOTO 160

WRITE (6,500)

READ(5,510) KK3

IF (KK3.EQ.'N *)GOTO 160

IF(KK1.EQ."Y ')WRITE(6,520) (NOA1 (J) ,»J=1,N)
IP(KK1.EQ.'N ')WRITE(6,520) (NOA(J) ,J=1,N)
DO 100 I=1,M1

44


600°0- 8¢9°0- SSS°0- SzS*O- YEO"O- 9T0°O- z200°0- L00°0 ¥T0°O
“SS*0- €6b°0- L9b°U- 7220°0- 900°0- 900°U £T0°O0 020°0.

bie°o =yIL"O) «= GTE"O | LEZ*O- BUZ"O LYZ"O. ZLZ"0

d@L°O) «THEO, LTE*O = L8Z°O— GBZ"O- 8BZ*O

Ste°O §8OTE°O §=608Z"0)— LkZ@"0 Ss (O8Z"0

SbT°O) §=6BET°O «=SET°O = DET*O

UTO §=660T"O )=—LOT"O

zg0°0 = 180°0

190°0

wgo°G- 990°0- SE°O- Sbe°O- ELE°O- PST°O- b2T°U- 60"O- TLO°O- TSU°U-

Tev’y =TOT’h «= SZ°ZezL°T LZ °T LET°T = 086"0S 8ZB°O) GT9"O BLE"

cozag.« CO¢NN ZOTIL «= TOIVD «TOC MH CEOT SS «=SO2 dd ZOTIS «COTW TOTDW
9% se (<4 v4 6t oT st ot eI a

(11) TO?WN *aLAIWNY

Saguoad S€/SS *ANLIWOID:
AV O°Sh =D LGD

(WALSAS aIX0)
NOILVNOG VWIOD NI 3SN 4Od SINGIDIGIIOD WIV dTuaAH

000°0
000°0
000°0
000°0
000°0
000°O
000°
000°0
000°0
000°0

000°0

000°0

TO?WN
uw

Lt0°0-
6T0°0-
TSE*O-
‘STEe*O-
S0E°0-
6z0°0-
£z0°0-
Lt0°O-
yTo°O-
sT0°0-
000°0

000°0

000°0-
L62°T

Ex) ae)

Oza 9%
COZNW SZ
ZOTIL 2
TOTW 02
TO? ¥ 6T
€ot S oT
so d ST
ZOUIs oT
€OzTw €T

TOTO 2T

TOZW IT
tol o9
w
Ww

86

wiv


AIJK

ALJK

24R
26 FE
28 NI

24 CR
26 FE
28 NI

al

24 CR
26 FE
28 NI

BASIC ALPHA COEFFICIENTS FOR USE IN COLA EQUATION
(ELEMENTAL SYSTEM)

‘TARGET: W 45.0 KV
GEOMETRY: 63,33 DEGREES
.

ANALYTE: CR (24)

24 26 28

cR FE NI
0.000 -0.107 0.025
0.000 -0.334 -0.328
0.000 0.696 0.261

0.000
0.000
0.000 0.384
ANALYTE: FE (26)
24 26 28
cR FE NI

2.197 0.000 -0.179
0.197 0.000 -0.297
0.756 0.000 0.588
0.000

0.000

0.291 0.000

ANALYTE: NI (28)

24 26 28
RR FE NI
1.314 1.834 0.000
0.178 -0.218 0.000
70.689 -0.745 0.000
0.000
0.000
0.000 0.000

63


LuU"U- GLv°U- «EBETO- ~OSE*U- YZO"O- ZTO°O- €00°O- €00°O 000°O [yO"O- ETN°O- €0zaa 9z
68£°U- UvE*O- 6IE°O- STO°U- S00°0- £€00°0 800°O 000°0 €h0°0- BIO°O- fOZNW SZ
GES°O Z¥S*OLEZ"OGIZ*O-NGT"O HET") 000° LYS*O- SbZ"U- = ZOTIL 22
9SS°0 -8SZ°0ObZ*O--YTZ*O— ETZ°0)— 00°09) wOS*O- =YIZ°O- = TOT 0%
“sz°0 GEZ"O STZ*O-—sTTZ*O,--QU0"0-—s GLB*O- =L0Z°O- = «TOR * «GT
GOT°O §=6€0T°O §=6TOT*O §=000°0 Ss SLO°O- ~G6TO"O-' EOT S OT
$80°0" 280°O0 000°0 6S0°0- HIO°O- SO% d ST
€90°0 §=6000°0)§=Sy0"O- =TTO"O- §=zOTIS oT
000°0 §=6L€0"O- OTO°O- Oz TW ET
000°0 = 000° TOTSW 2 5
000°0 TOZWN IT
000°0 €or39 WIV
OvO"O- =THO"O- 66T"O- ZIZ*O- LOZ*O- EOT*O- b80"O- S9U°U- 6¥0°0- 000°0 000°0- 000°0- ww
bsove §=6SE9"2 «= BUEE = TW6"O) SEL*O = BTS°O) GUPO) ZOE"O = SST°O)=—000°0 Ss wea*z =BT9°O Ww
€o¢cad «= COCNN «ZOTIL «=TOIVD «TOR HW. COTS SO2d ZOTIS f€0ZIV TOTDN TO?W COI D
9% ‘4 (<4 4 6T ot ST oT fai cas Aas 9

(21) Totow :aLAIWNY

(WaLSAS gaIxo)
NOILVNDE W100 NI SSN YOd SINDIDIGIION Wd TV GIuaAH


—______________CL(TI,J)=z

UPDATE 5/20/85

10 CONTINUE

c
WRITE (6,1022)
READ (5,1024) KK2
CALL TUBDAT
IF(K1.EQ.3)CALL APAFD
IF(K1.EQ.3) RETURN
DO 170 II=1,N

C:FILTER
ANS='NO!
IF(KFILT(II) .EQ.2)ANS="YES'
C:FILTER :
C:FILTER IF(K1.EQ.1.AND.KK2.EQ.'¥ ')WRITE(6,1030) IDTUBE, VOLT, ITP, ITS,
C:FILTER + IELE(II),12Z(I1)
C:FILTER IF(K1.EQ.2.AND.KK2.EQ.'Y ') WRITE (6,1040) IDTUBE, VOLT, ITP, ITS,
C:FILTER + IELE(II),NE(II),NO(II) ,1Z(II)

IF(K1.EQ.1.AND.KK2.EQ.'Y ') WRITE (6, 1030) IDTUBE, VOLT, ANS, ITP, ITS,
+ IELE(II),1I2Z(I1)
IF(K1.EQ.2.AND.KK2.EQ.'Y ') WRITE (6, 1040) IDTUBE, VOLT, ANS, ITP, ITS,
+ IELE(II),NE(II),NO(II) ,1Z(II)
C: FILTER
IF(KK2.EQ.'Y ')WRITE(6,1050) (IZ(I) ,I=1,N)
IF(K1.EQ.1.AND.KK2.EQ.'Y ')WRITE(6,1060) (IELE(I) ,I=1,N)
Pee) oor Pe AND. RK2. EQ. '¥ ') WRITE (6,1070) (IELE(I) ,NE(I) ,NO(I),
+ I=1,N
DO 15 J=1,4
Z=CL(1,J)
CL(1,J)=CL(II,J)

15 CONTINUE
NAM=IE(1)
IE (1) =IE (II)
IE(II)=NAM
DO 20 I=1,N
Al(II,1I)=0.0
A2(II,I)=0.0
A3(II,1I)=0.0
DO 20 J=1,N
AIJK(II,I,J)=0.0

20 CONTINUE

ICAS=1
N2=N

30 IF(ICAS.EQ.2)N2=N-1
DO 110 M=2,N2
DO 35 J=1,4
Z=CL(2,J)
CL(2,J)=CL(M,J)
CL(M,J) =Z

35 CONTINUE
NAM=IE (2)
IE (2)=IE(M)
IE(M) =NAM
M1=M+1
IF(ICAS.EQ.1)M1=N
DO 100 MM=M1,N
IF(ICAS.EQ.1)GOTO 40
DO 38 J=1,4

20


————————

UPDATE 5/20/85

160

165

168
170
190
950

960

IF(K1-EQ.1) WRITE (6,1100) (A3(IT,J) ,J=1/N)
IF(K1-EQ.1) WRITE (6,1110)1Z(1) , TELE (1) ,ATIK (ITT, 1,1)
IF (K1.EQ. 2) WRITE (6,1120)1Z(1) , TELE (1) ,NE(1) NO(1) ,ATIK(IT, 1,1
DO 160 J=2,N
NA=d-1
TF (K1~EQ-1) WRITE (6,1130)1Z(J) ,LELE(J) » (ALSK (II, Jy K) ,K=1,NA)
IF(K1,EQ.2) WRITE (6,1140) IZ(J) , TELE (J) ,NE(J) »NO(3)
+ (AIJK(II,d,K) ,K=1,NA)
CONTINUE

N2=N-1

IF(N2.LT.3)GOTO 170

DO 168 I=3,N2

T1lsI-1

DO 165 J=1,4

Z=CL (11,3)

CL(I1,J)=CL(I,J)

CL(I,J) =2

CONTINUE

NAM=IE (11)

IE(1I1)=IE(T)

IE(I)=NAM

CONTINUE

CONTINUE

RETURN

FORMAT (1X,'INPUT MEAN CONCENTRATIONS (WEIGHT FRACTION) OF ANALYT
+ES IN THE SPECIMENS TO BE ANALYZED: ')

FORMAT (3X,'I=",12,4X,A2,11,1HO,11,4X,$)

-1000—FORMAT(1X,!FOR SAMPLE GEOMETRY, INPUT INCIDENCE & EMERGENCE ANGL

+ES (DEGREE-XX): ',$)

C:FILTER

c1010

FORMAT (1X,'INPUT THE CHARACTERISTIC LINE NUMBER YOU WISH TO MEAS

C:FILTER +URE (1-KA, 2-KB, 3-LAl, 4-LBl, 5-LB2):')

1010

FORMAT (1X,' INPUT THE CHARACTERISTIC LINE NUMBER YOU WISH TO MEAS
+URE (1-KA, 2-KB, 3-LA1, 4-LBl, 5-LB2):',/,' FOLLOWED BY Y OR N ‘,
. ' (USE OF FILTER) E.G. 1N')

C:FILTER

1020

FORMAT (1X,'I=",12,4X,A2,4X,$)

1022 FORMAT (1X,'DO YOU WANT TO PRINT OUT CALCULATED ALPHA COEFFICIENT
+8(Y¥/N):  ',S)

1024 FORMAT (A1)

C:FILTER1030 FORMAT (1H1,//,41X,'BASIC ALPHA COEFFICIENTS FOR USE IN COLA

C:FILTER +EQUATION' //58X," (ELEMENTAL SYSTEM)" ,////,

C:PILTER + 55X," TARGET: ',A2,2X,F5.1,' KV's/,

C:FILTER + 55X,'GEOMETRY: ',12,',',12,' DEGREES’ »///,

C:FILTER + 58X," ANALYTE: ',A2,1X,'(',12,')',//)

C:PILTER1040 FORMAT (1H1,//,41X,'HYBRID ALPHA COEFFICIENTS FOR USE IN COLA

C:PILTER + EQUATION'//58X,' (OXIDE SYSTEM) ',////,

C:FILTER + 55X,' TARGET: ',A2,2X,F5.1,' KV's/+

C: FILTER + 55X,'GEOMETRY: ',12,',',I2,' DEGREES',///,

C:FILTER + 56X,' ANALYTE: ',A2,I1,'0",I1,1X,"("rT2e')' 6//)

C: FILTER

1030 FORMAT (1H1,//,41X,'BASIC ALPHA COEFFICIENTS FOR USE IN COLA

1040

+EQUATION' //58X," (ELEMENTAL SYSTEM)" ,////1
+ 49X,' TARGET: ',A2,2X,F5.1,' KV',' FILTER + ",A3,/5
+ 55X,'GEOMETRY: ',12,',',12,' DEGREES' r///,
+ 58X,' ANALYTE: ',A2,1X,"(',12,')',//)
FORMAT (1H1,//,41X,'HYBRID ALPHA COEFFICIENTS FOR USE IN COLA

23


30
32

34

40
50
60

70

80

CONTINUE
GoTo 34
UE=((CL(1,4)*U(1)+(1.0-CL(1,4)) *U0) *CA+(CL(J, 4) *U(J)+(1.0-
CL(J,4)) *U0) *CB) *TP

UE@F*UE+(1,0-F) *UF*TP :

UEI=((CL(1,4) *UC(1,1)+(1.0-CL(1,4)) *UCO(1)) *CA+(CL(J,4)*
UC(J,1)+(1.0-CL(J,4)) *UCO(1)) *CB) *Ts

UEI*F*UEI+(1.0-F) *UCF(1)*TS
UEI=(CL(1,4)*UC(1,J)+(1.0-CL(1,4)) *UCO(J)) *CA+(CL(J,4)*
UC(I,J)+(1.0-CL(J,4)) #UCO(J)) *CB

UEJ=F*UEJ+(1.0-F) *UCF(J)
T1l=.5*CL(J,3) *CL(J,4) *UC(1,J) *U (J) /U (1)

T2=(ALOG (1. 0+UE/UEJ) ) /UE

T3= (ALOG (1. 0+UEI/UEJ) ) /UEI

DELTA(J)=T1*(T2+T3)

GOTO 50

DELTA(J)=0.0

IF (K1.NE. 3) SDELTA=SDELTA+C (I,J) *DELTA(J)

CONTINUE

IF(K1.EQ.3)GOTO 70

sw=W

SWDB(1)=W* (1.0+SDELTA) /(1.0+SBETA)

RETURN

SW=aW/(1.0+(1.0-F) *PHIF)

CP=(1,0-F)/(1.0-F*CLOI)

SWLOI=W/(1.0+CF*PHIF)

DO 80 J=2,N5

SWDB (J) =W* (1. 0+F*CB*DELTA(J)) /(1.0+F*CB*BETA(J)+(1.0-F) *PHIF)
CONTINUE

RETURN

END

31



TI. PROGRAM STRUCTURE

NBSGSC is divided into two separate programs (CALCO and CALCOMP*) where
each program consists of a main program and a series of subprograms linked to
the main program as ‘shown in Figures 1 and 2. The list of symbols and per-
manent data files used in programs CALCO ‘and CALCOMP are presented in
appendix 2.

In CALCO, a subroutine TUBDAT along with subroutines CTNLIN, CHALIN,
INFTGT and datafile TGTWR.DAT are used mainly to perform the calculation of
the X-ray tube spectral distribution. This requires input of the X-ray tube
target, voltage, take-off angle, Be window thickness, and the ending wave-
lerigth of the continuum. The spectral distribution calculation is based on
an NBS algorithm proposed by Pella and Feng [3], which utilized experimental
electron microprobe data obtained under various conditions. The calculation
of the X-ray intensities for both the continuum and characteristic lines (KA,
KB, LA1, LB1) from the X-ray tube are performed in CTNLIN and CHALIN respec-
tively, and intensities for the other characteristic lines (LB2, LB3, LB4,
LG1 = LY1, LG2 = LY2, LG3 = LY3, LL) are obtained from the intensity ratios
of the lines to the LAl line tabulated in the literature [8].

There are two real functions, named MAC and MACFUN, each of which could
be chosen for computing mass absorption coefficients. When using the func-
tion MAC, the mass absorption coefficients are calculated from the algorithm
of Heinrich [9] using the general relation

ue ca” (5)

where A is the wavelength in angstroms and the coefficient C is calculated by
a least-squares fit. Parameters required in the function MACFUN using the
general equation of Thinh and Leroux [10], that is,

we C Ea, a (6)

where E., is the absorption edge energy (keV), however, are all stored in the
direct-access datafile MACPRM.DAT. MACFUN requires more time to calculate
mass absorption coefficients than the function MAC.

The’ wavelengths of analyte lines (KA, KB or LA1, LB1 or LB2), the
corresponding wavelengths of the absorption edges (for K ‘or LII or LIII
shell) and the corresponding X-ray fluorescent yields (for K or LII or LIII
shell) are computed in Subroutines CHAWV, ABSEDG, and YIELD, respectively, by
means of empirical fits. The jump ratio values for the K or LIII shell, how-
ever, are stored in Subroutine JUMRAT. The atomic fraction of an analyte in
an oxide compound is calculated in the Subroutine AFIOX.

*Disclaimer - CALCOMP is an acronym for calculation of composition and is not
intended to refer to the commercial company by the same name.


280

290
300

310
320

330
500
510
520

530
540

550
555
557
560
570
580

590

IF(NOA(I) .EQ.NOA1(I8))GOTO 290

CONTINUE

GOTO 310

J7=37+1

IF (IX(L,I) .EQ.0.0) IX(L,I)=1.0E-20
RX(L,1)=A(I,1)+A(I,2) *1X(L, I) +A(I,3) *IX(L,I) *IX(L, I)
IE(KK1.EQ."Y *)RX1(L,J7)=RX(L,I)

GOTO 320

IF(KK1.EQ."Y ')RX(L,I)=IX(L,I)

CONTINUE

IF(KK4.EQ.'N ')RETURN

WRITE (6,580)

DO 330 1=1,N

IF(KK1.EQ.*Y ')WRITE(6,590)NOA1 (I), (AA(I,J) ,J=1,3)
IF(KK1.EQ.'N ') WRITE (6,590)NOA(I) , (A(I,J) ,J=1,3)
CONTINUE

RETURN

FORMAT(1X,'DO YOU WANT TO PRINT OUT CALCULATED RELATIVE INTENSIT

+IES OF STANDARDS &'/2X," CALCULATED PURE INTENSITIES FROM STANDARD
+8 (Y/N) ? .',S)

FORMAT (Al)

FORMAT(/1X,"CALCULATED RELATIVE INTENSITIES OF STANDARDS 3',/
19X, 12(1X,A8))

FORMAT (1X, 'STD.NO.=' ,A8, 2X,12(F8.5,1X))

FORMAT (/1X,*CALCULATED PURE INTENSITIES FROM STANDARDS 3/
19X,12(1X,A8))

FORMAT (1X, 'STD.NO.=" ,A8, 2X, 12F9.0)

FORMAT (/1X,*AVERAGE VALUES' ,4X,12F9.0)

FORMAT (/1X,"BECAUSE ONLY ONE STANDARD IS AVAILABLE, THE ONLY CHO

+ICE FOR LSF CALIBRATION CURVE IS: Y=A1*X.')

FORMAT(/1X,'WHAT TYPE OF LSF CURVES DO YOU WANT TO USE FOR CALIB

+RATION :' /3X,'(1) Y=AO+A1*X (2) YSAO+A1*X+A2*X*X!
+ /3X,"(3) Y=Al*X (4) Y=AL*X+A2*xX*X 2? ',$)

FORMAT(' DO YOU WANT TO PRINT OUT LSF COEFFICIENTS (Y/N) = ',$)
FORMAT (/15X, ‘TABULATION OF CALCULATED LSF COEFFICIENTS’ af

+ 19X,"(X=MEAS.INT. ; Y=CALC.REL.INT.)',/)

FORMAT (1X,A8, 2X, 'AO=' ,E12.5, 2X, 'Al=' ,E12.5, 2X, "A2=" 7E12.5)
END

46


To achieve optimum analytical results, it should be recognized by the
user that accurate net x-ray intensities need to be measured. Corrections to
measured x-ray intensities for background, blanks, x-ray line overlaps,
detector dead-time,and spectral artifacts such as sum and escape peaks,

should always be carefully considered.


170

180

190

200

210

220
500
510
520
530
540
545
550
560

570
572

574
580

“590
600

+)

IF(L1.LE.10)L1=L1+1
IF(L1.LE.10)GOTO 65

IF(L1.GT.10) PAUSE'NO, OF ITERATION > 10°

TOT(L)=0.0

DO 190 I9=1,N6

CX1(L,19)=CX(L,19)*100.0

CX(L, 19) =AINT (1. 0E4*CX(L,19)+.5)/100.0

TOT (L) =TOT (L) +CX(L,19)

CONTINUE

WRITE (6,560)L1, (NOA(I) ,CX1 (L,I) ,I=1,N6)

WRITE(6,570) TOT (L)

CONTINUE

WRITE (6,572) (NOA(I) , I=] ,N6)

DO 210 L=1,M

WRITE(6,574)NX(L) , TOT(L) , (CX1 (L,I) ,I=1,N6)

CONTINUE

WRITE (6,580)

READ (5,530) KK5S

IF(KK5.EQ.'Y ')CALL GETERR

IF(M1.EQ.1.0R.K2.EQ.1)GOTO 220

WRITE (6,590)

READ (5,530) KK6

IF(KK6.EQ."Y ')GOTO 50

WRITE (6,600)

STOP

FORMAT(///1X,'DATE: ',5A2,6X,"TIME: ',4A2/)

FORMAT (1X,'WHAT TYPE OF UNKNOWNS DO YOU WISH TO ANALYZE 3/7
3X,°1-ELEMENT SYSTEM 2-OXIDE SYSTEM 3-FUSED DISK SYSTEM ?
*,8)

FORMAT(1X,'DO YOU WANT TO CORRECT INTENSITIES FOR DEAD TIME (YAN
2? ',$)

FORMAT (A1)

FORMAT(1X,"INPUT THE DEAD TIME IN MICROSECONDS : ',$)
FORMAT(/" —--—-RESULTS OF LAST ITERATION--——'/)

FORMAT (/1X, 'SMP.NO.=" A8,2X,'R=' ,6(A8,F8.5, 1X) /21X,6(A8,F8.5,
1Xx))

FORMAT (13X, 'L=' ,12,2X,'C=" 6(A8,F7.3, 1H%, 1X) /21X,6(A8,F7.3,
1H8, 1X) /21X,A8 ,£7.3, 1H8)

FORMAT (19X, 'TOTAL=" ,F7.2, 1H8/)

FORMAT (//45X, ‘TABULATION OF RESULTS (%)'//

1X,'SMP.NO. TOTAL = ',13A8)

FORMAT (/1X,A8,1X,F7.2,13(F7.3,1X))

FORMAT(///1X,'DO YOU WISH TO COMPARE THESE RESULTS WITH OTHER P

+REVIOUSLY KNOWN VALUES FOR THESE SPECIMENS (Y/N) ? *,$)

FORMAT(//1X,'DO YOU WANT TO TRY ANOTHER TYPE OF CALIBRATION CURV

+E (Y/N) ? ',$)

FORMAT (///)
END

40


———————

UPDATE 5/20/85

aaaaaaa

+++

SUBROUTINE ALPHA

THIS SUBROUTINE CALCULATES ALPHA COEFFICIENTS FOR
INTERELEMENT EFFECT CORRECTION USED IN COLA EQUATION
FOR ELEMENT, OXIDE, OR FUSED DISK SYSTEMS.

NBS 04-SEP-1984

REAL MAC,MU

DIMENSION XINT (2,300) ,XINT1(2,11) ,TELE(12) ,NE(12) ,NO(12),
CL (12,4) ¢ISR(12) ,1Z(12) AL (12,12),

AZ (12,12) pA3 (12/12) ,ATIK (12,12, 12) -UCO(12) ,UC(12,12) .C(5,3)
TE (12) 9G (5) »ALFA(12) ,CAM(12) , SWDB (12) , SWDB1 (12)

COMMON K15,K1,N, IELE, NE, NO, KK2,CAM, IZ, ITP, ITS

COMMON /TUBE1/XINT, XINT1,ND

COMMON /TUBE2/IDTUBE, VOLT

COMMON /BDSUB/TP, TS,C CL, IE, UC, UCO,NS

COMMON /COESUB/A1,A2,A3,AIJK

DATA C/ 0001 y «5p 2999p «37 0319997254 2 O0Ly + Tp 2 354440205 « 35/

C:FILTER

COMMON/FILTER/KFILT (12)

C:FILTER

IF(K1.NE.3)GOTO 4

WRITE (6,950)

DO 2 I=1,N

WRITE (6,960) 1, IELE(I) ,NE(I) ,NO(T)
READ (5,*) CAM(I)

CONTINUE

GOTO 5

IF(K1.EQ.1)GOTO 5

c(1,1)=.2

C(2,1)=.8

C(1,2)=.8

C(2,2)=.2

WRITE (6,1000)

READ (5,*) ITP, ITS
TP=1.0/SIN (FLOAT (ITP) *.0174533)
7TS=1.0/SIN (FLOAT (ITS) *.0174533)
WRITE (6,1010)

Do 10 I=1,N

WRITE (6,1020)1I, IELE(1)

C:FILTER READ (5,*) ISR(I)

2019

IANS='N'

KFILT(I)=1

READ (5, 2019) ISR(I) , IANS

FORMAT (I1,A1)

IF (IANS. EQ.'F'.OR. IANS.EQ.'Y') KFILT(I)=2

C:FILTER

CALL ATNUM(IELE (I) ,1Z(T))

CALL CHAWV(CL(I,1),TELE(I) ,ISR(I))

CALL ABSEDG(CL(I,2) ,IELE(I) ,ISR(I))

CALL YIELD (Y, IELE(I) , 1SR(I))

CALL JUMRAT (RJM, IELE(I) , ISR(I))

CL(I,3)=Y*RIM

CL(I,4)=1.0

IF(K1.NE.1) CALL APIOX(CL(I,4) ,IELE(I) ,NE(I) ,NO(I))
IE (1) =IELE (I)


105
110
120
130
145
150

160
170

180

CALL CLOSE (3)

CALL DATE ( IDATE)

CALL TIME(ITIME)

WRITE (6,95) IDATE, ITIME
STOP

FORMAT(///1X,"DATE: ',SA2,6X,"TIME: ',4A2/)

FORMAT (1H1,//1X,"DATE: ',5A2,6X,'TIME: ',4A2/)

FORMAT(1X, "WHICH SYSTEM DO YOU WISH TO ANALYZE:'/3X,
+ ‘1-ELEMENT SYSTEM 2-OXIDE SYSTEM 3-FUSED DISK SYSTEM ? ',$)

FORMAT(1X," INPUT NUMBER OF ANALYTES: ',$)

FORMAT (1X, "INPUT NAMES OF ANALYTES (XXS): ',S)

FORMAT (12(A2,1X))

FORMAT(1X, ‘INPUT NAMES OF ANALYTES (XXNONS): '/)

FORMAT (12(A2,I1,1X,11,1X))

FORMAT(1X, "WHAT MASS ABS. COEF. ALGORITHM DO YOU WANT
+70 USE 3'/3X,"1-LEROUX ALGORITHM 2-HEINRICH ALGORITHM ? ',S)

FORMAT(1X,"DO YOU WANT TO CREATE A DATAFILE FOR SAVING CALCULATE
+D ALPHA COEFFICIENTS (Y/N)? ',$)

FORMAT(A1)

FORMAT(1X," INPUT DATAFILE NAME OF ALPHA COEFFICIENTS (XXXXXX. XXX)
+: ',$)

FORMAT (5A2)

BED

18


-W45 as an Example of Measured

The Contents of Datafile SDXT75

X*ray Tube Spectral Data

Table 1-

mes ee ess
oe PM ANDONOTN
ANNAN CNN eietied see

TR OSADOAN =
AANAN CANAAN

GAESKAN IAA
wnones

a
in
4
a
a
vs
°
a
r
VS
Kel
a
<
°
a
-
a
+
°
qa
a
J
°
AAANNN eMNHN tied 6 2c
ray
a)
s
A
c
“
°
a
-
w
Oa)
°
a
4
ra)
”
°
a
4
Pal
“a
4
a

2454,1.2627,1.3016,1.0986,1.0686
5. ,331.5,153.,50.,50.,61. 9.25

SRAQSEVUSTMMOT ss eis
wDONeT ee emOMAN
vee et ONS POGTSO cee ein
AANNN CMNANTAAWOTND +
wee em te ee ee te O
AAVNHHYRVEasToMonsa &

.
AWCAAHa ees
NAAN ATNOTO

027 9629p 031.4 63390359 0377 039y 0414 0434 0454 647 4049p 0515053
055 9057 40599061 506370654067 9069 pe Tl pe 73 e075 ye 77 70797081
283, 85, 87, 89, 091, 93,095, 6977 099,1-01,1.03,1.05,1.07
1.09,1.11,1.13,1.1: ea ias hash, 0780402791128

COE OONGG
$AANNGOMAN RAMA ENOHS

12


I. INTRODUCTION

NBSGSC was developed in response to a need in the X-ray spectrometry
community for a generally available fundamental parameter program for
correction of interelement (matrix) effects in quantitative X-ray fluore-
Scence spectrometry. This program was designed for X-ray analysis of samples
where direct X-ray tube excitation is employed. Although there are fundamen-
tal parameter programs available through commercial suppliers, they are
essentially proprietary documents. Probably the best known fundamental
Parameter program generally available to the user is the Naval Research
Laboratories' NRLXRF (1). This Program, however, requires extensive computer
Capabilities and is not subject to general modification by the user. . NBSGSC
was written to run on present-day minicomputers such as a DEC PDP’ 11/23
system. Because the entire source program information is well-documented in
this publication, any modification by the user should be possible for
particular applications. However, the authors specifically decline respon-
sibility for any error arising from modifications made and/or improper use of
these algorithms.

Another impetus for developing NBSGSC was the opportunity to evaluate a
recent comprehensive algorithm Proposed by Lachance (2) which we call COLA.
This algorithm uses a theoretical alpha coefficient approach to the correc-
tion of matrix effects unlike most other fundamental parameter programs. In
addition, we also desired to test a new NBS algorithm (3) for calculation of
X-ray tube spectral distributions required in fundamental parameter methods
when the source of excitation of a specimen is an X-ray tube.

To test the COLA algorithm, we obtained a computer program developed by
R. M. Rousseau of the Geological Survey of Canada (GSC). This program was
extensively modified at NBS and ultimately evolved into what we will now
refer to as the NBSGSC program.

The modifications are summarized as follows:

(1) Instead of calculating a-coefficients for alloys (element system),
minerals (oxide system) and fused disc specimens in separate programs, these
options were combined into a single program.

(2) Two options now exist for X-ray tube spectral distributions. Either
measured X-ray spectral distributions from the literature or distributions
calculated from the NBS algorithm for seven commonly used X-ray tubes at any
voltage can be employed.

——

*Disclaimer - In order to adequately describe materials and experimental
Procedures, it was occasionally necessary to identify commercial products by
manufacturer's name or label. In no instance does such identification imply
endorsement by the National Bureau of Standards nor does it imply that the
Particular products or equipment is necessarily the best available for that
purpose.


MZHACOMDGH

ZEcotype

FIGURE 1,

STRUCTURE OF PROGRAM CALCO

MAIN PROGRAM CALCO

SUBROUTINE
CHAWT

SUBROUTINE
ABSEDG

SUBROUTINE
YIELD

SUBROUTINE
JUMRAT

ALPHA

SUBROUTINE

SUBROUTINE

-——> ~—s TUBDAT

SUBROUTINE
CTNLIN

SUBROUTINE
CHALIN

SUBROUTINE
INFTCT

SUBROUT INE

SUBROUTINE
AFIOX

SUBROUTINE
SBATWT

SUBROUTINE
BDCOEF

APAFD

Ls eeourme |

MAC OR

REAL FUNCTION

MACFUN

J

DATAFILE
MACPRM.DAT

tL

DATAF ILE
TGTWR.DAT



0.0000
10.7343
0.0000
11.2540
0.0000
11.7770
0.0000
12.2904
0.0000
12.5125
0.0000
12.7473
0.0000
12.9768
0.0000
13.2009
0.0000
13.4196
0.0000
13.6384
0.0000
13.8555

0.0000—

14.0657
0.0000
14.2775
0.0000
14.4732
0.1359
14.6620
0.1581
14.8464

0.0000
2.8224
0.0000
3.2029
0.0000
3.6074
0.0000
4.0381
0.0000
4.4928
0.0000
4.9664
0.0000
5.4651
0.0000
5.9892
0.0000
6.5390
0.0000
7.1120
0.0000
7.7089
0.0000
8.3328
0.0000
8.9789
0.0000
9.6586
2.6000
10.3671
2.6000
11.1031

0.0000
2.9050
0.0000
2.8950
0.0000
2.8860
0.0000
2.8500
0.0000
2.8500
0.0000
2.8500
0.0000
2.8500
0.0000
2.8500
0.0000
2.8500
0.0000
2.8500
0.0000
2.8500
0.0000
2.8500
0.0000
2.8500
0.0000
2.8500
0.0000
2.8500
0.0000
2.8500

0.0000
8.4000
0.0000
9.5000
0.0000
11.0900
0.0000
13.3000
0.0000
13.2000
0.0000
13.0000
0.0000
12.9500
0.0000
12.9000
0.0000
12.6000
0.0000
12.5000
0.0000
12.4000
0.0000
12.4000
0.0000
12.1000
0.0000
12.0000
0.0000
12.0000
0.0000
12.0000

0.0000
32.3200
0.0000
37.4700
0.0000
43.0800
0.0000
49.1900
0.0000
55.8000
0.0000
62.9300
0.0000
70.5900
0.0000
78.7900
0.0000
87.5600
0.0000
96.8900
0.0000
106.8200
0.0000
117.3400
0.0000
128.4800
0.0000
140.2500
0.0000
152.6500
0.0000
165.7000

Values - Continued

0.0000
2.7345
0.0000
2.7345
0.0000
2.7345
0.0000
2.7345
0.0000
2.7345
0.0000
2.7345
0.0000
2.7345
0.0000
2.7345
0.0000
2.7345
0.0000
2.7345
0.0000
2.7345
0.0000
2.7345
0.0000
2.7345
0.0000
2.7345
0.0000
2.7345
0.0000
2.7345

0.0000
0.2702
0.0000
0.3200
0.0000
0.3771
0.0000
0.4378
0.0000
0.5004
0.0000
0.5637
0.0000
0.6282
0.0000
0.6946
0.0000
0.7690
0.0000
0.8461
0.0000
0.9256
0.0000
1.0081
0.0000
1.0961
0.0000
1.1936
0.0000
1.2977
0.0000
1.4143

112

0.0000
2.7450
0.0000
2.7300
0.0000
2.7300
0.0000
2.7300
0.0000
2.7300
0.0000
2.7300
0.0000
2.7300
0.0000
2.7300
0.0000
2.7300
0.0000
2.7300
0.0000
2.7300
0.0000
2.7300
0.0000
2.7300
0.0000
2.7300
0.0000
2.7300
0.0000
2.7300

0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.8719
0.0000
0.9510
0.0000
1.0428
0.0000

1.1423

0.0000
1.2478

0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
2.6144
0.0000
2.6144
0.0000
2.6144
0.0000
2.6144
0.0000
2.6144

0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
9.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
1.0197
0.0000
1.1154
0.0000
1.2167

0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
2.3554
0.0000
2.3554
0.0000
2.3554


Too°o-  4OT°O §=6GOT°O «OTTO, «~G60T°O §=LOT°O §=620T*O = bBT°O = 000" ZT0"O- + Z00°0-

goT°O §=LOT°O §=660T°O |= BOT*G = LOT°O ZOT*O = EBT"O = 000°0 = STO"O- +z00°0-

OTo*u- T2T°O YOT°O 880°0 SL0°0 880°0- 000°0 090°0- 2%Z0°0

OTv"O- {ZT°O SOT°O 160°0 8S0°0- 000°0 490°0- £€20°0

otoo- 22T°O = 8UT"O— 8Z0"O- +000°0 = sL0°0- £20°0

600°0- 22T°O T00°O- O00°O ZB0°0- £Z0°0

£00°0- §20°0 000°0 680°0- £20°0

4g0°0- 000°O0 £60°0- 2z0°0

000°0 §=6ssz°0- =TE0°O

000°0 =—.000°0

T00°0

000°0

@CE°T- SLO*T- “LB¥°0- LIb°O- GEE*O- ¥SZ°O- OYT*O- €S0°0- Oy0°O- -000°O | I88°0- sIT°O

000°0 §=6T00"O |= ZTT"O- « 2TT*O- =ETT°U- ZTT°O- TIT*O- s0T°O- 00Z°0- 000°0 820°0- £00°0-

$86°2 «990L°S «LS6°Y «= EWI"G «= EBETS «= BLYTH «= WZO"b ZZHE §=—968°Z = 000"0- HEG"9—-O9T*O-
OW aN Ls) IN oO ad NW w A Is Ww re)
ty w 6% 8c le 9% Sz be ix4 ot et 9

(vt) IS *3LATWNY

saquogd S€‘SS ?AuLaWOaD
a1 O°Sy = UD FLADUVL

(WALSAS IWLNGWaTa)
NOLINNOS VIOO NI SSN Od SINIIOIGIZOD WHdTW OISvE

OW 2b
Nw
nD 6%
IN 8%
09
ai 9%
NW SZ
wD ve
AE
Is oT
Wet

a9

Ww

wiv

70


aaaaaan

180

182

184
186

SUBROUTINE APAFD

THIS SUBROUTINE PERFORMS MOST OF THE CALCULATION FOR
OBTAINING THE ALPHA COEFFICIENTS USED IN FUSED DISC
SYSTEM.

NBS 04-SEP-84

REAL MAC,MU

DIMENSION CAM(12) ,UCO(12) ,UCF(12) ,SWDB1(12) ,XINT(2,300),
XINT1 (2,11) ,UC(12,12) , IELE(12) ,NE(12) ,NO(12),
c(5,3) 7eL (12, 4), 1B (12) 7Al(12, 12), a2(12, 12)

DIMENSION SWDB(12) , 12Z(12)

COMMON K15,K1,N, TELE, NE,NO,KK2,CAM,1Z,ITP,ITS

COMMON /COESUB/A1 ,A2

COMMON /TUBE1/XINT, XINT1,ND

COMMON /TUBE2/IDTUBE, VOLT

COMMON /BDSUB/TP,TS,C,CL, IE, UC,UCO,N5,UCF,CA,CB,F,CLOI

COMMON /WFRA/WLI ,WB,WO,WF

DATA CLOI/.25/

NS=N

WRITE (6,190)

READ (5,*)K12

GL=0.

. WRITE (6,180)

FORMAT (' GRAMS OF SAMPLE:',$)
READ (5,*) GS

WRITE (6,182)

FORMAT (' GRAMS OF LI2B407:',$)
READ (5,*) GF

IF(K12.EQ.1) GO TO 4
IF(K12.EQ.2) WRITE (6,184)
FORMAT(' GRAMS OF LIF:',$)
IF(K12.EQ.3) WRITE (6,186)
FORMAT (' GRAMS OF LIBO2:',$)
READ(5,*)GL

CONTINUE

TWT=GF+GL

P=GS/ (TWT+GS)

GO TO (6,7,8) ,K12

WLI=.0821

WB=,2557

WF=0,

WO=. 6623

GoTo9 .

WLI=(GF* .0821+GL*. 2675) /TWT
WB=GF* .2557/TWT

WO=GF* .6623/TWT

WESGL* .7325/TWT

GO TO 9

WLI= (GF* .0821+GL*. 1395) /TWT
WB= (GF* ,2557+GL*.2173)/TWT
WOx (GF* .6623+GL* 6432) /TWT
WF=0.

CONTINUE

IF(KK2.NE.'Y ')GOTO 5

WRITE (6,192) IDTUBE, VOLT, ITP, ITS, (1Z(1I) ,I=1,N)
WRITE (6,194) (IELE(I) ,NE(I),NO(I) ,I=1,N)
WRITE (6,196) (CAM(I) ,1=1,N)
WRITE (6,198)

DO 100 I=1,N

24


Subroutine ALPHA, along with subroutines BDCOEF and APAFD, completes the
major calculation of alpha coefficients, which are Os >, a3, and 85K
for an element system, a,, aj, and ajj, for an oxide system, of a, for~a
fused disc system. Calculated alpha cddtficients can be saved in a sequen-
tial-access datafile created by the main program CALCO if desired. Frequently
used common subroutines, ATNUM and SBATWT provide the atomic number and

atomic weight, respectively, when the chemical symbol of an element is given.

In CALCOMP, input data are required for alpha coefficients, intensities
and concentrations of standards, and intensities of unknowns using the sub-
routine DATAIN. After relative intensities of the standards are calculated,
Subroutine CALRI calls subroutines SVLSF2 and SLE to obtain a least-square

fit for the calibration curve (RF versus Tf), and then from this calibration
curve relative intensities for unknowns are computed and sent back to the
main program CALCOMP where iterations proceed to obtain the final concentra-
tions of unknowns. Subroutine GETERR is used, if desired, to compare the
observed results with other previously known values for the unknowns. The
options for selecting different analysis systems, entering known concentra-
tions of unanalyzed elements as fixed concentrations, dead time correction,
different calibration curves, and for using different standards such as
multi-element or pure element standards are also provided in the program
CALCOMP..


SUBROUTINE YIELD(Y, IELE, ISR)

THE SUBROUTINE PROVIDES X-RAY FLUORESCENT YIELDS FOR K,
L IZ ORL III SERIES LINES BY MEANS OF EMPIRICAL FITS.

NBS 04-SEP-1984

aaaaaa

CALL ATNUM(IELE, IZ)
ZI=IZ

ZL*ALOG (ZI)

IF (ISR.EQ.3.OR. ISR.EQ.5)GOTO 10
IF(ISR.EQ.4)GOTO 20
OM1=(.015+.0327*ZI-6. 4E-7*Z1##3) #84
Y=0M1/(1.0+0M1)

RETURN

10 OM1=(~.901+.0466*ZI-4.961E-4*21*Z1+2, 296E-6*Z1*#3) #24
Y=0M1/(1.0+0M1)
RETURN -

20 OM1=(.491-.010*21+2.5SE-4*ZI*ZI-9. 20E-7*ZI1*#3) #84
Y=OM1/(1.0+0M1)
RETURN
END

SUBROUTINE AFIOX(AFOX, IELE,NE, NO)

THIS SUBROUTINE CALCULATES THE ATOMIC FRACTION OF THE
ANALYTE IN A DEFINED OXIDE.

NBS 04-SEP-1984

CALL SBATWT('O ',AWO)

CALL SBATWT(IELE,AWE)
AFOX=ANE*EFLOAT (NE)
AFOX=#AFOX/(AFOX+ANO*FLOAT (NO) )
RETURN

END

aaaaaa

29


8099°h
8060°0

t100°0

RL16°Z
06z°0

€eT00°0

€0zaa 8L9Z"0 + EOZNW 8DUZ"O ZO1L %66L°9S OW sOvT"T OM 8BLL°E €0s

SO0%d BhLe*zz Zols 8éze"h Oz 80z9°% OOW 80”0"O OZWN 80TO°Z IoD € =1

yezeoro §—€0zaa BTTOO"O = EOZNN
ZOIL L82LS°0 OND SEZIO“O = ORM OBZZO"Y ©=—= EOS EETST"O «OTS ZERZO°O © EOZTV=N = ALTHMR“ON GS

' .
‘$09°00T =IWwLOL

€0%aa 8580°0 COCNW BTbZ°O ZOlL te2"ty OW 2006°0 OZ 8S0r°C tos
SO¢d ASST°O¢ —ZOIS A666" EOL TW BOGN"Z Cow 808z"0 = ORWN NOGE'T. «= TTD =

$s610°O —¢ozaa 9€000"Y —“*COZNW
ZOIL 2ZL19°0 OW 06600°0 O24 Torzoro €0S bZLET°O zoIs si€eo°o coz Twat WOWIE= "ON" dS

————NOLLWUBLT ISVI 30 SLINSai---—

00+300000°0 =Zw 40-a90"S6°0 =Tv 00+300000°0 =0w eozaa
00+300000°0 =2v S0-a7869E°0 =Iv 0U+300000°0 =Ww €OZNH

00+300000°0 =Zv 40-32669T°0 =Iv 00+300000°0 =Ov zolL
00+300000°0 =Zv SO-3ZTLZ¥°O =Iv 00+300000°0 =0v ovo
00+300000°0 =Z¥ 90-39P0ST*O =v 00+900000°0 =Ov om
0U+300000°0 =Zv S0-3S062Z°0 =Iv 00+900000°0 =0v os
00+300000°0 =Zv S0-aS8ZbL°0 =T¥ 00+300000°0 =uv 201s

00+300000°0 =Zv S0-3£9£06°0 =v 00+900000°0 =0v coz

CUNT*TaN*OTVOsA f “LNT “SWaWex)
SINGID143900 3S1 G3LVINIINO 4O NOILVINGVL
4K _# (WA) SINGIDI4I909 257 4N0 INTUd OL JAW 10K 00
ee MoXeZveXelVeA (v) Xelves (€)

XoXeZveXeTwrOwsA (2) MoTwrOved (1)
+ NOMWYGITVO HO BSN OU. NVM NOK OG SAAWIO 3ST gO 3dAL LVM

A é (N/A) SAMND NOLLVUAIIVO 30 3dAL UHLONV AML OL NW NOK 00

ez°0) Sty TS*U ITU Eb0s99T 070 EO SEZ 0070S 00°09 (oO “a TaN" OAY
too, = To"O, Z0"O L009 900" LO" TOON "000 "Ea Sav" AY
Teo oo" L9°9I-  OT°O su°o- = To"e = ,00"0 20 Tey 00°0 oovo "Raa 13a

To"0 00 90°0 To*o- = 11°0 00°0 $0°0 8T"o 00°0 00°O §=6 “Ra “Sa

Guy 9% beras MITT: = uk"E BUD OETA OEY 29° To°z £2001

eu'b yer ees LTT so°e 60°O <n zre To°z 48°66 atin
vera us cto = uo"d, OEY uO 0S*O y= = U0 "0s saa

wo To 80°0 00°0 T0°0 ovo oro cor = 000 00°O 00°O )= “uaa “SAW

6° 60" «e"ty = T6°0 Be°E 6z°0 26°6T = 00°S. 69°2 8z°0 6e°T = pe“ OT

16°% gu" st'ty § 16°O de°e 62°O zer6t = 20°S 69°% ez°0 6€°T = bT*OOT wie
€0%3a CORN ow zy os ‘s0zd zoIs = covlv Cow OtwN 101 ‘TWLOL = “ON*dWS

(8) SiInsgy 30 NOLLWINEVL

89V0"*¥ZUU" *¥ZON" *B9BS**LTTO* “S¥EU* 6000" *Szzz° “BT yO" *Z9Z0* *y000** TOZO* SLIWM="ON*dWS
620° *BUU0" “EZU0*“STEY**T600"* LECO* *Gz0U" *ZB6T"*ZOS0"*6YZU"*BZ00"*6ETO’ ==» NOVT= “ONS

4 SNGWIDGdS 20 SNOTLVULNGONOD NMONY HGLLNG
A é (N/A) SNAWIIGdS ASAILL YOI SAMIVA NON ATSNOIAGUA UGILO HLIM SLINSRI ASGHL FYVEWOO OL HISIM NOK Od

[6s°y  pyz"O YOR" LEL*BS LST*E §O9L"E = 060") 9BZ*ZZ_—OGE*H «OeY*Z = OVO"Y_-««OOTO"Z «EZ *00T aLInM

99


Tov'o- 6200 SE0°O YOV"O ZTIO°O- TTO°O- OTO"O- 6U0°0- LU0°0-
oyo°O §=ppO"O~=—«UOV"D-_ZTO*O- —TTO°O- 600°0- 800°0- L00°0-

y@z*o 000°0 ~=— LZ0"U- 6 TO*O- - 800°D- —000°0- 600°0

000°O0 §=sTo*o- Loo°0- z00°0 600°0 LTO°O

000°0 §=ouv"d §=— 0000S «000° =: 000°0

oov*0 000°0 §=000°0 =: u00"0

ovo"d §=—000°0 =: 000°0

000°0 §©000°0

000°0

yE0°O- LEV*O- TIZ°O- LGT°O- 000°) TEO"G- 620°0- Lz0°0- Sz0°O- £z0°0-
pyo°D Tpotu- <e0°O §=z50°O- 00" 675°0 s0v"0 S92°0 6ST" cporo
€0zaa«COZNN «OC ZOTIL, «CTOIVO «10 «COTS §=6S02@d = 2OLIS €OZTw «= TOTSW

ge se e V4 6t oT ST vt er fas

(61) To? ¥ ?3LAIVNV

saquogd S€’SS *AULIWOGD
AI OTSe «wD NLGOUL

(WaLSAS '3q1Xx0)
NOILVNOS VIOO NI 3SN YOd SINGIDIaI9OO WidTV GTuaAH

s00°0-
900°0-
yto"o
€z0°0
000°0
000°
000°0
000°0
o0u"0

000°0

1z0°0-
zsu°o-
TO?WN

W

zoo"o
zooro
$90°O
190°0
000°0
z00"0
zoo"o
zo0"o
z00°0
1000
100°0
o00°o
g00°0-
609°0-
foro
9

€O¢aa 92
fOCNW SZ
2OUIL 2%
TOT 0%
To! ¥ 6T
€OT S 9T
soc d ST

92

zouls vt
coe ct
TOTOW 27
TOWN IT
cols9 WIV
ww
Ww


III. OPERATING PROCEDURE

A menu procedure for operating the Programs CALCO and CALCOMP is followed
where the user answers a question, selecting the appropriate answer among the
ones provided, and enters the required data. This is illustrated by the
flowcharts in Figures 3 and 4. Examples of the menus are shown in appendix
3. For ensuring proper execution of the program, the following additional
comments are made to the user.

For CALCO (refer to figure 3)

(1) In step 2, if an oxide system is selected for analysis, and the user
wishes to add LOI (loss of ignition) as an analyte, OL or is computed assuming
the hypothetical compound CO. as an approximation to CO plus H50. (See
example in Appendix 3.3A). de the fused disc system is selected, oz is
automatically calculated at the 25% level and stored by the program.

(2) The maximum number of analytes the program can handle in step 2 is
12. But in a fused dise analysis the actual number is 12 plus 1 because LOI
is already taken into account.

(3) It is recommended that names of the analytes are entered in the
order of increasing atomic number in step 4. For an element system, each
name occupies three spaces. The first two for the chemical symbol of the
analyte, the third one as a blank space such as FE# or Vi## where # represents
a blank space. For an oxide or fused disc system, a special format for the
name is required to automatically calculate the atomic fraction of the ele-
ment in its oxide. In this case, each name occupies six spaces. The first
two for the chemical symbol of analyte, the third one for number of analyte
atoms in the corresponding oxide, the fourth one for the chemical symbol of
oxygen, the fifth one for-the number of oxygen atoms in the oxide, and the
sixth one as a blank space for example MG101#P#205#FE203# etc.

(4) If the user selects measured X-ray tube spectral data in step 12,
then a datafile should be created by EDT before running the program. The data
should be in the following order:

1. Wavelengths of the continuum from the short wavelength limit to
the ending wavelength in intervals of 0.02 A.

2. The integral intensities of the continuum for each wavelength
interval.

3. The wavelengths of the X-ray tube characteristic lines in order
of KA, KB, LA1, LB1, LB2, LB3, LB4, LG1, LG2, LG3, and LL.

4, The intensities of the X-ray tube characteristic lines in the
same order as 3 above.

Table 1 gives an example of a datafile named SDXT75.W45, containing
Measured spectral data for the tungsten target at 45 kV published in 1975
[11]. The total number of wavelength intervals (maximum number = 300) of the
continuum for the measured spectrum is also entered in step 17.


v169°r
4060°0

£tto0"0

w916"%
w062"0

eeTo0"o

916% —LBU"DZ¥Z"U-GZ"EY BOG"D —SLE“E 0670 ZZ6"GT BEG" Guz OHO COGETT «~PE“OOT «= wl
fozga €0ZNN ZOML © OUT ECSS SOZd COIS. COZTY SO COZWNSIGT TWO “ONS
(¥) SLINSSY 30 NOLLVINEYL
‘ez*OuT =TvLOL
£0233 8P9~°U = EOZNW 8H0Z"0 ZOlL Wuee "8S Ow wUST'T Oz NovL*e £0s
Sod W6Z°Ze —ZOIS BUSEY — CORT 80z9°2 Cow 80p070 OZWN 80TO"Z lomo 61
6b2t0"0 = €OZaa OTTOOO = COZ
zorL 60z1S"0 Ovo esztu'o Oz 492z0°0 0S LETST°O = ZOIS £58Z0"O COZ TVs LTH ®“ON*AWS
‘\wE°U0T =1VIOL
€ocaa 8180"0 CORN AZZ". 2OLL 86¢2°¢9 Ov 480670 Oz ASLE"E £08
SOI KECG"GE = ZO 4366" = LOT BOGY*Z Cow togz*0 OZWN 806E°T Is £1
@s6t0°0 §=— €0zaa LE000"D = EOZNN
ZolL pucty*o Ovo 6S500"0 Oza gBuz0"O €Os Y9SET°O = ZOIS STEEU"O = COZ TW= (OW T@=°ON"dNS
——NOLWuaLI Isv1 20 slinsni——
ZI-dEHR6S* =ZV 90-3SGOV6"O =TV 00+900U00"0 =Ov —-C0zaa
60-3S¥689°0-eZv S0-398L8£°0 =T¥ 00+300000°0 =0v EON
ZI-a60bL2"0-=ZV 90-d0vZLT“O =Tw 00+900000°0 =ow zor
ZI-AOLEvb*U =Zv S0-a8S0ZP°0 =I 004300000" =OW Cy
€1-g06Z6p"0 =Zv yO-ap9RPT"v =Tv 00+900000°0 =u ow
1-942262"0 =ZW SO-3L8¥2Z"0 =T¥ 00+300000°0 =0v tos
O1-aPETY¥"O =Zv S0-3906P9°O =I¥ 00+900000°0 =Ov zors
G0-3SLOET*O-=ZW S0-a6ETS6°O =v 00+300000°0 =v = COV
CINT°TEIWOsA tf “ANT “SWaWeX)
SINSIDI43900 257 GALWINTIO 20 NOLLVINGLL
K+ (N/A) SUNSTD134900 351 1N0 ANTUd OL LNW NOK 00
vee MeXeZWeXeTVed (b) XelWaA (t)
KoXeZweXeTveuved (Z) NeTweOver (1)
3 NOLLVUSTIVO uOd ZSN OL INWM NOA OO SAND JS7 30 3dAL dH
*LOZUSLT “BUOYS. “*ZIT9SBS “YETHEZ “LSHSGHY *LSUOPy *TTBVET “BEZOTT SGMIVA 3OWUGAV
*ypOUSOL *vuZELZ “*SUBITBS *BSEREZ “y¥SUULS *ZI6EPH “LODVET *BChEOT 6t9="ON"aIs
*ebyZSUE “BBUTYZ *EOLPOUD *B99KEZ *YESEEY *099EEY “OLOSET *SEOOTT
*OYTHYOT “EOBU9Z *SOSZYBS “OPTvEZ “G¥EGEID “PODEEH “SbSzLT *BSOB0T
*GvECYOL “EVETSZ “YBTGYSS *OLEEEZ “EEBVYPD “YORYP *ZLOECT *BHTOTT
SUBTSSOT "966492 “BILEVES “SECVEZ “ZSTI9LS *BYLECH "GIZVET *BOSETT
*OvaGVOT “IGIPLZ “GZESHES “EBTHEZ “ELOZTE9 *SLOLE “bhOYET *SOZGUT
“GIYOPOT “BOGELZ “*LESEEOY “PHZEEZ “E9DEED “LLSSPH  “LSTHET “*SLZBOT €£9=ON'aIS
gozaa = LOCNN ZOIL [or s) ow fos  zoIs— focv
+ SCRIVONVIS WOU SATLISNAINI 3und GaLVINITO
ussto"o cevourv CZ100°0 £y000°O 6ESTO"O LITSI*O 9687Z0°0 6€9="0N"GIS
ry 1cuv0°0  6ETU0"O gyyoo"y ozptucU bu6zo"0 BE9=°ON"GIS
szuov"o €T(v0°0 @4z00°0 peytutU e9zzo°o Uf9="ON"aLs
tsvvu"0 Gysuu"0 ZTpt0°0 Tr0z0°0 9€9="0N"aLS
upouoo "0 gay00"u OLbyU"O sotpoo S€9="ON"aLS
UcTourd yf00"O USTZy"U Y9"OU"O ESETUTO EZuvT*O wYbEOTO p€9="0N"GIS
2T0UV"O TETUO"O SZ6E9"O UBTUDTY OSETO"O 9LIST°O HISZO°O ££9="ON"GLS
cozy ZOIL ov oz eos 201s EON

98


4171 9 €° + LOVEZIT OS + TidwvS OT * ASI GIN «

000°O §=6ETO"O- 6ST°T § 0L9°0 =3LS°0 §«GLS°U EBT *O- =LLT*U- 9TZ°0- Sbe°O- LLZ°O- 20E°O- BHS*O- EOZaA 9%
gT0°0 §=6000"0 = GL0°U- TO" = £06°0 )=— L06°0 Ss EEO"O §=— LO0"O- = SO"O- ~G680°O- LZT°U- BST°O- FSh°O- TOINW SZ
86Z°0- 780° Y0O"O <L42Z°T EOT°T BOT"E SbT°O TOT°O 6¥0°O OTO"O ZE0°O- 990°0- 96E°O- EO He
TOZ*U- -STZ*O- «T9Z°O- U00"O §=HIL*O §=6IL°O)§=—290°O- = BGUO- =ObT*O- TLT°O- S0Z°O- EEZ°0- E0S°O- ZOTIL 2%
T90°0- 6L0°O- EET°O- EOT*O- 000°D GOO°T ZOT°O T90°O ZTO°O § %20°0- ¥90°0- 960°0- STh°O- TOIW 0%
$00°O = STO°O- Z40°O- L80°O- Z2{T°O- 000°0 [8f°O 9ET°O ¥80°O 9¥0°O YOO"O TEO"O- ZLE°O- TOCA ET
79Z°0 |= BETZ“ LITO = 9VO"U = G60U"O) GOU"O- ~O0U"D SEV°O TLE°O vZE"O TLz°O G22°O Z0z*O- ECTS YT
687°0 «= S9Z"O-SEGT"O = TSO") ZOU = L00"O- ~ETOO- 000°O €Ov°O SSE°y ZOE" GSZ°O I8I°O- SOZd ST
€le°O §=«sez"O) = «VTZ"0— BSO"O = EZO"O=—-YOD"OS 400° »=— €OO"G- +O00"O §=EBETO CEETO §=98Z"0 |= EDT*O- = ZOTIS OT
BEe°O = ZIE"O «= Oz*0—Ss GYO"O--ZEV"O «SC TTU"O = bZ0°0)S STO"O)§=— S00°O)= ObU"0 Ss GSE*U = STETOEWT°O- ~EOzTY ET
b9E°O §=BEETO = 9970: 980°0 | Lb0"OSs YTU"O-9HO"D_«S-«9EOTO«LZ0°0)S TTU"O §=—000°0- SHE*O = ZZT"O- = TOTSW ZT
gov°O §=«6T8E°O «= LOE*OSs« GTI°O = BLU", s«9SU"O)=_ZB80°O = ZL0°0) 290°0)= 90" )9= L200) 000") 6B0"O- = TOZWN EIT
SLATWNY
oo°0p §=60s°0 00°T os°T os*zt ose us°t os°0 0°0S §=00°0E §=—00"SZ_— 00" 00°0S = “ONOD NVGW
€0zad ««TOINN §=«€O7HD «= ZOTIL, «ss TOIWD «=TOZ NM EOT SS §=6S02 d= 2OTIS «= EOZTN «TOTDW = TOZ WN 107
9% 4 ve [<4 0% 6t ot st oT et a acs
SLNENLILSNOD XTULWW

saquoga S¢‘SS :AuLaWodD
AN 0°09 wD tAgeeL !

(waLSKS MsId aasna)

NOTLVNOG VI0O NI SN HOI SINGIDIAII00 VIdTV GaTdIGOW

103


PROGRAM CALCO - UPDATE 5/20/85

C:LEROUX

C:FILTER

TO SPEED UP THE PROGRAM WHEN USING LEROUX' TABLE,
THE REAL FUNCTION 'MU' HAS BEEN MODIFIED
IT IS THE ONLY CHANGE REQUIRED.

: LEROUX

IT WILL ALLOW FOR OPTIONAL INPUT OF AN AL-FILTER (0.081 G/CM/CM)

FOR INDIVIDUAL ANALYTE LINES.

THE VARIABLE KKS, WHICH CONTROLS THE USE OF THE FILTER IS NOW .

SET FOR ELEMENT I BY KFILT(I). KFILT IS AN ARRAY, WITH KFILT(I) = 2
IS FOR ANALYTE I THE FILTER IS NEEDED, OTHERWISE KFILT(I) = 1.

THE ARRAY KFILT IS PASSED TO SUBROUTINES VIA THE COMMON BLOCK/FILTER/

ATTENTION =
THE FILTER IS NOW NOT SET AUTOMATICALLY ANYMORE, AS WAS DONE IN THE
PREVIOUS VERSION.

CHANGES IN THIS RESPECT ARE INDICATED BY C:FILTER

THIS IS A REVISION OF VERSION 1 OF A FUNDAMENTAL PARAMETER
COMPUTER PROGRAM FOR CORRECTION OF INTERELEMENT EFFECTS FOR
QUANTITATIVE X-RAY SPECTROMETRY. THE ORIGINAL PROGRAM WAS
WRITTEN BY R.M.ROUSSEAU OF THE GEOLOGICAL SURVEY OF CANADA

(GSC) AND CONTAINS THE— PROGRAMS—ALPHA- AND CARECAL WHICH WERE_

EXTENSIVELY MODIFIED AT NBS. THE NBSGSC PROGRAM CONTAINS THE
COMPREHENSIVE LACHANCE ALGORITHM(COLA) FOR CORRECTION OF INTER-
ELEMENT EFFECTS.

CALCO IS A REVISION OF ALPHA FOR CALCULATING THEORETICAL ALPHA
COEFFICIENTS, AND CALCOMP IS A REVISION OF CARECAL FOR CALCULA-
TING CONCENTRATIONS IN ANALYTE SPECIMENS.

OVERLAY STRUCTURE OF CALCO :
MAIN PROGRAM-----CALCO
SUBROUT INE----~~~ ALPHA, APAFD, ATNUM, CHAWV, ABSEDG
JUMRAT, YIELD, AFIOX,BDCOEF, TUBDAT
CTNLIN, INFTGT,CHALIN,SBATWT

REAL FUNCTION----MAC,MACFUN
DATAFILE -TGTWR. DAT,MACPRM. DAT
*
AUTHORS: G.¥. TAO AND P.A. PELLA DATE: 04-SEP-1984

CENTER FOR ANALYTICAL CHEMISTRY, NATIONAL BUREAU OF STANDARDS
GAITHERSBURG MD 20899 U.S.A.

AND R.M.ROUSSEAU
GEOLOGICAL SURVEY OF CANADA, OTTAWA, CANADA

* GUEST RESEARCHER FROM SHANGHAI INSTITUTE OF CERAMICS,
ACADEMIA SINICA, THE PEOPLE'S REPUBLIC OF CHINA

DIMENSION IELE (12) ,NE(12) ,NO(12) ,A1(12,12) ,A2(12,12),
A3 (12,12) ,AIJK (12,12,12) , IDATE(5) , ITIME (4) ,NAMFIL (5)
COMMON K15,K1,N,IELE,NE,NO

COMMON /COESUB/A1,A2,A3,AIJK


3.2A Calculation of Coefficients for High Temperature Alloys

SRUN CALCO

DATE: 02-OCT-84 TIME: 16:01:18

WHICH SYSTEM DO YOU WISH TO ANALYZE:
1-ELEMENT SYSTEM 2-OXIDE SYSTEM 3-FUSED DISK SYSTEM ? 1
INPUT NUMBER OF ANALYTES: 12
INPUT NAMES OF ANALYTES (XXS): C AL SI VCR MN FE CO NI CU NB MO
WHAT MASS ABS. COEF. ALGORITHM DO YOU WANT TO USE :
1-LEROUX ALGORITHM 2-HEINRICH ALGORITHM ? 2
DO YOU WANT TO CREATE A DATAFILE FOR SAVING CALCULATED ALPHA COEFFICIENTS (Y/N)? Y
INPUT DATAFILE NAME OF ALPHA COEFFICIENTS (XXXXXX.XXX) : ALLOY2.C45
FOR SAMPLE GEOMETRY, INPUT INCIDENCE & EMERGENCE ANGLES (DEGREE-XX): 55,35
INPUT THE CHARACTERISTIC LINE NUMBER YOU WISH TO MEASURE (1-KA, 2-KB, 3-LAl, 4-LB1, 5-LB2):

Is1 c 1
I=2 AL 1
I=3 SI 1
Ie 4 v 1
I=*5 a 1
s=6 Mm 1
Is 7 FE 1
I=8 © 1
I=9 NI 1
I=10 a i
I=1l Ld 1
1=12 MO 1

DO YOU WANT TO PRINT OUT CALCULATED ALPHA COEFFICIENTS(Y/N): Y

WHICH X-RAY TUBE SPECTRAL DISTRIBUTION DO YOU PREFER:
4-CALCULATED SPECTRUM FROM NBS ALGORITHM ; 2-MEASURED SPECTRUM ? 1

DO YOU- WANT TO PRINT OUT THE SPECTRAL DISTRIBUTION(Y/N) ? Y

INPUT NAME OF X-RAY TUBE TARGET (XX) : CR

INPUT VOLTAGE (KV), TAKE-OFF ANGLE OF X-RAY FROM TUBE TARGET(DEGREE), AND
WINDOW THICKNESS (MM) OF X-RAY TUBE : 45.0,26.0,.45

INPUT THE ENDING WAVELENGTH OF X-RAY TUBE SPECTRUM(ANGSTROM) : 2.99

66


GEO°O- ObZ°0- B6T°O- LST°O- ZOT*O- Sy¥°O 000°O YyEb"O

€€T°O- L60°0- 90°O- 9TO°O- ZBP°O 000°0 €S¥°0

€9€°0- LIE°O- 997°0

9L°%
Ow

980°%
aN

90Z°0
Lie)

0v0°0- S¥9°0 979°0 §=bBP°0 = 000°) 6 9¥"0
000°0 §=616S°0 |= Z9P°0 )=—000°0 Ss Bwb"0
000°0 §=6Zeh°0 §=—000°0«Ozh"0

64Z°0- 000°0 98E°U

000°0 =. 000°0

000°0

z@y°o = ST4°0 | T48°O)— EZS*O- —000"0)— bZ6°0-

ETS*U- b2S°0- 96¥°0- HLH°O- Gey"O- TZ¥*0- 000°0- 000"0 000°0-
TIT°o guy = OLO"G- OFT" = 000°0 = OzT*a-
IN i) cn n>) A
az “a 92 st 4 &

43

w

6%

(b2) OD tSLATWNW

S9qau0Gd SE‘SS ?ANLIWOID
AI 0°Sh =D ALGOUVL

’ (WAISKS ‘TWLNGW373)
NOILWNOF VIO NI 3SN YO SINIIDIGIIOD WHdTV OISVE

6TT*O-

020°0-

6sT°O

QET°O- €80°O- 99T°O

Lev"o-
TOp°o-
L9e°o-
€2€*0-
9s0°0
000°0
ss0°0

622°0-

s0°0-

Lts°0
Is
ot

Tee*o-
z0€*0-
9L2°0-
cyz°0-
990°0
000‘O
poo
000°0

€90°0-

Lvo°0-

zez°O
Ww
ia

T9T°O
6ST°O
esto
get°o
z00°O
000°0
z00°0
gt0°0
€10°0
000°0
Sore
s00°0-
b.8°0-
°
9

Ow zy
ON Tv
1D 6%
IN 8
© 4%
aa 9%
Na SZ
 wW
Ag
Is ot
Wel
a9

w

we

Ww

ww

72


1. straight line: Y = AO+A1*X

2. quadratic line: -Y = AO+A1*X+A2*X*X

3. straight line constrained to zero intercept: Y = A1*X

4, quadratic line constrained to zero intercept: Y = A1*X+A2*X*xX

In many cases, calibration curve 4 seems to partially compensate for
inaccuracies in fundamental parameters used in the calculation of theoretical
alpha coefficients especially over a wide range of analyte composition, and
better results have been observed. However, when the concentrations of the
unknowns are out of the range of the standards, it is Suggested that the
other calibration curves listed above be used to check for consistency in the
results. The extrapolation provided by the quadratic line can sometimes give
large errors.

When only ‘one multielement standard is available, calibration curve 3 is
the only option used by CALCOMP. At least two multielement standards are
required for calibration curve 1 or 4, while three are required for
calibration curve 2.

(6) In the final printout of the results for each unknown, 'R' is the
relative intensity 'C' is the concentration in weight percent, and 'L' is the
number of iterations.

(7) The convergence criterion to be met for all analytes in the program
is 0.01%. If the number of iterations exceeds 10 and convergence is still
not reached, the program will pause and print out the warning message "NO. OF
ITERATION >10'. One could still print out the results at this stage by key-
ing in the command 'RESUME', at which point the results of the last iteration
are printed out, and the program automatically begins to process the next
unknown sample. In practice, convergence is usually obtained in three to
seven iterations.

The examples given in appendix 3 illustrate the program input and output
structures for running the different analysis schemes. For more efficient
operation, especially for routine applications, it is recommended that a com-
mand file be created by the user which will contain the answers to the menu
questions and all required input data in the format specified in CALCO. and
CALCOMP, prior to execution of the program. Use of a command file in this
way is especially advantageous when few changes in input data need to be made
as different specimens are analyzed.

14


tv°o-

vero

16°%

oug"y
L16°%
€0%aa

76°T (s°ot 8t°0 rsh g
To°o zoo {T°o coo
S3a°e L9°yT- 0z°0 ys°t—
To°o bo°o- =2zT°O o°0-
Lz°0 0e"0 os°es = PIT"T
ge°o ve°o eyes LTT
00°0 SE°p yT°0 ott
00°0 To°o ot°o To°0-
gu°0 vero S$2°e9 =06"°0
0°O tzu st°ey § 16°O
fOZNW col. ow ON

A é (N/A) SNGWIDUdS SSSHL 40d

L9z°0—vOZ*0 GEL°BS = OFT"T
seu°o) =—Ty2"O)— Lez"€9 =0UG"O
tOCNW colL ow oz

N  é (N/A) SAND NOLINUGITVO JO SdAL UGHLONY AML OL INYM NOK OF

Le°% 00°0 88°0 4a°T 00°0 ou"0 00°O )§=— * uaa“ TaN" AN

60°0 00°0 8I°o 80°0 00°0 00°0 00°0 "haa “SEW "DAW

9s°e 00°0 60°0 Steve 00°0 00°0 oo°o | “aa Ta

€T°o 00°O zo°0 vT°o 00°0 00°0 ooo) |= *uua "Saw

eL°€ 60°0 ke°ce tee ca 4 v0°0 worz = 02° 00T.

sore 60°O sz°z@ BT *e wre voro To°z =L8°66 SLIHM

6°t 00°0 sot Opo- =—00°0 vo°o oo°o) |= “a Ta

vo°o 00°0 €€°0 zo°u- = =—00°0 00°0 oo°o) «= “a "Saw

tyre 6z°0 st°oz §=0n"s 69°% 82°0 6€°T = 09°00T

ure 6z°0 7e°6t = Z0°S. 69°% 8z°0 6€°T = bI°OOT wwia
0s $0%d zoIs §=cOzW COW OcWN 101 ‘TW1OL = *ON*dWS

(3) SLINSTd 40 NOLLWINGYL

SGMIWA NMONY XISNOIATYd WIKIO HLIM SLINGS SSGILL TYVdWOO OL HSIM NOK Od

GLL°E UGO°D HLz*~Z ZEW O%9°Z OFO'O =OTU"Z Oz°00T aLIHM
Gove 06Z°O - SST°0Z 666%W 069°C 08Z"0 = U6E"T 09°00T wile
tos SO¢d zoIs §=tO¢W OOW OCWN TOT «‘TWIOL = 6“ON"diS

(3) SLInsay 4O NOILVINGVL

$02°U0T =1VLOL

100


15

°8

35

+

I=1,N)

Do 15 J=1,4
Z=CL(1,J)
CL(1,J)*CL(II,J)
CL(II,J)=Z
CONTINUE
NAMSIE(1)
1E(1)=IE(1II)
IE(II)=NAM

DO 20 I=1,N
Al(II,1)#0.0
A2(II,I)=0.0
A3(II,1)#0.0

DO 20 J=1,N
AIJK(II,1I,J)#0.0
CONTINUE

ICAS=1

N2=N

IF (ICAS.EQ.2)N2=N-1
DO 110 M=2,N2

DO 35 J=1,4
ZeCL(2,J)
CL(2,J)=CL(M,J)
CL(M,J) #2
CONTINUE
NAMSIE(2)
IE(2)=IE(M)
TE(M)=NAM

MisM+1
IF(ICAS.EQ.1)Ml=N
DO 100 MM=M1,N
IF(ICAS.EQ.1)GOTO 40
DO 38 J=1,4
2=CL(3,J)

CL(3,J) =CL(MM,J)
CL(MM,J)=2
CONTINUE
NAMSIE(3)

IE (3) =IE (MM)

IE (MM) =NAM
CONTINUE

IF(ICAS.EQ.1)N5=2

IF(ICAS.EQ.2)N5=3

DO 50 J=1,NS

IF(K15.EQ.1)UCO(J)=MU('O ',CL(J,1))
IF(K15.EQ.2) UCO(J) =MAC("O *,CL(J,1))
DO SO K=l,NS
IF(K15.EQ.1)UC(J,K)=MU(IE(J) ,CL(K,1))
IF(K15.£Q.2) UC(J,K) sMAC(IE (J) ,CL(K,1))
CONTINUE

lls

T2=4

IF(ICAS.EQ.2) 1195

IF(ICAS.EQ.2)I2=5

DO 90 I=f1,12

SW1=0.0

SWDB1(1)=0.0

KKS=1

IF (IDTUBE.EQ.'CR' AND. IE(1) -EQ.*CR')KK5Sa2
IF(IDTUBE.EQ.'CR' .AND. IE(1) -EQ."MN') KK5=2
K12=0

DO 60 Kel,ND

20


Appendix 2: Description of Symbols and Permanent Datafiles

Variable Names

2.1

Common Symbols

List of Symbols and Variables in CALCO

Main Program CALCO

Remarks

A1(I,J)
A2(I,J)
A3(I,J)
AIJK(I,J,K)

IDATE(5)
IELE(I)
ITIME(4)
K1

K15

KK1

N
NAMFIL(5)
NE(I)

NO(I)

ALFA(I)
c(5,3)

CAM(I)

CL(I,4)

G(5)
ICAS

4
sor
%3
15k

(2)

oy

aka A)

Coefficient of element J on element I
Coefficient of element J on element I
Coefficient of element J on element I

Cross coefficient of elements J and K
on element I

Date from computer's real-time clock
Chemical symbol of analyte I
Time from computer's real-time clock

Optional switch for analyzing: (1) element or
(2) oxide or (3) fused dise system

Optional switch for choosing: (1) Leroux or
(2) Heinrich algorithm for calculating mass
absorption coefficients

Optional switch for creating datafile for
saving calculated alpha coefficients

Number of analytes

Datafile name for saving alpha coefficients
Number of the element atoms in the defined
oxide formula for analyte I

Number of oxygen atoms in the defined oxide
formula for analyte I

Additional Variables in ALPHA

Coefficient a5 when C,; = 0.3, Cy = 0.7

Concentration of hypothetical standards used
to calculate alpha coefficients in element or
oxide systems

Mean concentration of analyte I in sample for
fused dise system

Calculated wavelength of analyte line and
its corresponding absorption edge, and
product of fluorescent yield and jump ratio
and atomic fraction of element I in its oxide

Expression (Cg/Ry-1)/C5
Switeh for calculating 55 or i 5k

51



000°0 = yu0°d = 000°0 auv"0 = 0000 §ouv"d §=000°0 §=— 000°

dyT°0 «= 6ST°O, ONT" 690°D = E9O"Y =: YSU" = TSO"O

oov'y §=ov0"0 §=66u0"D)S TOO 2T0°0 sw TO"O

v00"0- g00°0 600°O 10°O €T0°O

g00°0 §=600°0 §==T0°O §6ETU"O

voo*o §=000°0 §=100°0

000°0 =. 000°0

000°0

000°0 00"O- G68T*O- BLT*O- 6LT*O- OLO°0- PY0"O- LSO°O- TS0°O-

000°O §«TOL°O- OFETE STE O9T*T OTZ°0- vLZ*0- OSE*0- 900°0-
€0734 €OZNW ZOTIL 01VO 10x OTS SO%@d ZOTIS cO21V
ve 4 ca 4 61 ot sT Las eT

(y@) €O@3a FA.LAIWNY

saguoad S€‘SS *AULIWOID
AN U°Sy =D LDU

(WaLSAS — 3GIXO)

000°0
boo
gt0°o
sT0°O
stu°o
Too°o
T00°0
000°

000°0

sv0°0-

e9b°0-

TOISW

rad

NOLLVNOE WIOD NI 93f. Od SINFIOIGI9OD Wid Tv GIuGAH

oou"0
6£0°O
8T0°O :
Ltu"0
Lto°o
700°
100"O
T00°O
000°0

000°0

Ovo*o-

ets*0-

TO?WN
1

000°0
Tr0°o
8£0°0
9£0°0
9€0°0
z10°0
oT0°o
g00°0
00°
900°0
oo"O
000°0

z10°0-

vos"0-

€or 9
9

€0%3a 92
COZNN SZ
2OTIL 2%
TOTW 02
To? 4 61
€ot s OT
soz d ST
zours bT
eOzTW €T
TOTOW 21
TO?W IT

96

co1d9 IV

Ww
Ww


50

60

100
105
110
120
125
130

140
150

160
180
190
200

210

220 -

IF(KK11.EQ.'N ')GOTO 60

IF(K11.EQ.1) WRITE (6,180)

IF(K11.EQ.2) WRITE (6,190)

WRITE (6, 200) IDTUBE, VOLT, TOFAGL ,WINTHI, (XINT(1,I) ¢XINT (2,1)
+ ,I=1,ND)

WRITE (6,210) ((XINT1(I,J) ,J=1,11) ,I=1,2)

WRITE (6,220)

RETURN

FORMAT(' WHICH X-RAY TUBE SPECTRAL DISTRIBUTION DO YOU PREFER: '
+ /3X,'1-CALCULATED SPECTRUM FROM NBS ALGORITHM i 2-MEASURED SPE
+CTRUM ? ',$)

FORMAT(1X,"DO YOU WANT TO PRINT OUT THE SPECTRAL DISTRIBUTION (Y/
+N) 2? ',$)

FORMAT(' INPUT THE DATAFILE NAME OF X-RAY TUBE SPECTRUM (XXXXXX.X.
+X): ',$)

FORMAT (6A4)

FORMAT (A2)

FORMAT(1X,‘INPUT TOTAL NUMBER OF WAVELENGTH INTERVALS FOR CONTIN
+UUM (MAX.=300) : ',S)

FORMAT(1X,' INPUT NAME OF X-RAY TUBE TARGET (XX) 3 *,$)
FORMAT(' INPUT VOLTAGE(KV), TAKE-OFF ANGLE OF X-RAY FROM TUBE TA
+RGET(DEGREE) , AND'/* WINDOW THICKNESS (MM) OF X-RAY TUBE : ',$)
FORMAT(1X,' INPUT THE ENDING WAVELENGTH OF X-RAY TUBE SPECTRUM(AN
+GSTROM) =: ',S)
FORMAT (1H1,////36X,'"CALCULATED X-RAY TUBE SPECTRAL DISTRIBUTION
+ ',/47%,‘USING NBS ALGORITHM')
FORMAT (1H1,////,37X, ‘MEASURED X-RAY TUBE SPECTRAL DISTRIBUTION
‘
)

+

FORMAT (//34X,'X-RAY TUBE TARGET: ',A2,4X,"KV: ',F5.1,4X,/,

27X, "TAKE-OFF ANGLE (DEGREE): ',F4.1,4X,"BE WINDOW THICKNESS (MM) :
"(F5.3,///,3X,'LAMDA(A) ' ,5X,"I*.02A' ,4X, "LAMDA(A) * ,5X,

*I*.02A" , 4X, "LAMDA(A)' , 5X, ,'I*.02A" , 4X, "LAMDA(A)" ,5X,"I*.02A° ,
4X, 'LAMDA(A) * ,5X,"I*.02A' ,//(1X,5(F9.4,2X,E12.4)))

FORMAT (///6X, 'KA' , 10X, "KB", 10X,"LA1" , 9X, 'LB1" ,9X,'LB2',

9X,"LB3" ,9X,"LB4' ,9X,"LG1" ,9X,"LG2" ,9X,"LG3" ,9X,"LL! ,//
11(F10.4, 2X) /11E12.4)

FORMAT (///)

END

t+tet

++

33



ay

STRUCTURE OF PROGRAM CALCOMP

FIGURE 2.
SUBROUTINE < MAIN PROGRAM SUBROUTINE
DATAIN CALCOMP GETERR
w
SUBROUTINE
CALRI
MW

SUBROUTINE 5 SUBROUTINE
SVLSF2 SLE



1]

(2)

[3]

C4]

[5]
(6]
[7]
[8]

[9]

[10]
[11]

IV. REFERENCES

J. W. Criss, L. S. Birks, and J. V. Gilfrich, Anal. Chem. 50, 33
(1978).

G. R. Lachance, Internat. Conf. on Ind. Inorg. Elemental Anal., Metz,
France, June 3, 1981.

P. A. Pella, L. Y. Feng, and J. A. Small, "An Analytical Algorithm for
Calulation of Spectral Distrbutions of X-ray Tubes for Quantitative
X-ray Fluorescence Analysis", Accepted for publication in the January
1985 issue of X-ray Spectrometry.

P. A. Pella, G. Y. Tao, and G. R. Lachance, "Intercomparison of
Fundamental Parameter Interelement Correction Methods - Part 2a",
submitted to X-ray Spectrometry for publication.

F. Claisse and M. Quintin, Can. Spectrosc., 12, 129 (1967).

G. R. Lachance and R. J. Traill, Can. Spectrose., 11, 43 (1966).

R. M. Rousseau, X-ray Spectrometry, 13, 121 (1984).

M. A. Blokhin, The Physics of X-rays, 2nd revised edition, Moscow,
1957, AEC Translation 4502, p. 401-403.

K, F. J. Heinrich, The Electron Microprobe, John Wiley, New York, 1966,
Pp. 296.

T. P. Thinh and J. Leroux, X-ray Spectrometry 8, 85 (1979).

D. B. Brown, J. V. Gilfrich, and M. C. Peckerar, J. Appl. Phys. 46,
4537 (1975).

15


ZO+d0Z8T°O TO+30S69°O TO+FUSZ6°O ZO+IOUT9°O ZO+d000S*U ZO+3000S*O €0+a0EST*O

78L9°T
TT

0290°T 9890°T
eo1 m
TO+d00b2 °0 00sS°z
TO+3000€ °O o0sh°z
T0+3009€°0 O0sE°z
TO+300bb°O 00Sz°%
TO+900ZS°0 OOST*Z
T0+900Z9°0 00S0°%
TO+a009L°0 00S6°T
T0+300L8°0 00s8°T
Z0+90Z0T*O 00SL°T
7Z0+d08TI°O 00s9°T
20+d0LET°O 00SS°T
Z0+a009T "0 00sp°T
7Z0+a0S8T"O OSE *T
Z0+d0b1Z°0 0Sz°T
720+3008T*O OOSsT*T
70+3068T°O 00S0°T
20+390902°O 00S6°0
7Z0+300¥2°0O 00s8°0
70+9008Z °O ousz*O
Z0+90ZZE °O 0us9°0
Z0+90S9€ °O goss*O
ZO+ad0L6E “0 o0sp"o
Z0+30L42°0 ose *O
W20" eI (w) Vand

9860°T

11

10+900SZ "0
TO+J00TE*O
TO+d00LE °O
TO+d00S6°O
T0+300bS°0
T0+300S9°O
TO+300LL°0O
T0+30006°O
7Z0+300T°O
7Z0+g0z2T°O
ZO+90THT*O
Z0+90S9T"O
Z0+30T6T°O
7ZO+adOTIZ°O
720+d0b8T°O
20+3068T°O
70+90Z12°0
Z0+90867 °O
20+90882°0
ZO+dUTEE"O
O+B0VLE°O
7Z0+a006E °O
70+30602 "0

WCO° eI

000°T

9T0E°T

val

00€s*z
O0Ey°e
O0ge*z
O0EZ*2
OOET*e
o0£0°e
00€6°T
ooge*T
O0gL°T
O0E9°T
O0ES*T
O0ee*T
Ooge*T
O0Ez°T
OO€T*T
00g0°T
00€6°0
00¢8°0
O0EL*O
00€9°0
vots*o
o0gh"O
O0et*O

(v)vaWvT

L79z°T
ea

T0+30092°0
TO+3002E "0
T0+3008£°O
TO+300Lb°O
T0+3009S °O
T0+300L9°0O
T0+90062°0
T0+400€6°0
70+3080T °0
Z0+90S2T°O
70+3099T "0
Z0+300LT°O
7Z0+30L6T°O
Z0+309LT°O
Z0+3006T°O
7ZO+30T6T"O
20+30612°0
70+g09S2°0
70+90962°O
Z0+d00bE °O
20+90Z8€ °0
Z0+9082E °O
ZO+gd0TET°O

W20°eI

3 (WA) SSUNHOIHL MOGNIM 38

O°sp 2AM

€O+ESTEE’O €0+E0SES°O

bSpe°T BTsz°T 9LLb°T
4:6] ta Wl
T0+3002Z°0 065°
T0+400LZ°0 006b°%
TO+a00€E * 0066 °2
T0+3000b °O 0062°2
T0+90080°O 006T*z
10+3008S "0 0060°%
TO+90002°0 0066°T
10+30028°0 0068°T
T0+30096°0 006L°T
ZO+90TTT"O 0069°T
ZO+a06zT* 006S°T
20+900ST°O 006b°T
ZO+d0SLT*O 006E°T
20+390202 °O 0062°T
ZO+d00LT"! 006T°T
70+3096T°O 0060°T
Z0+90b6T°O 0066°0
Z0+90922°0 0068°0
ZO+a0E9z "0 0062°0
7Z0+90p0E °O 0069°0
Zo+d0Bbe °O 006S°0
70+9088€ °0 006b°0
ZO+9OLSE°O 006£*O
TO+a00bb"°O 0062°0
(w)voww W20° oI Www)

0°9% + (aguDad)TIONY 440-aNWL

M 2LGOUNL FENL AWY-X

NOLINGIYLSIG TwaloadS 3aNL AW-X GauNSWaW

00+90000°0 00+30000°0

0000°0
a

TO+a00£Z°0
To+30087°0
TO+d00SE°O
10+3002b°0
T0+3000S°0
10+30009°0
T0+9007L°0
T0+30008°0
T0+90086°0
Zo+a0vTT"O
ZO+gOceT*O
7Z0+30SST°O
70+3008T°0
70+390802 °0
7ZO+d0bLT°O
7ZO+30€6T°O
20+a0002 °O
Z0+90bE7°0
7Z0+902L2°O
Z0+d0bTE°O
ZO+30LSE°O
Z0+9026€ °O
20+d0L2E °O
00+30000°0

NWZO°sI

0000°0

wi

004s *z
O0Lb°e
ooLe*z
00LZ°7
OOLT*z
00L0°2
00L6°T
00L8°T
o0LL*T
00L9°T
00Ls°T
OL °T
OoLe*T
00Lz°T
OOLT'T
0020°T
0046°0

62


UPDATE 5/20/85

60
70
80
90
100
1lo

120
150

Go To 150
MU=BUFF(I,1)*BUFF(I, 11) *wV**BUFF(I,12)
GO TO 150

MU=BUFF (I, 1) *BUFF(I,13) *WV**BUFF(I,14)
GO TO 150

MU=BUFF (1,1) *BUFF(I, 15) *WV**BUFF(I, 16)
Go TO 150

MU=BUFF (I, 1) *BUFF(I,17) *Wwv**BUFF(I,18)
Go TO 150

MU=BUFF(I,1)*BUFF(I,19) *wv**B

Go TO 150° 79) OPE (420)
MU=BUFF (I, 1) *BUFF(I,21) *Wv**BUFF(I,22)
Go TO 150

MU=0.

RETURN

END

37 (Continued)


3.5616
19.5466
3.7041
19.5696
3.8507
19.5909
3.9991
19.6083
4.1494
19.6248
4.3170
19.6395
4.4820
19.6510
4.6520
19.6607
4.8220
19.6695
5.0020
19.6749
5.1823
19.6786
5.3669
19.6808
5.5480
19.6796
5.7232
19.6751
5.9329

2.5750
85.5304
2.5750
88.0045
2.5750
90.5259
2.5750
93.1050
2.5750
95.7299
2.5750
98.4040
2.5750
101.1370
2.5750
103.9219
2.5750
106.7553
2.5750
109.6509
2.5750
112.6014
2.5750
115.6061
2.5750
118.6780
2.5750
121.8180
2.5750

3.2785
0.0000
3.4157
0.0000
3.5542
0.0000
3.6963
0.0000
3.8541
0.0000
4.0080
0.0000
4.1590
0.0000
4.3270
0.0000
4.4895
0.0000
4.6560
0.0000
4.8304
0.0000
5.0009
0.0000
5.1822
0.0000
5.3662
0.0000
5.5412

2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471

Values - Continued

2.8471
0.0000
2.9566
0.0000
3.0664
0.0000
3.1769
0.0000
3.3019
0.0000
3.4260
0.0000
3.5380
0.0000
3.6630
0.0000
3.7918
0.0000
3.9090
0.0000
4.0461
0.0000
461738
0.0000
4.3034
0.0000
4.4347
0.0000
4.5566

2.4471
0.9000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.447)
0.0000
2.4471
0.0000
2.4471
0.0000
2.4471
0.0000
2.4472

2.3849
15.3467
2.4851
15.8608
2.5856
16.3875
2.6876
16.9393
2.7980
17.4930
2.9087
18.0490
3.0215
18.6390
3.1362
19.2367
3.2484
19.8400
3.3702
20.4721
3.4908
21.1046
3.6112
21.7574
3.7276
22.4268
3.8503
23.0972
3.9726

116

2.4000
2.6500
2.4000
2.6500
2.4000
2.6500
2.4000
2.6500
2.4000
2.6500
2.4000
2.6500
2.4000
2.6500
2.4000
2.6500
2.4000
2.6500
2.4000
2.6500
2.4000
2.6500
2.4000
2.6500
2.4000
2.6500
2.4000
2.6500
2.4000

2.2949
14,6979
2.3893
15.2000
2.4840
15.7111
2.5796
16.2443
2.6830
16.7847
2.7867
17.3371
2.8924
17.9065
2.9999
18.4843
3.1049
19.0832
3.2190
19.6932
3.3320
20.3137
3.4418
20.9476
3.5517
21.6005
3.6658
22.2662
3.7781

2.2000
2.6144
2.2000
2.6144
2.2000
2.6144
2.2000
2.6144
2.2000
2.6144
2.2000
2.6144
2.2000
2.6144
2.2000
2.6144
2.2000
2.6144
2.2000
2.6144
2.2000
2.6144
2.2000
2.6144
2.2000
2.6144
2.2000
2.6144
2.2000

0.8003
12.6575
0.8455
13.0352
0.8936
13.4186
0.9382
13.8138
0.9953
14.2135
1.0420
14.6194
1.0970
15.0312
1.1530
15.4444
1.2084
15.8710
1.2690
16.3003
1.3295
16,7331_
1.3871
17.1663
1.4408
17.6100
1.5007
18.0568
1.5586

2.3880
2.3554
2.3830
2.3554
2.3780
2.3554
2.3730
2.3554
2.3680
2.3554
2.3640
2.3554
2.3590
2.3554
2.3550
2.3554
2.3500
2.3554
2.3460
2.3554
2.3410
2.3554
2.3370
2.3554
2.3330
2.3554
2.3280
2.3554
2.3240


S-114A (REV. 2-80)

U.S. DEPT. OF COMM. 1 REG ICATION OR 2. Performing Organ. Report NoJ 3. Publication Date
BIBLIOGRAPHIC DATA q
SHEET (See instructions) NBS/TN-1213 . April 1985

4. TITLE AND SUBTITLE
NBSGSC--A FORTRAN Program for Quantitative X-ray Fluorescence Analysis

5. AUTHOR(S)
G. Y. Tao, P. A. Pella, and R. M. Rousseau
6. PERFORMING ORGANIZATION (if joint or other than NBS, see instructions) 7. Contract/Grant No.
NATIONAL BUREAU OF STANDARDS 7 7
DEPARTMENT OF COMMERCE 8. Type of Report & Period Covered
GAITHERSBURG, MD 20899 Final

9. SPONSORING ORGANIZATION NAME AND COMPLETE ADDRESS (Street, City, State, ZIP)

Same as in item 6 above.

10. SUPPLEMENTARY NOTES

[[) Document describes a computer program; SF-185, FIPS Software Summary, is attached,

1. ABSTRACT (A 200-word or less factual summary of most significant information. If document includes a significant
bibliography or literature survey, mention it here)

A FORTRAN program (NBSGSC) was developed for performing quantitative
analysis of bulk specimens by x-ray fluorescence spectrometry. This program
corrects for x-ray absorption/enhancement Phenomena using the comprehensive
alpha coefficient algorithm Proposed by Lachance (COLA). NBSGSC is a
revision of the program ALPHA and CARECAL originally developed by R.M. |
Rousseau of the Geological Survey of Canada. Part one of the program (CALCO)
Performs the calculation of theoretical alpha coefficients, and part two
(CALCOMP) computes the composition of the analyte specimens. The analysis of
alloys, pressed minerals, and fused specimens can currently ‘be treated by the
program. In addition to using measured x-ray tube spectral distributions,
Spectra from seven commonly used x-ray tube targets could also be calculated
with an NBS algorithm included in the program. NBSGSC is written in FORTRAN
IV for a Digital Equipment Corporation (DEC PDP-11/23) minicomputer using
RLO2 firm disks and an RSX 11M Operating system.

12. KEY WORDS (Six to twelve entries; alphabetical order; capitalize only proper names; and separate key words by semicolons)
alpha coefficients; comprehensive algorithm; ‘fundamental parameters; interelement
corrections; program; quantitative analysis; x-ray.

TS. AVAILABILITY ° 14, NO, OF
PRINTED PAGES
[X] Untimited

(J For Official Distribution, Do Not Release to NTIS 119

ip:¢] Order From Superintendent of Documents, U.S, Government Printing Office, Washington, D.C. 15. Price

(Order From National Technical Information Service (NTIS), Springfield, VA, 22161

USCOMM-DC 6043-P80


(3) Most of the fundamental parameters required for calculating alpha
coefficients such as mass absorption coefficients, fluorescence yields, jump
ratio, analyte line wavelength, absorption edge wavelength, are either
computed or stored in the program to minimize data input by the user.

(4) For calculating mass absorption coefficients, either the algorithm
of Heinrich or the necessary table values from Thinh and Leroux can be
selected. The table values for Thinh and Leroux are stored in a permanent.
datafile.

(5) When analyzing specimens, known concentrations of any unanalyzed
elements can now be entered at fixed concentrations.

(6) A dead-time correction has been incorporated in the program.

(7) Four types of calibration curves can be selected for system
calibration.

(8) One of three sample preparation conditions can be chosen when fusing
specimens to allow greater flexibility in sample-to-flux ratios used in
various laboratories.

(9) If the results of analysis are to be compared with previously known
or "true" values for the analyte specimens, the program will output absolute
and relative errors.

An evaluation of the COLA algorithm has been performed and is the subject of
a publication (4) where results were intercompared with those obtained with
NRLXRF for typical alloys, and minerals both in the pressed powder and fused
disc form. The general form of the COLA expression is:

Cy = Ry (tea soget z Of 54C5Cy) q)

Where C; is the analyte weight fraction, and C k are the corresponding
weight fraction of elements j and k, respectively: ’” R,; is the analyte X-ray
intensity relative to the pure analyte. The coefficient ire) quantifies the
effect of element j on i and is equal to

a C,
af) = ay + (2)
14a3(1-Cy)

where Cy = Cy + Cp + eee

The concept of "crossed" coefficients introduced by Claisse-Quintin (5) is
retained where 5k is defined as follows:

jy ea | A - crs07,c,+4,6,) (3)
ijk * > sh be ihe Wadd
Cyc, | Ry


Tou"o

v00"O

000"

6€0°0- 2@p0"0- 000°

bve*o-
€0%ad

9%

sOv°0- 000°0
€OZNA COTIL
4 (<4

LTu°O- Lt0"0- 800°0- LO0°0- 900°0- S00°0- yOv"0- YOO"O- £00°0
ST0°O- STO"0- y0U"0- S00°0- vO0"0- ¥O0°O- €V0"0- Z00"0- $00°0
000°s =400"d §=©ouv"0 §=—000"0 )§=—000°0 = :000"0 = 000039 «000° =: 000°0
oou’o tu0o"d 200°0 zo0o°u 200°0 £00°0 €00°0 800°0

Tuo"o § zuu"o § 200°0 = z00°0 §=tuord §=—£00"0 = 800"0

000°0 §=v00°0 §=000"0 §=—000"0 §=000"0 = £00"

000°0 ©=000°0 §=000°0 9 a0u"0 §=6©£00°0

000°0 §©6000°0 §=000°0 §=—z00°0

ov0°0 §=©000°0 = Z00"°0

000°0 §=©z00°0

T00°O

000°0

L90°0- L90°O- PEO"O- TEO*O- GZ0°O- 920°O- wZ0°O- ZZ0°0- 800°0-

€IS*T €2S°T 9L0°0- TST°O- BEz*O- ZOE*O- ELE*O- TE¥*O- L9L°O-
Tow (02H OTS GO%@d ZOTIS COeTW TOTOW TOZWN EOI 9
02 6T oT st vr el ras ais 9

(22) ZOTIL ?3LATWNW

saquogd S€‘SS *AULIWOID
A O°Sh =D Lg OuWL

(waLsas gq1xo)

NOLLVNOE VIOD NI 3SN YOd SLNGIOISIIOD WHdTW GINGAH

€O%ad 92

EOZNW Sz
ZOTLL 2
TOTW 02
Tor ¥ 6T
€0I S 9T
oz d St
ZOUIS bt
cozTw eT
TotW 21
TOZWN IT
£01.99
ew

Ww

94

wiv


aaaawanaanaaaaAANANAANANAAAAAN

10

PROGRAM CALCOMP

THIS IS A REVISION OF VERSION 1 OF A FUNDAMENTAL PARAMETER
COMPUTER PROGRAM FOR CORRECTION OF INTERELEMENT EFFECTS FOR
QUANTITATIVE X-RAY SPACTROMETRY. THE ORIGINAL PROGRAM WAS
WRITTEN BY R.M.ROUSSEAU OF THE GEOLOGICAL SURVEY OF CANADA
(GSC) AND CONTAINS THE PROGRAMS ALPHA AND CARECAL WHICH WERE
EXTENSIVELY MODIFIED AT NBS. THE NBSGSC PROGRAM CONTAINS THE
COMPREHENSIVE LACHANCE ALGORITHM(COLA) FOR CORRECTION OF INTER-
ELEMENT EFFECTS.

ALCO IS A REVISION OF ALPHA FOR CALCULATING THEORETICAL ALPHA
COEFFICIENTS, AND CALCOMP IS A REVISION OF CARECAL FOR CALCULA-
TING CONCENTRATIONS IN ANALYTE SPECIMENS.

MAIN
SUBROUTINE:

OVERLAY STRUCTURE OF CALCOMP :
PROGRAM—-———CALCOMP

DATAIN, CALRI ,GETERR, SVLSF2, SLE
*

AUTHORS: G.Y. TAO AND P.A. PELLA DATE: 07-SEP-1984
CENTER FOR ANALYTICAL CHEMISTRY, NATIONAL BUREAU OF STANDARDS
GAITHERSBURG MD 20899 U.S.A.

AND R.M.ROUSSEAU
GEOLOGICAL SURVEY OF CANADA, OTTAWA, CANADA K1A-0E8

* GUEST RESEARCHER FROM SHANGHAI INSTITUTE OF CERAMICS,
ACADEMIA SINICA, THE PEOPLE'S REPUBLIC OF CHINA

REAL IP(13) ,1X(20,13) ,1S(20,13)

DIMENSION IDATE(S) , ITIME(4) ,Al (13,13) ,A2(12,12) ,A3(12,12),
AIJK(12,12,12) ,CS(20,13) ,CIM(13) ,SCI(13) ,CX(20,13),
TOT (20) ,CX1 (20,13) ,-RX(20,13) ,RX1 (20, 12)

DOUBLE PRECISION NOA(13) ,NOA1 (13) ,NS(20) ,NX(20)

COMMON K1,N6,N,M,M1,K2,KK1,KK6

COMMON /DATSUB/CS, IS, IX,NS, IP

COMMON /COESUB/A1,A2,A3,ALJK

COMMON /CALSUB/RX, RX1

COMMON /GETSUB/NOA, NOA1,NX,CX, TOT

DATA KK6/'N '/

CALL DATE(IDATE)

CALL TIME (ITIME)

WRITE (6,500) IDATE, ITIME

WRITE (6,510)

READ(5,*) Kl

CALL DATAIN

N2=N6-1

WRITE(6,520)

READ(5,530) KK7

IF(KK7.EQ."Y ')WRITE(6,540)

IF(KK7.EQ.'Y ')READ(S,*)D

D=D*1.0E-6

IF(K2.EQ.2)GOTO 45

DO 40 I=1,M

IF(KK1.EQ.*Y ')J7=0

DO 40 J=1,N6

DO 10 18=1,N -

IF (NOA (J) .EQ.NOA1(I8))GOTO 20

CONTINUE

GOTO 30

IF(KK1.EQ.*Y ')J7=J7+1

IF(KK7.EQ.°Y ') IP(J)=IP(J) /(1.0-D*IP(J) )

IF(KK7.EQ."Y ')IX(I,J)*IX(I,J)/(1.0-D*IX(I,J))

RX(I,J)#IX(1,J)/IP (J)

IF (KK1.EQ."Y ')RX1(I,J7)#RX(I,J)

38


UPDATE 5/20/85

1050
1060
1070
1080
1090
1100
1110
1120
1130
1140

t++++

EQUATION'//58X," (OXIDE SYSTEM) ',,///,

49X,' TARGET: ',A2,2X,F5.1," KV',' FILTER : ',A3,/,
55X,'GEOMETRY: ',I2,',',I2,' DEGREES',///,

56X,' ANALYTE: ',A2,I1,'0',11,1X,'(",I2,")',//
FORMAT (16X, 16 (5X,1I2,1X) ,/)

FORMAT (/17X, 16 (4X,A2, 2X) ,/)

FORMAT (/18X, 16 (2X,A2,11,'0',11,1X) ,/)

FORMAT (/11X,'Al', 4X, 12F8.3)

FORMAT (/11X,'A2', 4X, 12F8. 3)

FORMAT (/11X,'A3', 4X, 12F8.3)

FORMAT (/5X,'AIJK ',12,1X,A2,1X,F8.3,1X)

FORMAT (/2X,'AIJK ',1I2,1X,A2,1I1,'0',I1,1X,F8.3,1X)
FORMAT (/11X, 12,1X,A2,1X,12F8. 3)

FORMAT (/8X,12,1X,A2,I1,'0',11,1X,12F8.3)

END

23 (Continued)


3.4A Calculation of Coefficients for Fused Rock Samples

SRUN CALCO

DATE: 03-OCT-84 TIME: 08:45:48

WHICH SYSTEM DO YOU WISH TO ANALYZE:

1-ELEMENT SYSTEM 2-OXIDE SYSTEM 3-FUSED DISK SYSTEM ? 3
INPUT NUMBER OF ANALYTES: 12
INPUT NAMES OF ANALYTES (XXNONS) :

NA201 MG101 AL203 SI102 P 205 S 103 K 201 CA101 T1102 CR203 MN101 FE203
WHAT MASS ABS. COEF. ALGORITHM DO YOU WANT TO USE :
1-LEROUX ALGORITHM 2-HEINRICH ALGORITHM 7? 2
DO YOU WANT TO CREATE A DATAFILE FOR SAVING CALCULATED ALPHA COEFFICIENTS (Y/N)? Y
INPUT DATAFILE NAME OF ALPHA COEFFICIENTS (XXXXXX.XXX) : FDROCK.C60
INPUT MEAN CONCENTRATIONS (WEIGHT FRACTION) OF ANALYTES IN THE SPECIMENS TO BE ANALYZED:
Ie1 NA201 205

Is2 TMG101 025
I= 3 L203 230
In4 $1102 50
Ie5 P 205 005

I= 6 S 103 2015

Is7 K 201 2075

I=8 A101] 2175

Ie9 TI102 2015

T=10 CR203 2010

Tell oo] 2005

1-12 FE203 240
FOR SAMPLE GEOMETRY, INPUT INCIDENCE & EMERGENCE ANGLES (DEGREE-XX): 55,35
INPUT THE CHARACTERISTIC LINE NUMBER YOU WISH TO MEASURE (1-KA, 2-KB, 3-LAl, 4-LB1, 5-LB2):
Ie]
Is 2
Is 3
In4
eS
Ie 6
I*7
I-68
Ie9
T#10
Tell
Iel2
DO YOU WANT TO PRINT OUT CALCULATED ALPHA COEFFICIENTS(Y/N): Y
WHICH X-RAY TUBE SPECTRAL DISTRIBUTION DO YOU PREFER:

1-CALCULATED SPECTRUM FROM NBS ALGORITHM 3 2-MEASURED SPECTRUM? 1
DO YOU WANT TO PRINT OUT THE SPECTRAL DISTRIBUTION(Y/N) ? Y
INPUT NAME OF X-RAY TUBE TARGET (XX) : CR
INPUT VOLTAGE(KV), TAKE-OFF ANGLE OF X-RAY FROM TUBE TARGET(DEGREE) , AND

WINDOW THICKNESS (MM) OF X-RAY TUBE : 60.0,26.0,.45
INPUT THE ENDING WAVELENGTH OF X-RAY TUBE SPECTRUM(ANGSTROM) : 2.99

ASQAQTMPVNRS
rerererer rere era

101


aaaaana

10
20

30

55

SUBROUTINE DATAIN

MOST OF THE INPUT DATA REQUIRED FOR CALCULATING CONCANTRATIONS
IS HANDLED BY THIS SUBROUTINE.

NBS 05-SEP-1984

REAL IP(13) ,1X(20,13) ,1S(20,13)

DIMENSION Al (13,13) ,A2(12,12) ,A3(12,12) ,AIJK(12,12,12),
NAMPIL(5) ,CS(20,13)

DOUBLE PRECISION NOA(13) ,NOA1 (13) ,NS(20) ,NX(20)

COMMON K1,N6,N,M,M1,K2,KK1

COMMON /DATSUB/CS, IS, IX,NS, IP

COMMON /COESUB/A1,A2,A3,AIJK

COMMON /GETSUB/NOA, NOA1,NX

WRITE (6,500)

READ(5,510) KK

TF (KK1.£Q."Y ')WRITE(6,520)

IF(KK1.EQ.'Y ')READ(S,*)N6,N.M

IF(KK1.EQ.'N ')WRITE(6,530)

IF(KK1.EQ.'N ')READ(5S,*)NoM

IF(KK1.EQ.'N ')N6=N

IF(KK1.EQ.'Y ')WRITE(6,540)

IF(KK1.EQ.'Y ')READ(5,550) (NOA(I) ,I=1,N6)

WRITE (6,560)

READ(5,550) (NOA1(I) ,I=1,N)

IF(KK1.EQ.'Y ')GOTO 20

DO 10 I=1,N6

NOA (I) =NOA1 (I)

CONTINUE

WRITE (6,570)

READ(5,*) K4

IF(K4.EQ.1)GOTO 30

WRITE (6,580)

IF(K1.EQ.1)READ(5,*) ( (Al (I,J) -J#1,N6) »(A2(I,J) ,J=1,N6) ,

(A3 (I,J) ,J=1,N6) , ((AIJK(I,J,K) ,K=1,N6) ,J=1,N6) ,I=1,N6)

IF (K1.EQ.2)READ(5,*) ( (Al (I,J) »J=1,N6) ,(A2(I,J) -J=1,N6),

({AIJK(1,J,K) -K=1,N6) ,J=1,N6) ,I=1,N6)

IF (K1.EQ.3)READ(5,*) ((Al(I,J) ,J=1,N6) ,1=1,N6)

GOTO 50

WRITE (6,590)

READ(5,600) NAMFIL

CALL ASSIGN(3,NAMFIL, 10)

IF(K1.EQ.1) READ(3,* ,-ERR=40) ( (Al (I,J) »J=1,N6) ,(A2(I,J) »J=1,N6) »

(A3 (I,J) ,J=1,N6) » ((ALIK(I,J,K) -K#1,N6) ,J=1,N6) ,-I=1,N6)

IE (K1.EQ. 2) READ(3,* ,ERR=40) ( (Al (I,J) -J=1,N6) ¢(A2(I,J) ,J=1,N6) »

((AIJK(1,J,K) /K#1,N6) ,J=1,N6) ,I=1,N6)

IF (K1.EQ. 3) READ(3,* , ERR=40) ( (Al (I,J) ,J=1,N6) ,I=1,N6)

CALL CLOSE(3)

WRITE (6,610)

READ(5,*) K2

IF (K2.EQ.2)WRITE (6,620)

IF (K2.EQ.2) READ(5,*) M1

IF(K2.EQ.2)GOTO 70

IF (KK1.EQ."Y ') WRITE(6,630)

IF(KK1.EQ.'N ')WRITE(6,635)

DO 60 I=1,N6

DO 55 18=1,N

IE (NOA(I) .EQ.NOA1(18))GOTO 57

CONTINUE

GOTO 60

WRITE (6,640) NOA(I)

READ(5,*) IP(I)

41