Abstract:
Procedures are provided for analyzing multicomponent FT-IR spectra for unknown mixtures of gases. In the analysis, the FT-IR spectrum is measured for the particular unknown mixture of gases to be analyzed. The operations of the multicomponent analysis are divided into three different levels so that the most laborious operations, which have to be performed very seldom or only once, are on the highest level. Rapid calculation operations to be performed in connection with each spectrum analysis are on the lowest level. The levels are as follows: 1) Forming a spectrum library; 2) Introducing a new basis and adding a new vector to the old basis; and 3) Individual analysis. Variances, error limits, and residual spectrums are calculated in the analysis. A windowing procedure is followed to reject spectrum portions where the transmittance approaches zero or which do not contain real information for some other reason. Determination of the partial pressures is speeded up by storing predetermined calculation results in a data file for later usage, thereby avoiding unnecessary recalculation of certain equations utilized in the analysis.

Description:
BACKGROUND OF THE INVENTION 
     The present invention concerns the procedure for analyzing a FT-IR-spectrum of an unknown mixture of gases, about which we do not know the constituent gases, not to mention their partial pressures. Instead we know a large set of library spectra of pure molecular gases, measured in known pressures and with the same interferometer as the unknown sample. 
     1. Field of the Invention 
     In FT-IR-spectroscopy in multicomponent analysis we have the IR-spectrum of an unknonw mixture of gases, about which we co not inow the constituent gases, not to mention their partial pressures. Instead we know a large set f library spectra of pure molecular gases, measured in known pressures and wih the same interferometer as the unknown sample. By using these pure spectra we ought to calculate the patial pressures of the pure gases in the mixture, with error limits. The errors in the obtained values arise from the measurement noise in the spcectra. Because the calculation of such partial pressures that best explain the mixture spectrum is a relatively simple task, we shall consider it only briefly and concentrate on the calculation of their error limits. We chall also consider the optimal choice of the resolution providing as small error limits as possible and the application of the non-negativity constraint for the partial pressures. In addition to gas spectra, all the calculations apply to spectra of non-interacting liquids as well. 
     2. Description of the Prior Art 
     Let us denote by s the measured mixture spectrum to be analyzed and let {K j  |j=1, . . . ,m} be the set of library spectra with which we are trying to explain s. We assume that all the spectra are linearized, i.e. that on the y-axis there is always the negative logarithm of the transmittance (except possible some constant coefficient). This means that we are using the absorbance scale. Then, according to Beer&#39;s law, s is some linear combination of the spectra K j , or ##EQU1## Our task is to determine such coefficients x j  by which s is explained as well as possible. After that the partial pressures of the pure gases in the mixture ar obtained by multiplying the measuring pressures of the corresponding library spectra by their coefficients in the linear combination. 
     Because all the spectra are only known at equally spaced tabelling points υ 1 , . . . ,υ n , s and k j  can be treeated as vectors, and we can state Eq. 1 in vector form as ##EQU2## This equation can be further simplified by collecting all K j  -vectors together into a matrix K, which gives us the matrix equation 
     
         Kx=s,                                                      (3) 
    
     where ##EQU3## and x is the coefficient (column) vector containing the coefficients x j  of the pure spectra. 
     SUMMARY OF THE INVENTION 
     Now all the spectra that can be exactly explained by the used set of M pure spectra are expressible in the form Kx. However, even if the set {K j  |j=1, . . . ,M} included all the components in the mixture, there always exists some noise in the spectra so that s never lies exactly in the vector space generated by the vectors K j . Thus we have to content ourselves with such a linear combination Kx of the pure spectra that is as near as possible to the vector s. This means that we have to minimize the norm of the residual vector s-Kx, which remains unexpalined. Thus we can write our problem in the form of an optimization problem as 
     
         ∥s-Kx∥=min!.                             (4) 
    
     The optimization parameters are then the comonents of the coefficient vector x. 
     The optimal value of the coefficient vector depends on which vector norm we are using. Let us now define this norm from the condition ##EQU4## This is the usual square sum fector norm except for the constant coefficient 1/N. The purpose of this coefficient is to make vector norm as independent as possible of the number of the data N (and thus on the resolution). It has no effeict on the solutio of the optimization problem 4. The solution of problem 4 is now obtained by setting the gradient of the residual vector equal to zero or 
     
         V|s-Ks|=0                                (6) 
    
     a very simple calculation shows that this condition is fulfilled by the coefficient vector 
     
         X.sub.opt =(K.sup.T K).sup.-1 K.sup.T S                    (7) 
    
     (provided, of course, that N≧M.) This is nknown in literature as the pseudoinverse solution of the matrix equation Kx=s (see e.g. [1]). Because of the choice--see Eq. 5--of the norm, this can also be called the least square solution. The matrix K T  K is invertible, if and only if the vectors K 3  are linearly independent. If they are not, the best solution is not unique. If the error limits are not meeded, we suggest the procedure described below for the application of Eq. 7. 
     We now define theinner produce &lt;a|b&gt; of two vectors a dn b from ##EQU5## The coefficient 1/N again ensures that the inner product is as independent as possible of the number of the data. Likewaise the usual relationship ∥v∥=&lt;v|v&gt; 1/2  between norm and inner product holds true. Now we see that equation 7 can be written in the form 
     
         X.sub.opt =A.sup.-1 y                                      (9) 
    
     
         where 
    
     
         A.sub.ij =&lt;K.sup.1 |K.sup.j &gt;                     (10) 
    
     
         and 
    
     
         Y.sub.j =&lt;K.sup.j |s&gt;.                            (11) 
    
     Thus the matrix A contains the inner products of the used lirary specra with each other and may be called the inner product matrix. If we are not interested in the error limits of the coefficients, we can calculate beforehand all possible inner products into a library. Then, in a particular analysis, we need only pick out those inner products corresponding to teh set of library spectra to be used in this analysis to build up the matrix A, calculate the vector y and solve the matrix equation Ax=y. If this is done by using the Gauss elimination method (see e.q. &#39;2, p. 179]), there is no need to invert A, and the analysis is a very rapid procedure. 
     All noise in the spectra generate errors in the optimal coefficient vector of Eq. 9. In this work we shall only deal with the noise in the mixture spectrum s. The noise in the library spectra K j  could approximately be taken into account, too, but we shall omit it here for two reasons. For the first the treatise would be too long and only approximate. For the second, in practical applications it is sensible to register the libray spectra with much higher accuracy (i.e. by co-adding a much larger amount of individual runs) than the mixture spectrum, which is obtained with a rapid measurement. Thus, practically seen, all the noise is in the mixture spectra and the library spectra can be considered as noiseless. 
     Above we have been using the library spectra K j  as the basis vectors, with which all measurements were explained in the form ##EQU6## or Kx. However, when calculating the error limits, it is advantageous to use an orthogonal basis, which generates the same vector space as the original library spectra. We construct these orthogonal basis vectors by the Gram-Schmidt orthogonalization method (see some textbook of linear algebra, e.g. [2, p. 138]). This means that the new basis vectors {K&#39; J  } are defined by the recursive group of equations ##EQU7## Thus the old basis vectors are obtained from the new ones by ##EQU8## Next we define a transformation matrix Q as ##EQU9## (Thus Q is an upper triangular matrix.) Now the transformation of the basis can be expressed very compactly as 
     
         K=K&#39;Q.                                                     (15) 
    
     The transformation of coefficient vectors between these two bases is governed by the equation 
     
         X=Q.sup.-1 X&#39;                                              (16) 
    
     Thus we shall need the inverse of Q. After some tedious calculations we discover that it is an upper triangular matrix given by ##EQU10## The elements with j&gt;i have to be calculated in the order i=M-1, . . . ,1. 
     The determination of the best coefficient vector is very simple in the basis K&#39;. Because this basis is orthogonal, &lt;K&#39; 1  |K&#39; j  &gt;=δ 1j  and the inner product matrix A&#39; (see (Eq. 10)) is diagonal, 
     
         A&#39;=diag(∥K&#39;.sup.1 ∥.sup.2,∥K&#39;.sup.2 ∥.sup.2, . . . , ∥K&#39;.sup.M ∥.sup.2).(18) 
    
     Thus the best coefficient vector x&#39; opt  is given by (see Eq. 9) ##EQU11## 
     Vector X&#39; opt  gives the optimal coefficients of the orthogonal basis vectors K&#39; j . The corresponding coefficient vector x of the real pure spectra K j  is then Q -1  X&#39; opt . As is intuitively very clear, this equals the optimal coefficient vector X opt  in the original basis. This fact can also be proved formally as follows: 
     
         x&#39;.sub.opt = (K&#39;.sup.T K&#39;).sup.-1 K&#39;.sup.T s = [(Q.sup.-1) .sup.T K .sup.T KQ.sup.-1 ].sup.-1 (Q.sup.-1) .sup.T K.sup.T s = Q (K.sup.T K).sup.-1 Q.sup.T (Q.sup.T).sup.-1 K.sup.T s = Q(K.sup.T K).sup.-1 K.sup.T s = Qx.sub.opt. 
    
     This means that 
     
         X.sub.opt =Q.sup.-1 x&#39;.sub.opt.                            (21) 
    
     Next we consider the effect of measurement noise on the optimal coefficient vector of Eq. 9 or 21. For this purpose we divide s into two separate parts as 
     
         S=S.sup.o +S.sup.o                                         ( 22) 
    
     where s o  is the correct noiseless mixture spectrum and s e  includes the noise. Because the dependence between s and x opt  is linear, the coefficient vector x opt  can also be divided into the correct coefficient vector X opt   o  and the error vector x opt   e , which obey 
     
         X.sub.opt.sup.o =(K.sup.T K).sup.-1 K.sup.T s.sup.o =Q.sup.-1 (K&#39;.sup.T K&#39;).sup.-1 K&#39;.sup.T s.sup.o                               ( 23a) 
    
     
         and 
    
     
         s.sub.opt.sup.e =(K.sup.T K).sup.-1 K.sup.T s.sup.e =Q.sup.-1 (K&#39;.sup.T K&#39;).sup.-1 K&#39;.sup.T s.sup.e                               ( 24a) 
    
     or equivalently 
     
         x.sub.opt.sup.0 =A.sup.-1 y.sup.0 =Q.sup.-1 A&#39;.sup.1 y&#39;.sup.0( 23b) 
    
     
         and 
    
     
         x.sub.opt.sup.e =A.sup.-1 y.sup.e =Q.sup.-1 A&#39;.sup.-1 y&#39;.sup.e( 24b) 
    
     Thus the errors of the coefficients depend linearly on the measurements. The components of the noise vector s e   are normally distributed with zero mean. Even if the noise data of an individual measurement were not normally distributed for some reason or other, according to the central limit theorem of the probability calculus the sum of several noise data is always normally distributed, and in practice we alsways co-add several individual runs to obtain one spectrum. Thus, if we designate their standard deviation by σ s , we can write 
     
         s.sub.1.sup.e ÷N(0,σ.sub.s.sup.2).               (25) 
    
     (This expression tells that s 1   e  obeys the normal distribution with a mean 0 and a variance σ s   2 . Note that N stands for the normal distribution, while N is the number of the data.) Because we know the distribution of the nosie data, we can now calculate the distributions of the errors of the coefficients by using Eq. 24. This is what we are going to do next. 
     First we state without proof a well-known result of the probability calculus concerning the normal distribution. 
     Let z 1  ÷N(μ 1 , 1   2 ) be independent and a 1  g R. Then ##EQU12## This means that a linear combination of independent normally distributed random variables is normally distributed, too. By using this result we get for the components of the vector y&#39; e , which appears in the expression for x opt   e  in Eq. 24b: ##EQU13## Now we need another result of the probability calculus, stating that two normally distributed random variables z 1  and z 2  are independent if and only if the correlation between them is zero. The correlation is defined by ##EQU14## where 
     
         cov(z.sub.1,z.sub.2)=E[(z.sub.1 -E(z.sub.1))(z.sub.2 -E(z.sub.2))] 
    
     and E is the expectation operator. Because the expectation values E(y&#39; j   e ) are zeroes, two components y&#39; j   e  and y&#39; k   e  are independent random variables if and only if E(y&#39; j   t  y&#39; k   e ) is zero. ##EQU15## for E(s 1   e  s 1   e )=δ 11  E[(s 1   e ) 2  ] and all the random variables s 1   e  are identically distributed. The independence of y&#39; j   e  and y&#39; k   e  now follows from the fact that the basis K&#39; is orthogonal. It further follows from Eqs. 19, 26 and 27 that ##EQU16## and that the components of s&#39; opt   3  are independent. Thus we may once more use result 26 to obtain ##EQU17## 
     If we use the non-orthogonal basis K, the left-hand equality of Eq. 24 gives ##EQU18## where P is the pseudoinverse matrix ##EQU19## 
     Now that we know the distributions of the errors of the coefficients, we are also able to give error limits for the coefficients. Because these errors are normally distributed random variables, we cannot give any upper limits for them. Instead we can calculate such error limits for the correct coefficients to fall with a given probability within them. Let us now assume that we want such an error limit υ j , that the coefficient x opt ,j belongs with a probability p in the interval [x opt ,j 0  -υ j ,s opt ,j 0  υ j  ]. This means that 
     
         P(x.sub.opt,j.sup.e ε[-υ.sub.j, υ.sub.j ])=p. 
    
     If we denote Φ the distribution (N(0,1)), we get ##EQU20## from which ##EQU21## For example, the 50% error limit for the coefficient of library spectrum number j is given by the expression ##EQU22## The variance of x opt ,j e  is obtained from result 29 or 30 as ##EQU23## 
     It might first appear that the original basis K would be the most sensible choice to be used in the analysis, because the coefficients and their variances are then obtained from the very simple results 9 and 30. However, every time we add a new library spectrum into the analysis, the inner product matrix A is changed, and we have to re-calculate its inverse, which is needed at least in Eq. 31, and in inverting a general matrix we do not have a simple formula like Eq. 17. In addition we have to re-calculate the matrix product A -1  K T  to obtain P. The previous value of x opt  also becomes useless. When using the orthogonal basis K&#39;, the coefficients and their variances are given by Eqs. 20, 21 and 29. Let us now have a closer look at what happens when we have to add a new library spectrum to the set of the library spectra used in the analysis and the basis K&#39; is in use. 
     First of all we must calculate a new orthogonal spectrum K&#39; M+1  from group of equations 12. While we calculate the coefficients appearing in the expression K&#39; M+1  in group of equations 12, we also obtain the elements of the column M+1, which must be added to the transformation matrix Q. (The new row elements Q M+1 ,j, j22 M+1 are zeroes according to Eq. 14.) This new column means that the inverse transformation matrix Q -1  is changed, too. However, we see from Eq. 17 that an arbitrary element of Q -1  depends only on the previously calculated elements of Q -1  in the same column and on the elements of Q in the same and previous columns. Thus the previous elements of Q -1  are not changed and we need only calculate M new elements Q M ,M+1 -1 , . . . , Q 1 ,M+1 -1  which are given by Eq. 17 as ##EQU24## (Because Q -1  is an upper triangular matrix, all the elements on the new row Q M+1   -1  are either zero or one.) 
     If we are still analyzing the same measurement s as before updating Q -1 , the following corrections remain to be made to the previous calculations: 
     1) We have to add a new component x&#39; opt ,M+1 into the vector x&#39; opt . It is obtained from Eq. 20. 
     2) According to Eq. 21, x opt ,M+1 =Q M+1   -1  x&#39; opt  =x&#39; opt ,M+1. To the other components x opt ,j we must add the term Q jM+1   -1  x&#39; opt ,M+1. 
     3) According to Eq. 29 Var(s opt ,M+1 e )=σ x   2  /(N∥K&#39; M+1  ∥ 2 ). To the other variances Var(x opt ,j)=Var(x opt ,j e ) we must add the term ##EQU25## 
     Because the squares of norms ∥K&#39; j  ∥ 2  are needed repeatedly, it is sensible to store them in a vector, after they have been calculated in group of equations 12. The use of double precision real numbers is highly recommendable in computer programs. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The invention is described in the following detailed in the aid of examples, referring to the drawings attached wherein 
     FIG. 1 is a mixture spectrum s, the linear combination Kx opt  of the library spectra that best explains s and the residual spectrum S-Kx opt , which then remains unexplained (appears magnified in the figure); 
     FIG. 2 discloses an illustration of what happens when the used library is deficient; the same mixture spectrum has been analyzed as in FIG. 1, but now the spectrum of 2-butanone has been removed fro mthe used set of library spectra; 
     FIG. 3 discloses a situation if the interferometer is properly aligned, but the radiation source is circular instead of an ideal point source, the signal in every individual wavenumber ν 0  is spread uniformly of the interval from ν 0  (1-α 2  /2) to ν 0  ; 
     FIG. 4 discloses a situation when the observed line shape e 0  is always the convolution of the real line shape e, the boxcar broadening function w.sup.Ω described in FIG. 3 and the Fourier transform w L  of the boxcar interferogram truncation function; 
     FIG. 5 discloses a situation when for every component x j  of the optimal non-negative coefficient vector x opt  either one of the following conditions holds: ##EQU26## 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     In this chapter we shall demonstrate the method by analyzing the spectrum of a simple mixture of gases. The coefficients are calculated by using Eqs. 20 and 21 and their error limits by Eqs. 29 and 32. We shall use 50% error limits here, because they give a very good idea of the orders of magnitude of the errors. In FIG. 1 we see the mixture spectrum s to be analyzed by using a set of 12 library spectra. In the table 1 we see the components of x opt  with error limits. The three first components are the background spectra. These are all the spectra or functions, which are present also in the background measurement or which can arise from an error data in the interferogram. They can have negative coefficients as well as positive. The mixture spectrum s and the library spectra K j  are measured with identical arrangements, but extra artificial noise has been added to s in order to simulate poorer accuracy, which is assumed in this work. In addition we see the linear combination Kx opt  of these library spectra that best explains s. Also shown is the remainder spectrum s-Kx opt , which then remains unexplained. As we may see, the remainder spectrum consists of pure white noise. This indicates that the analysis has been successful and that the 12 library spectra used suffice to explain the measurement. In the table 1 we can see the result of the analysis or the optimal coefficient vector x opt . 
     The optimal coefficient vector 
     
         ______________________________________                 Co-      ErrorBasis function        efficient                          limit (50%)______________________________________ back-      No. 1: Constant function (1)                         0.0001 0.0001       No. 2: Water      -0.0062                                0.0029ground      No. 3: Carbon dioxide                         -0.0002                                0.0037       No. 4: Methanol   -0.0013                                0.0027       No. 5: Ethanol    0.0724 0.0023       No. 6: 2-Butanone 0.2193 0.0017       No. 7: Chloroform -0.0011                                0.0005       No. 8: Acetone    1.2805 0.0028       No. 9: Toluene    0.0014 0.0015       No. 10: Methyl acetate                         0.0006 0.0004       No. 11: Methyl formate                         0.0035 0.0008       No. 12: Methyl propanoate                         0.1351 0.0007______________________________________ 
    
     The partial pressure of the library gas number j is not obtained by multiplying its measuring pressure by its coefficient x opt ,j. These components, which do not exist in the mixture, have small positive or negative coefficients with the same order of magnitude as their error limits. If we add some background spectra to the analysis, the optimal removal of the background of the spectrum is also performed automatically. In fact, the three first spectra (water, carbon dioxide and the constant function, which has the value of one everywhere) in the table are background spectra. Because we are not interested in their exact coefficients, but merely want to get rid of them, they need not even be pure, but can contain each other. The library spectra may contain some carbon dioxide and water, too, with no effect on the values of their coefficients. The only effect is that the coefficients and error limits of the background spectra are not reliable. The coefficients of the background spectra can have negative values as well as positive. It can actually happen, for instance, that there is more carbon dioxide present during the measurement of the background interferogram than there was during the measurement of the sample interferogram. 
     In FIG. 2 we see what happens if the set of library spectra used is not sufficient for explaining the compound spectrum, in the table 2 we can see the results of the analysis or the optimal coefficient vector x opt . 
     The optimal coefficient vector 
     
         ______________________________________Basis function    Coefficient                       Error limit (50%)______________________________________No. 1: Constant function (1)                 -0.0001   0.0001No. 2: Water           0.0249    0.0029No. 3: Carbon dioxide  -0.0197   0.0037No. 4: Methanol        0.0446    0.0027No. 5: Ethanol         0.1184    0.0022No. 6: 2-Butanone      --        --No. 7: Chloroform      -0.0053   0.0005No. 8: Acetone         1.5193    0.0021No. 9: Toluene         0.0112    0.0015No. 10: Methyl acetate  -0.0098   0.0004No. 11: Methyl formate  0.0512    0.0007No. 12: Methyl propanoate                 0.1111    0.0007______________________________________ 
    
     The same mixture spectrum is used as in FIG. 1, but the spectrum of 2-butanon, which is an important constituent of the mixture, is not included in the analysis. Now the minimized residual spectrum is not pure noise and the coefficients of the remaining library spectra have changed, too. As we can detect, now the minimzed residual spectrum s-Kx opt  is no longer white noise but has a distinctive structure and, which is very important, it has some structure on the same wavenumbers as the missing spectrum has spectral lines. Thus it is possible to deduce from the remainder spectrum what kind of spectra we ought to add to the analysis. Because the portion of the missing spectrum has to be explained with the remaining spectra as well as possible, their coefficients are distorted, too, and the error limits are no longer reliable. Thus we must always add new library spectra to the analysis until there is no structure left in the remainder spectrum. If there are different pressure broadenings in s and in the library, it might be helpful to use a couple of library spectra for a single compound. However, a better procedure would be to decrease the resolution so that all lines become sinc-function shaped (see the next chapter). 
     In FIG. 4 function w L  is a sinc-function, and the interval between its two successive zeroes equals the data interval Δυ in the spectral domain, which in turn equals 1/(2NΔx). The FWHH of w L  is approximately the same. The width W of W.sup.Ω is directly propostional to υ 0  (the location of the spectral line) and the area of the radiation source. Its height H isinversely proportional to υ 0  and directly proportional to the surface brightness of the source. In the optimal situation the FWHH&#39;s of the three right-hand side curves are approximately equal. The total area of e 0  is the product of the areas of e, w.sup.Ω, and w L . The area of w L  is always 1 and can be regarded as dimensionless. 
     After we have fixed the wavenumber range we want to deal with, the sampling interval in the interferogram is also fixed according to the Nyqvist sampling theorem. However, it still remains to choose the length of the registered interferogram or the amplitude of the mirror movement, which in turn is determined by the used number of the data N. Note that we denote by N the number of the data of the single-sided interferogram. the corresponding number used by the Fast Fourier Transform algorithm is then 2N. We are not going to examine how the number of the data ought to be selected in order to minimize the error limits. As we can see from Eq. 32, the error limits are directly proportional to the standard deviations of the coefficients, which means the square roots of their variances. From Eq. 29 or 33 we get ##EQU27## 
     Thus the error limits are directly proportional to the standard deviation σ s  of the spectral noise and inversely proportional to the square root of the number of the data N. According to the definitions of inner product and norm defined by Eqs. 8 and 5, the remaining square root expression is not an explicit function of N. However, it depends on the shapes of the library spectra. 
     Let us now examine what happens when we diminish the number of the data N by some factor 1/k. We see immediately the negative effect that the coefficient 1/√N is increased by factor k 1/2 . However, the standard deviation σ s  of the noise of the mixture spectrum has changed, too. This change is governed by the Parseval theorem ##EQU28## where n 1  and n s  are the noise functions in the interferogram and in the spectrum respectively. (These two random processes are a Fourier transform pair.) Becasue the noise n 1  is totally white, its &#34;amplitude&#34; is the same everywhere. Thus when the length of the first integral is truncated to one k:th of its original value, the value of the integral is diminished by the same factor k -1 . So the other integral has to change by same factor. Because we do not change the wavenumber range under investigation, the only possibility is that the &#34;amplitude&#34; of the noise n s , or its standard deviation σ s , is diminished by factor k 1/2 . This effect completely cancels the 1/√N dependence in Eq. 35. 
     As we detected above, when reducing the resolution, the coefficient ##EQU29## on Eq. 35 remains constant. Thus the only possible source of changes in the error limits is the expression ##EQU30## As mentioned before, the definitions of inner product and norm mean that this expression depends solely on the shapes of the library spectra, when M is fixed. The number of the data itself is not important. All linear changes, where all the library spectra are multiplied by some constant coefficient C, change this square root expression by constant C -1 . Now the spectra are in practice always computed from the corresponding interferograms by applying the Fast Fourier Transform (FFT) algorithm. A fundamental property of this algorithm is that the data interval in the spectrum is 1/(2NΔx), where Δx is the sampling interval in the interferogram. So when the number of the data is diminished by factor 1/k, the data interval in the spectral domain is increased by factor k. As far as the data interval (≈resolution/1,21) stays smaller than the FWHH (full width at half height) of the spectral lines, there exists at least one data at every line and the shape of the spectral lines does not vary considerably. This means that there is only very little use from employing a better resolution than the width of the spectral lines. In the interferogramn domain this means that we can safely truncate the interferogram provided that we do not cut off a considerable portion from the signal. 
     Let us now define the interferogram truncation function to be a boxcar function having the value of 1 between X=∓NΔX and 0 elsewhere. Because we are only able to register a finite interval of the interferogram, the real, infinitely long interferogram is always multiplied by this function. In the spectral domain this means that the spectra are convolved with the Fourier transform w L  of the truncation function, or 
     
         Θ.sup.0 =e.sup.∞ *W.sup.L                      (37) 
    
     where 
     
         w.sup.L (ν)=2NΔxsinc(2NΔxπν),         (38) 
    
     e 0  is the mixture spectrum or a library spectrum and e.sup.∞ is the spectrum which would be obtained by transforming the whole interferogram. The FWHH of this sinc-function is approximately 1.21/(2NΔx), and this is the entity we refer to as the resolution here. As far as N remains larger than (2ΔxxFWHH of the spectral lines) -1 , w L  is narrower than the lines of e.sup.∞ and does not have a considerable influence on their shapes. If we still reduce the resolution after this point, the spectral lines suddenly begin to widen and their shapes become determined mainly by w L  instead of their real shapes. This means that the convolution of Eq. 37 then changes the spectra nonlinearly, so that its effect is not a mere multiplication of the square root expression by a constant coefficient. If no apodizaton is applied, the lines begin to resembly sinc-curves. (If apodization is performed, the interferogram noise data are no longer identically distributed and the error analysis is not valid.) Because of the widening, the lines begin to overlap, which makes it harder to discern them from each other. This, in turn, means that the sum expression in Eq. 35 begins to grow. The rate of this growth, however, depends on the amount M of the library spectra used in the analysis and on how near the lines are to each other. For example, if the lines were originally grouped into sets of overlapping lines, the growth rate would not be as fast as it would be were the lines originally situated at approximately equal intervals. Some crude results may be given anyhow. For instance, if we are using a set of at most 50 library spectra, the coefficient of growth of the square root expression normally lies between k 1/3  and k 1/2  depending on how the lines are situated. The square root expression also depends on the number of lines in the spectra. This dependence obeys the approximate law that the value of the square root is approximately inversely proportional to the square root of the average number of lines in one spectrum. Thus it can be considered as a constant coefiicient not depending on N. 
     According to what is said above, the best choice for the resolution would be the FWHH of the spectral lines. So the recorded interferogram should reach from -1/(2×FWHH) to 1/(2×FWHH). This, however, holds true only if we are unable to adjust the settings of the interferometer. If we can freely set all the parameters of the device, there exist two additional advantages of the resolution reduction. We shall now consider them more closely. 
     As is well known, a non-point radiation source causes all spectral lines to widen. Typically the radiation source (opening) is round, and in that case every monochromatic spectral line is spread out into a boxcar line shape, as is shown in FIG. 3. The width of the box is then directly proportional to the area of the radiation source. This means that the spectrum e.sup.∞ in Eq. 37 is in fact the true spectrum e convolved with the boxcat function w.sup.Ω arising from the non-zero area of the light source. Thus Eq. 37 can be re-written as 
     
         e.sup.0 =eIw.sup.Ω *.sup.L                           (39) 
    
     Because the width of w.sup.Ω depends on the wavenumber ν 0  of the spectral line under consideration, an exact treatment would require using different s.sup.Ω for every line. An illustration of Eq. 39 is shown in FIG. 4. Because the FWHH of the convolved line is approximately the sum of the FWHHs of the components of the convolution, the distortions w.sup.Ω and w L  have a considerable effect only, if their widths are larger than that of the natural widths of the spectral lines. Thus we can safely increase the signal by increasing the radius of the radiation source until the (maximal) width of the boxcar distortion equals the FWHH of the undistorted spectral lines. Correspondingly we can decrease the amount of computation by reducing resolution until the FWHH of the sinc-distortion equals that of the spectral lines. (Which means the optimal truncation of the interferogram.) In case of gaseous specimen, however the natural width of the lines may be so small, that this situation can not be achieved. Anyhow, it is still sensible to make the distortions w.sup.Ω and w.sup. L of equal kagnitude. Thus we can take this situation as our stating point. Let us now reduce the number of the data by factor k -1 . As we have stated before, this reduction widens the lines by widening w L  by factor k thus increasing the square root expression of Eq. 35 by a factor of at most k 1/2 , if we use some tens of library spectra. If M is of the order of a couple of hundreds, this factor can be of the order of k. Now, however, we can increase the area of the radiation source by factor k without any considerable further increase in the line widths. Because the area under the spectral liens must then grow by factor k due to the increase of the signal, the only possibility is that the heights of the lines are increased by the same factor k and the change of the spectra is approximately linear. Multiplication of the spectra with constant coefficient k reduces the square root expression by coefficient k -1 . This is more than enough to cancel the growth of the square root expression in the nonlinear interferogram truncation operation. In practice, however, there may arise difficulties in concentrating the enlarged image of the radiation source on the detector. 
     The other additional advantage of the resolution reduction is that we are now able to register k interferograms int he same amount of time we previously registered only one single. Because Fourier transforming is a linear operation, co-adding these interferograms means that the corresponding spectra are co-added, too. The errorless spectra e remain the same in every measurement, which means that they become multiplied by k in the summation. This means a simple linear change of the spectra, which in turn means that the square root expression becomes multiplied by k -1 . The noise of s, on the other hand is different every time, and it does not sum up linearly. From results 25 and 26 we see that teh summed up noise has the distribution (N(0,kσ g   2 ). Thus the standard deviation σ g  of the noise is increased by factor k 1/2 . The total effect is that the error limits become multiplied by factor k 1/2 . 
     When we finally gather together all the different effects mentioned above, it becomes apparent that if we can freely change all the parameters of the interferometer, as small a resolution should be used as possible. The number of the data N should, however, be at least two or three times as large a the (maximal) number of the library spectra for the structure of the residual spectrum s-Kx to be examinable. 
     If the library spectra are measured by using a different resolution than in measuring the mixture spectrum, the analysis can fail and large negative coefficients may appear. A similar situation can arise if the line shapes in the library spectra and in the mixture spectrum differ due to nonlinearities or different pressure boradenings. Then some improvement can be achieved by calculating the best non-negative solution instead of the best solution. By non-negative solution we mean such coefficient vector x, which is the solution of the problem 4 subject to the condition that every component of x has to be non-negative. This procedure brings more information into the analysis, because we apply an a priori knowledge of the coefficients. We are now going to derive an algorithm for finding the solution of problem 4 under the non-negativity constraint. 
     Let us denote d the residual norm 
     
         d(x)=s-Kx 
    
     Because a norm is always a non-negative quantity, the norm ∥d∥ has exactly the same minima as its square ∥d∥ 2  so that instead of the norm we can minimize its square. Now ∥d(x)∥ 2  is a convex function of x. This means that for every x 1 , X 2  and λ, 0&lt;∥&lt;1, 
     
         ∥d)λx.sub.1 +(1-λ)x.sub.2)∥.sup.2≦λ- d(x.sub.1)∥.sup.2 +(1-λ)∥d(x.sub.2)∥.sup.2. 
    
     This can be seen by using the triangle inequality and the fact that the geometrical mean is always less or equal to the arithmetic mean. The convexity implies that the square norm has only one minimum point, which makes the minimization much simpler. 
     Especially when other coefficients are held fixed and only one coefficient x j  is varied, ∥d∥ 2  is a convex function of one variable. Thus at the optimum point x opt  there exist two possibilities. Either ##EQU31## (where all the components except the j:th are fixed to x opt ) or, if the zero of the derivatives does not lie in the allowed area x j  ≧0, 
     
         x.sub.opt,j =0, 
    
     which means that x opt ,j is on the border between the allowed and the forbidden areas. This can be proved as follows: 
     1) If the zero of ∂∥d(x opt )∥ 2  /∂x j  lies in the allowed area x≧0, x opt ,j clearly has to equal this zero. 
     2) If the zero of ∂∥d(x opt )∥ 2  /∂x j  lies in the forbidden area x j  &lt;0, the derivative is positive, when s j  ≦0, because of the convexity of ∥d(x)∥ 2 . Thus, if x opt ,j &gt;0, diminishing of x opt ,j would diminish the value of ∥d∥ 2  without exiting the allowed area. Thus the only possibility is that x opt ,j =0. 
     We are not able to state the following condition for optimality: 
     At the unique solution point x opt  of the minimization problem 4 with non-negative components of x either of the following conditions holds for each component x i  : ##EQU32## 
     This is illustrated in FIG. 5. The so-called Kuhn-Tucker criteria (see some textbook of optimization, e.g., [3]), which in case of a convex object function are a necessary and a sufficient condition for optimality, would give quite the same condition. 
     The partial derivatives are very simple to calculate, and we obtain 
     
         ∇.sub.x (∥d(x)∥.sup.2)=2(Ax-y), (41) 
    
     where A is the inner product matrix defined in Eq. 10  and y is given by Eq. 11. The individual partial derivatives are the components of this gradient, or ##EQU33## 
     If we include some background spectra in the used set of library spectra, it is sensible not of impose the non-negativity constraint on their coeffieicnts. The background spectra consist of all the compounds, which are present also when measuring the background (such as water and carbon dioxide), plus a constant function and simple cosine curves, which can be generated by some erroneous data in the interferogram. When this is taken into account, too, the minimum point can be found e.g. by the following algorithm: 
     1) Choose some starting point x=x 0 , for instance x 0  =(0, 0, . . ., 0) T  or x 0  =A -1  y. Insert j=1. 
     2) Calculate ##EQU34## which according to Eq. 42 is the zero point of ∂∥d(x∥ 2  /∂x j . If x j  &lt;0 and the coefficient  j  has the non-negativity constraint, re-insert x j  =0. Insert j=j+1. 
     3) If j≦M (where M is the amount of library spectra used in the analysis), return to step 2). Otherwise continue form step 4). 
     4) Calculate 
     
         G=1/2∇.sub.x (∥d(x)∥.sup.2)=Ax-y. 
    
     If for every component G j  of G either |G j  |&lt;ε 1  or (G j  &gt;0 and x j  &lt;ε 2 ), where ε 1  and ε 2  are suitable small real numbers, stop. Otherwise, insert j=1 and return to step 2).