Semiautomatic Assembly of Mass Spectrometry Matrices

In the same fashion calibration for a new element no longer requires the preparation of a scale for each line; instead, thecoeffi- cients of Equation ...
1 downloads 0 Views 679KB Size
calculating boards are now available for other work. Manual conversion required approximately one man-month for 1200 element analyses in triplicate. This did not include estimating the error for each analysis, although the computer program nom provides this information. Knowledge of the error facilitates control of analytical procedures and provides a basis for estimating the validity of conclusions based on spectrographic results. The major benefit, however, is the ease with which the program accepts changes in calibration

data. Changes in the film gamma curve are made by insertion of five new parameters in the program. This eliminates the need of preparing a new relative intensity scale for the calculating board for each change in the gamma curve. I n the same fashion calibration for a new element no longer requires the preparation of a scale for each line; instead, the coefficients of Equation 4 for the line in question are obtained from the calibration data by a separate, least squares curve fitting program and are stored on a

single punched card. Because of the manner in which the program operates, the number of calibration curves which can be used is unlimited. A detailed description of the program and a program deck are available from the authors on request. LITERATURE CITED

(1) Harvey, C. E., “Spectrochemical Procedures,” pp. 71-81, 238-54, Applied Research Laboratories, Glendale, Calif., 1950. RECEIVED for review December 14, 1957. Accepted March 14, 1958.

Semiautomatic Assembly of Mass Spectrometry Matrices D.

R. McADAMS

Esso Research laboratories, Esso Standard Oil Co., Baton Rouge, l a . ,Mass spectrometer calibration data as obtained from the instrument are adjusted b y means of a medium-sized digital computer. After manipulation for removal of impurity components and for instrument sensitivity changes, the data are assembled into a direct matrix in a form suitable for mathematical inversion. Manual effort is minimized while versatility is maintained in the computer program.

A

digitizing systems for mass spectrometry have come into wide use in the past few years. The use of digital computers for calculating analytical data from the results of the mass spectrometers has grown steadily. To date, honever, most procedures for working up calibration information from a mass spectrometer to the point where analytical data can be calculated have been done tediously by hand. By connecting the output of a mass spectral digitizer to a card punch, the mass spectrometer calibration data can be prepared directly in punched card form. The cards are produced in groups-one group for each calibration compound. The individual cards in a group are identified by some numerical code arrangement with one mass spectral peak height per card. The final desired form for this calibration information is that of the matrix, with the data stored in the computer in a suitable location for subsequent mathematical inversion of the matrix. I n this, it is desirable that the order of the matrix shall be unrestricted up to a maximum of 27. The particular inversion program employed in the case under consideration was that obtained from I B M for use in the I B M 650, and inUTOMATIC

~ o l v e dthe use of floating decimal arithmetic. Therefore, conversion from the fixed point arithmetic to the floating decimal arithmetic was incorporated in the computer program. To minimize human effort in the preparation of mass spectrometer calibration data for use in digital computers, a program has been prepared for a medium-sized digital computer which possesses certain features of versatility and ease of operation. This program consists of three principal parts: (1) modification of the calibration data obtained in punched card form from a spectral digitizer; (2) data assembly in the form of a direct matrix; and (3) a variety of other procedures arranged so that the direct matrix can be used in the preparation of the desired inverse matrix. I n the modification of the calibration data, the following features are considered : instrument sensitivity changes, size of sample, background spectra, impurities of calibrants, and averaging of spectra. These modifications can be provided in the computer program in a fairly simple fashion, inasmuch as they are expressible in mathematical form. Instrument sensitivity changes require multiplication by only one or several mathematical factors to correct for sensitivity shifts. The size of sample can be considered by inclusion of a n additional factor. Instrument background involves only subtraction from the calibrant spectrum. Impurities of calibrants may be corrected by subtraction of a suitable portion of one column matrix from another. Spectra are very easily averaged. These mathematical operations are unchanged from one problem to another.

The arrangement of the data in the form of a direct matrix, however, involves several other features which are not expressible in mathematical form. The data identification may have no mathematical significance. The data may be coded by mass number or some other independent system. Then, too, extraneous data may exist as a result of the calibration procedure. Elimination of these extraneous data and rearrangement of the data manually so that the matrix assembly is possible would require an exceedingly large effort. A suitable computer program should therefore include some simple means for expressing the rules for the matrix assembly. A variety of other procedures are incorporated in the program. To permit additional changes to be made t o the direct matrix after the initial preparation, these operations include punching the direct matrix into cards with one matrix term per card, conversion to floating decimal notation, reducing the size of the matrix, transferring data from matrix area to a working area for further computations, and other similar steps. These involve fairly simple machine operations. Construction of a problem by a person unfamiliar with the operation of the digital computer was provided by features in the program itself. One feature in an I B M 650 computer which assists in problem construction is that of “load cards.” The appearance of a card punched in the proper fashionthat is, a load card-permits the construction of branches in the program. If this branch in the program is directed to a program word just entered in the same load card, an extremely large number of program branches is possible. VOL. 30, NO. 5, MAY 1958

881

A description of such load cards used for program snitching is presented in Table I. The use of load cards by themselves is not a sufficient solution for the problems under consideration. To permit the construction of a versatile program, provision must be made for entry of variable iiistructions and tabular construction by the computer for later reference. The construction of the table can be directed to depend upon the sequence of appearance of loud cards, together with the data code cards which partially identify data. The card-appearance-sequence is a technique which follon-s naturally aiid easily from human knonledge of the matrix arrangement. It is a technique which is easily learned. I n Table I1 instruction cards are sorted, together n it11 data code cards to permit the distribution of different mass spectral peaks in the various matrix rous. Tlieqe data code cards alqo are easily iiide.;ed and, if desired, kept in storage in a suitable file while not in use. These data code cards possess the same card layout as the data cardq, so that a rpare set of the

latter may he employed whenever desired for data coding. The computer examines these instructions and coding forms and prepares a table for internal storage (Table 111). The individual instructioiis pertaining to each niass spectral peak are combined with the peak identification and stored as a single 10-digit rrord. These additional instructions include summation question., multiple use questions, and factor choices. The computer maintains its own count 011 row number for the direct matrix and assembles this in the same 10-digit word. Entry of calibration data cards containing peak identifications or, if desirable, simple code numbers then permits the computer to refer to the constructed table and use the calibration data in the desired fashion. Arrangement in Direct Matrix. This computer program may be used to prepare either square or rectangular matrices. Rectangular matrices may have a greater number of r o w or greater nuniber of columns. This has proved advantageous in the preparation of calibration data for later reference in tlie direct form. Extra coluniiis

have proved useful in eorriputation schemes wherein all of the direct calih a t i o n data are not employed in the inverted form. Extra r o ~ are s useful for checks on unknoirn samples. For a more detailed description of the procedure used for coding data, coniider the example given in Table 11. A matrix is desired to have four ron s of data. At this point nothing needs to be decided concerning the number of columns in tlie direct matrix. There are. honever, si.; mass spectral peaks to be arranged in a particular fashion in the matrix The aromatic peaks m ’e 77 and 78 are to he corrected by instrument sensitivity factor 1 and the nonaromatic spectral peaks m e 41, 43, 55, and 57 are to be corrected by instrument sensitivity factor 2 . The first card in the arrangement of this portion of the problem is a “factor 2 directing” card, inasmuch as the first mass spectral peaks which will occur in the first rov- of the matrix are to be adjusted by factor 2 . Following this is placed a ‘‘sum peaks” directing card, or load card, as more than one mass spectral peak is to be considered for the first row, The data code cards 41 aiid 55 n hich follon- signify that these mass spectral peaks are to be iiicluded

Table 1. Load Cards for Program Branches Reading into computer locations 1851 to 1858, inclusive. Branch on appearance of load card is to xord entered by same card into location 1852. Card Columns 11-20 21-30 31-40 41-55 Computer Location Card Titles 1852 1853 1854 (Abbreviated in Practice) Instructions and Codes Card Sotes. Variable data shown Number as XS,YY, or -ZZ 69 69 24 1 6918538001 6911021854 Data used in several matrix rows 2412241200 1Iultiple use 6918538001 6911031854 More than one datum value in given matrix 2 2412341200 Sum peaks

3 4

5 6 7 8 9A 9B 10 11

12

6918538001 6918538001 6918538001 6018531854 0000001301 6918531854 6518531408 6618631408 6518531401 6918531854 0000001554

6911001854 6911001854 6911011854 00000000xx -

2412341246 2412441200 2412441200 2417561310

0oxxxx0000 000000000001 xx00000000 oooo000oxx xx00ooom -

2414091300

2414581553

Terminate Fum Factor 1 or H Factor 2 or S Matrix order Load background AIaximum valid Deak Load spectrum Load spectrum 1 Transfer plain Weight factor Transfer average

row

Signals end of above action Directs usage of instrument sensitivity factors

{

Direct matrix will have=

different columns

XSSS coded same as data identification S o correction for background

Korking area to matrix column number __ SS Csed for averaging spectrum with others Average n-ith other data in matrix column -r_-

XA

13

6518531570

x x Y Y ~ - Y Y oZz

Historic data

14

65185315iO

xx00000000 -

Impurity term

15

0000001521

xxo0000000 -

Correct by column

16 17

6518531723 6518531722

xx00000000 -

Zero row term Column to work area

18.1

0000001822

18B 19

0000001125 6518531809

00000000xx

Punch matrix ROT rejects

20 21

6518531809 6518531809

xx01000000 -

Column rejects Terminate table

882

xx00000000 -

R o X X term should be YYY.YYy< of term

Float decimal

9999999999

ANALYTICAL CHEMISTRY

.

in %Trow Term% row is employed in calculating amount of impurity Spectrum for impuritj- component is in matrix column SX Term in row X z is zeroed Column SS __ is transferred to working area in computer Convert terms in direct matrix to floatingdecimal notation Punch direct matrix terms into cards Row X S is to be trimmed from the direct matrix ColumnX,Y is to be trimmed Table of reject instructions is completed and trimming is begun

in the first row, The next card, “terminate sum” load card, terminates the operation of the “sum peaks” directing card and signals to the computer that a rowj in this case the first row (00 in machine language), is complete. The “factor 1 directing” card vihich follon s signifies t h a t the data code cards to follolv correspond to mass spec+ peaks which will be corrected by sensitivity factor 1. The matrix row noiv t o be described consists of a single mass spectral peak value. For reasons of example only, this same peak is eniployed in more than one row of t h e matrix. To achieve this, a “multiple use” load card is placed in the card arrangement. This multiple use card is effective for the single data code card immediately following-in this case a 78 code card. This signifies that m,’e 78 peak height in the calibration data will be used in some additional row of the matrix as well as this, the 01 ron-. The sum peaks card which follows again directs the computer to sum various mass spectral peak values for the next ron-in this case the 77 and 78 mass spectral peaks. The factor 2 directing card which follows has the same purpose as the initial factor 2 directing card. Following the setup of the data-row identification, a matrix order instruction card is used to define the nuniber of colunins in the matrix. In square niatriccs this is, of course, the order nuniher. Thereafter, data cards, together n ith suitable instructions, are read into the computer. DATA ADJUSTMENT

I n the adjustment of the iaw data obtained from the mass spectrometer, theqe data are fed in groups, one group for each calibration component. Background data likenise are fed in a group to the computer. For reasons which should become apparent later, these two classes of data are not stored in the computer matrix area but are placed temporarily in separate n-orking areas, one for the caliliration data aiid one for the background data. I n the loading of the spectral dxtd, the first material usually loaded is the background data. This is identified by a preceding card, a “load background” card. Follon ing the background cards as shown in an example in Table IT-, sensitivity factor cards are introduced. These are in exact card layout as used for daily sensitivity factors in computing analytical samples from the mass spectrometer. These factors are used to define any day-to-day changes in the sensitivity of the mass spectrometers. Calibration data are identified by a prior “load spectrum” instruction card, following n hich a “maximum valid peak” card is introduced. The purpose of this maximum valid peak card is to eliminate spurious information 11hich is derived principally from slight inaccuracies in the mass

spectral digitizer. A code number included iii the maximum valid peak card corresponds to the maximum numerical size code number which corresponds t o the last significant peak in the mass spectrum. For example, a n-butane sample would have as the maximum valid peak mass 58. If codes such as result froin the use of a CEC SpectroSadic digitizer are used, these should preferably be arranged with some sequential order, such as inass number. to simplify their later use. Cards containing the spectral data are neat fed t o the computer. 1Ianipulations such as correcting for instrument sensitivity, sample size, hackground, etc., are conveniently conducted a t this point. Results are stored in a working area. Ran spectral data in the working area may then be treated in a nuniber of nays. If the calibration component is impure, niathematical corrections for the impurity coniponents can be conducted on the basis of spectral data already transferred into the matrix area of the computer. This is done in t n o steps for each impurity. The first step is definition of the niatrix row containing the term involved in the computation of the amount of the impurity. The second step is designation of the matrix column containing the calibration spectrum for that impurity. These operations are effected bj- use of instruction cards, “impurity term” and “correct by column.” Successive corrections for a number of impurities are accomplished by feeding appropriate pairs of these cards to the computer. Kliere a calibration component 110ssesses a small natural peak a t the same niass number as a peak for one of the impurity components, that small natural peak of the calibration material niay be retained by the use of “historic data” cards. This instruction n-ill cause the computer to reserve the desired portion of a significant mass spectral peak, the remainder being employed in the computation of the amount of the impurity. One useful operation nhich mag be conducted on the ran- spectral data is the elimination of spurious peaks loner in the spectrum. These peaks cannot be eliminated by the use of “maximum valid peak” cards, inasmuch as real peaks a t higher code numbers are presented. “Zero rovi term” instruction cards are employedto zero out any desired term in the working area, thereby producing zero matrix terms on subsequent transfer t o the matrix area. An example of this operation would be the remoyal of a mass 43 peak from a carbon dioxide spectrum when background correction by itself would be insufficient. The removal of spurious data in this fashion is simpler than hand sorting and removal of undesired cards.

Table II. Example of Card Arrangement for Coding Descriptions of Matrix Rows

Matrix Row

lLlS Peaks

00

41,55

02 03

78 77, 78 43,57

01

Card Arrangement Information in Cards Type Card Factor two directing Sum peaks 41 55

Terminate sum Factor one directing Multiple use

I

78

Sum peaks 77 78

Terminate sum Factor two directing Sum peaks 43

57 Terminate sum

Load Load Data Data Load Load Load Data Load Data Data Load Load Load Data Data Load

code code

code code code

code code

Table 111. Example of Table Constructed by Computer for Row Descriptions

Rox

hIatrix Description hlS peaks 41,55

00

78 77,78 43,57

01 02

03

Coniputer Table of 10-Digit Words X I ult iPeak Row Sum? ple? Factor 00 1 0 1 04100 04300 05500 05700 07700 07800 07800 99999

03 00 03 02

01 02 99

1 1 1 1 0 1 9

0 0 0 0 1 0 9

1 1 1 0 0 0 9

Table IV. Problem Construction EXample. Air and n-Butane

Sequence Load background Background data Sensitivity factor cards Load spectrum Maximum valid peak 044 Bir data Zero row term 19 Transfer plain 12 Load spectrum hlasimum valid peak 058 n-Butane data Historic data Impurity term 12 Correct by column 12 Weight factor 01 Transfer average 04 Etc.

Type of Cards Load Data A Data B Load Load Data Load Load Load Load Data Load Load Load Load Load

VOL. 30, NO. 5, MAY 1958

883

Row 21 Row 22 Row 23 Row 24 Row 25

Table VI. Matrix Size

Number of Spectra

26 X 26 20 x 20 12 x 11

45 39 17 Errors in problem assembly for use of tion errors were in hand method.

Utility of Program Hours (Including Inversion) Before Now Man Computer Man Computer 30 25 16

0.8 0.5 0.2 computer method are no more serious than calcula-

Corrected mass spectral data may be transferred from the working area into t h e matrix area in either one of two fashions by the use of transfer cards. A “transfer plain” card permits complete replacement of any prior data in any given column of the matrix by the new calibration information being transferred from the working area. If averaging of the new mass spectrum with earlier data in the matrix is desired, two cards are employed for this operation. The first is a “weight factor” card. One of these weight factor cards must have been used with each of the mass spectra to be employed in the final results, inasmuch as the computer maintains an accumulated sum of the weight factors for all of the spectra involved. The previous data which have been introduced and averaged are reduced to a standard sensitivity level and the accumulations of the prior weight factors are recorded in counters in the computer, one counter for each column. On the requirement of transfer averaging of new data, the accumulated weight factor for the old d a t a in a given column is multiplied row by row by those new data. The sums are then divided by the nenaccumulated weight factor and reintroduced into the given column of the 884

ANALYTltAL CHEMISTRY

0.6 0.3 0.1

1.6 1.4 0.8

matrix. This maintains the matrix at all times in the standard form. The preparation of mass spectra in a fixed sequence may prove undesirable at times because of instrumental reasons. Rather than change the sequence of initial feeding of cards to the computer from that sequence in which the cards !+-ere produced from the mass spectrometer, a provision has been made for transferring data from the matrix area into the working area. This permits further correction of a spectrum for a n impurity on which the spectrum has been introduced to the computer at a later time. For example, an air sample may contain carbon dioxide; and a carbon dioxide sample may contain air. Obviously, only one spectrum at a time can be fed to the computer. The air spectrum may be read and transferred to the matrix area; next the carbon dioxide spectrum may be read into the working area; the air content may be corrected out; the corrected carbon dioxide spectrum is transferred to the matrix area; the .impure air spectrum may be transferred to the working area, following which it may be corrected for its carbon dioxide content. Finally, the purified air spectrum is transferred back to the matrix area. This transfer routine also permits the prepa-

ration of extra columns for checking purposes. These extra check columns, of course, are eliminated before inversion is attempted. Conversion of a direct matrix from a rectangle to a square by elimination of extra rows or columns, or reduction of size of a matrix from one order t o a smaller order, is accomplished by use of a subroutine labeled “trimming.” Setting up for this operation is accomplished by the use of “row reject” and/ or “column reject” cards followed by a “terminate table” card which initiates the actual trimming operation in the computer. Row reject cards and column reject cards contain code numbers to designate individual rows or columns. These cards are introduced, one for each row and one card for each column which is to be rejected. The computer constructs a table for reference in the trimming operation, examines the matrix, and rejects all the undesired terms rvhile compressing the remaining terms into the smaller desired form. I n accomplishing this compression of a larger matrix into a smaller matrix, the sequences of the rows and columns are, of course, not changed. Extraneous data only are removed. Two other operations are conducted to permit maximum use of data. At any point during the operation of the problem, the direct matrix up to that point may be punched out. one term per card, by insertion of the “punch matrix” instruction card. The data in the punched cards are identified by matrix row, matrix column and by computer storage unit number. The punch-out is column by column. The computer procedure employed for the matrix inversion was prepared

by D. K. Sweeney, International Business Machines Corp., and has the I B M designation H864. This procedure employs floating decimal arithmetic and mathematically involves Gaussian elimination in the matrix inversion. For the purposes of this application, the inversion program was modified for reconversion from floating decimal to fixed decimal before punchout of the in\-erted matrix. Various other reading routines were added. Additionally, the drum clearing routine n-as modified so that the direct matrix prepared in the computer lvould not be lost. Inasmuch as floating decimal arithmetic was involved, the last operation in the assembly of the direct matrix is conversion from the fixed decimal t o the floating decimal notation, by insertion of a “floating decimal” instruction card a t the end of the assembly problem. Following this point, the inversion program may be fed

to the computer if desired and inverses thereupon obtained.

CONCLUSIONS

K h a t is obtainable through use of the matrix assembly program discussed above? First, one may have a tabulation of the direct matrix as shown in Table V. This tabulation was prepared with a specially wired board for an I B M 407 tabulating machine. Secondly, much manpower is saved (Table VI). Regardless of the matrix size, considerably less effort is required when the digital computer is used for assembly of the calibration information. For the largest matrix assembled by this procedure, approximately 12 additional minutes of the computer were required for the assembly over and above the time required in the computer for the inversion and miscellaneous operations

employed in earlier schemes. At the same time, the man-hours requirement was decreased from the neighborhood of 30 t o less than 2 hours. For smaller matrices, the decrease in man-hours was less, as might be expected, but the added convenience is still appreciable when the machine assembly procedure is used. The computer times of 0.6 and 0.3 hour noted in Table VI may seem unusually long for inversions. Several additional operations are conducted with the larger inverse matrix data before actual use in computation programs for analytical problems. These operations are not appropriate for consideration in this paper.

RECEIVED for review December 26, 1957. Accepted March 11, 1958. Division of Petroleum Chemistry, S mposium on Applications of Machine %mputation t o Petroleum Research, 132nd Meeting, ACS, New York, N. Y., September 1957.

End of Symposium. Other papers in this symposium are printed in the M a y 1958 issue of lndostrial and Engineering Chemistry

Ana Iytica I Laboratory Operation and Control Utilizing Busi less Machine Punched Card Procedures L. M. ADDISON, E. H, SPENCER, and E. M. CHARLET Esso Research Laboratories, Esso Standard Oil Co., Baton Rouge, l a .

b An IBM system for keeping track of samples submitted to an analytical laboratory, for recording results, and for reporting the answers reduces the manpower expended in record keeping and improves service to customers and the efficiency of scheduling work. Past results may be retrieved from the files with little effort and may b e searched for b y sample serial number, specific sample description, type of sample, or answer. Summary data on the performance of the laboratory are invaluable for controlling operating costs.

T

HE analytical laboratory of a modern petroleum refinery or research organization must perform daily a wide variety of tests on ever-increasing numbers of samples. Consequently, careful attention must be given to sample and data handling, to test scheduling, and to regulation of the analytical load. The analytical section of the Esso Research Laboratories a t the Esso Standard Oil Co. refinery, Baton Rouge, La., is currently using a system based on the use of business machine punched cards and accounting equipment to facilitate its operation. This

procedure was devised for use in a research laboratory. As a result, the problem of immediate reporting of test results to refinery units was of limited importance, so that it was subordinated to problems of priority, efficiency, and backlog. However, only small modifications to the system are required to meet the needs of the typical refinery laboratory. The wide scope of analytical requirements does not alter the primary aim of an analytical laboratory: to provide accurate, precise analyses. Nonetheless, it has become highly desirable to attain maximum efficiency, which, in turn, cannot be computed solely in terms of the analytical group. Maximum efficiency from the over-all vienpoint is composed of many elements, including :

1. Efficient use of manpon.er through proper scheduling. 2 . Service consistent with the needs of the production and research units. 3. Reduction in nonproductive manual effort, such as in record keeping. Providing more efficient use of manpover and better service requires that detailed information concerning the analytical situation be made available

to the laboratory management. Such record keeping tends to increase the overhead enormously if it is done manually. The problem, however, is parallel to those occurring in accounting and inventory control. Hence, it is entirely reasonable to expect benefit from the use of punched card accounting and control procedures. This report describes the integration of such equipment and procedures into the saniplehandling and data-reporting systemof an analytical section of a petroleum research laboratory. SAMPLE AND DATA HANDLING PROCEDURE

The first problem in an analytical group is the mechanics of transporting samples from the research or production groups to the analysts and then returning the test results to the proper persons. This should be accomplished routinely in as short a time as possible, with the use of a minimum of manpower. Yet, care must be taken to prevent lost or broken samples and to avoid deterioration of samples which are sensitive to heat or storage. A means must be provided t o expedite critical or “control” samples which must be analyzed immediately to provide information for control of VOL. 30, NO. 5, MAY 1958

e

885

,