Computer Program for obtaining theoretical X-ray Satellite Spectrum

Received: 14/May/2018, Revised: 29/May/2018, Accepted: 09/Jun/2018, Online: 30/Jun/2018 Abstract A computer program has been developed in TURBO C ++ to obtain theoretical X-ray satellite spectrum. Using the available theories for the origin of the X-ray satellite spectral lines, we calculate the energies and intensities of the different possible electronic transitions which give rise to the satellites. The energies and intensities of the transitions are fed in the developed computer program. The energy is taken as X and the intensity as Y. The position of each line is taken to be the energy of transition on X-axis and the height of each line is taken to be equal to the relative intensity on Y-axis. Each spectral line corresponding to a transition is taken as a Gaussian line. The data for each Gaussian line is computed by the program. The data for composite spectrum of all the electronic transitions, i.e., for the envelope of all the Gaussian curves is computed by the program. The data obtained as the output of the program is plotted as a graph, using software Origin. The graph obtained is the theoretical X-ray satellite spectrum. This theoretical spectrum is compared with the available experimental results and the origin of the satellites is explained. In the present paper, we are reporting the algorithm, the developed computer program and the outputs obtained using the program. The program is versatile and can be used to obtain any theoretical spectrum when the energies and intensities of the transitions giving rise to the spectrum are known.


I INTRODUCTION
In an X-ray tube, X-rays are generated by electron impact on a target and the radiation consists of both the continuous Xrays and characteristic X-rays. The spectrum of the radiation consists of characteristic spectrum of the target superimposed over the continuous spectrum. The spectral lines of the characteristic spectra resulting from transitions between atomic states, involving single vacancy are called diagram lines, because energy of such lines can be expressed as the difference of two terms in the single vacancy energy level diagram. The diagram lines are generally found to be accompanied by groups of lines of slightly different energies and usually smaller intensities. The energies of these lines do not correspond to the energy difference between any two states of the normal single vacancy energy level diagram of the element concerned. These lines are known as X-ray satellite lines or non-diagram lines. [1][2][3][4] Since the discovery of the X-ray satellites, the problem of finding the origin of these satellites has attracted attention of many workers and various theories have been put forward from time to time. It is well established that while the parent diagram line is emitted by a transition in the singly ionized atom, the X-ray satellite line is emitted due to transition in the multiply ionized atom. The X-ray satellite energy is the difference between the energies of initial and final states which are both doubly or multiply ionized. Thus, the satellite has a different energy than the energy of the Xray diagram line. [1][2][3][4] We have undertaken research to find the origin of some particular unexplained X-ray satellites, i.e., to assign transitions in doubly ionized atom which give rise to such Xray satellites. [1][2][3][4] In our research, we have to calculate the theoretical X-ray satellite spectrum and then to compare it with the experimental spectrum. To obtain theoretical spectrum we calculate the energies of the different electronic transitions which are allowed between the initial and final double vacancy states and also the relative intensities of such transitions. After calculating the energies and intensities of all the possible electronic transitions, a composite spectrum is computed by taking energy on X-axis and intensity on Yaxis. The height of each line is taken to be equal to the relative intensity and the position of each line is taken to be the energy of transition. Each spectral line corresponding to a transition is taken as a Gaussian line. The width of all the spectral lines in the elements under consideration can be assumed to be equal and its value is decided by trial and error method. Depending upon the separation of the energies of the electronic transitions and the width of the Gaussian curve of each transition, the different Gaussian curves may overlap each other or may remain separate. The composite spectrum of all the electronic transitions, i.e., of all the Gaussian curves is obtained by computing an envelope of all the Gaussian curves. The envelope gives us the required theoretical spectrum. The computation has to be done in such a manner that the number of peaks obtained in the calculated spectrum is at least equal to or greater than the number of satellites observed experimentally in the spectrum of the element. This theoretical spectrum is compared with the available experimental results. The intense peaks are identified as the observed satellite lines. The transition assignments to the satellites based on the identification of the peaks, which arise due to the particular transitions, is then done. In this way, the origin of the satellites can be known.
The theoretical spectrum has been calculated with the help of a computer program. In the present paper, we are reporting the algorithm, the program and the outputs obtained using this program taking an example.

II THEORETICAL CONSIDERATIONS
There are two steps through which the theoretical X-ray satellite spectrum can be obtained.
(1) For each of the transition in the multiply ionized atom a spectral line has to be drawn. This spectral line should have Gaussian curve shape. The intensity of this Gaussian curve should be the same as that of the transition. The center of the Gaussian curve should be at the energy of the transition. Such curves should be drawn for all the transitions considered for the whole satellite spectrum in a particular region of the Xray emission spectra.
(2) After obtaining all the individual spectrum for all the possible transition, an envelope has to be obtained of all the spectrum curves. This would be the required theoretical spectrum The equation for Gaussian curve [5] is: where mean, =standered deviation, X and Y are the coordinates. In the present case X is the energy, Y is the relative intensity, is the energy of the particular transition about which a Gaussian curve will be centered.  determines the width of Gaussian curve, i.e., width of spectrum line. Actually, for a particular value of , the width of spectrum line at half of the maximum intensity is theoretically equal to 2.355.
In the present case, the maximum intensity of the Gaussian curve must be the intensity of the transition. We name this intensity as I max and modify eqn. (1) as follows: In this equation, is the energy the particular transition and I max is its intensity. is chosen such that the width of each spectral line is such that the number of peaks obtained from the calculated spectrum is at least equal to or greater than the number of satellites observed experimentally in the spectrum of the element.

III DATA HANDLING FOR PROGRAM DEVELOPMENT
(1) Input data file has two columns. First column is of the energy (, i.e., mu) of a particular transition and second column is of the relative intensity (I max , i.e., Imax). (2) There are a number of rows depending on the number of transitions considered for a particular satellite. We call them (No-of-Tran) (3) In file Name variable is declared to handle input data file. (4) The range of spectrum has to be decided by the user. On X axis, energy in eV has to be plotted. We call this value as E. Hence, (E min , i.e., Emin) and (E max , i.e., Emax) are the values of X which decide the range. (5) E has to be increased in step of (delta -E), which has to be decided by the user. Number of calculations of Y will be equal to (E max -E min )/delta -E for each transition. (6) Such calculation will be done for the number of transitions, i.e., Noof -Tran (7) For any spectrum, the value of  (i.e., sigma) has to be decided by the user. The value of sigma decides the broadness of the Gaussian curve of each transition.
(8) The output is obtained in the file which is given by the user and handled in output file Name variable in the program.

IV ALGORITHM
Step1: Declare and initialize various variables Step2: Provide input ; Enter value of E min , E max , delta -E, sigma and in file Name, out file Name Step3: Open files for reading /writing data Step4: Initialize Y(relative intensity values as zeroes). Here Y is an array variable. Step5: Calculate (by repetition) various Y values using equation (2).(See the implementation of equation (2) in program) Step 6: Print array Y as output in out file Name.

V PROCEDURE FOR COMPUTING THEORETICAL X-RAY SATELLITE SPECTRAL DATA
The performance of the computer program can be checked by taking an example. In the present paper, we are taking the example of an X-ray emission satellite spectrum in the Lα region of the spectrum of element terbium ( 65 Tb). [6] In table 1 are given the value of energies of 30 electronic transitions which are considered to be responsible for the considered Xray emission satellite. In this table, there are 30 rows corresponding to the 30 transitions. For each transition, the value of energy  (in eV) and relative intensity I max are given. This table is entered in a note-pad and the file is called Tb.txt. By pressing "ctrl F9" the program is run.
The program asks for input as follows: Enter Emin, Emax, delta -E, Sigma, Noof -Tran For the present example, we have entered the values as : 6240 6310 0.1 1 30 After we have entered the value of Noof -Tran as 30 we get the command Enter Input Filename We write -Tb.txt Then we get the command Enter Output-File Name We write -Tbout1 (This file is named as "Tbout1". Instead of 1, it can be any other number according to our convenience) Then we get the command Tb.txt Tbout1 file exist Illustration-This means that the range of the computed spectrum will be from 6240 to 6310 eV. The values of Y will be computed by increasing the value of energy 6240 by 0.1 eV and so on in each computation. The total number of data points for Y will be (6310-6240)/0.1 = 700. As the value of  has been taken as 1, the width of Gaussian curve for each transition at half maximum will be 2.355eV. Computation will be complete for all the 30 transitions after 30 iterations. For each value of Y, the 30 values for the 30 transitions will be added. The output will have only two columns. First column will have 700 data points corresponding to energy, starting from 6240eV, ending with 6310eV, each data point increasing by 0.1 eV. The second column will again have 700 data points, giving the value of Y for each of the energy data points.
By pressing enter key we come back to program We go to "File" and then to "Quit" We open the file in Note-pad. There are 700 data points in this file. Out of the 700 data points of the output files , a portion of the output data is given in table 2.
Table1. The energies of 30 electronic transitions, possible in the doubly ionized atom, and their relative intensities. [  In table 2, there are 100 data points and has two columns. First column gives the value of X, (i.e energy) with increment of delta -E = 0.1 and sigma = 1.0. The second column gives the value of Y(i.e., relative density).
We select the whole data and copy it in software Origin where we plot graph between X (i.e., energy) and Y (i.e., relative intensity).

VI RESULTS AND DISCUSSION
As already discussed in the introduction, the aim of developing this computer program is to obtain theoretical Xray satellite spectrum. The spectrum is the result of large number electronic transitions in a multiply ionized atom. Before we discuss the results obtained for a number of transitions using the developed program, it will be appropriate to first discuss the type of the Gaussian curve obtained for a single transition using the developed program. For plotting such a curve, we choose one of the 30 electronic transitions, namely, L 3 M 3 3 D 3  M 3 M 5 3 F 4 , having maximum relative intensity I max =100 and energy position =6300.71eV.
[6] The program has been run from E min =6290eV to E max =6310eV, choosing ΔE=0.1eV. We get 200 data points in the output file using the program. We plot graph between X (i.e., Energy) and Y (i.e., Relative Intensity) in software Origin. Four curves have been drawn for =0.5, 1.0, 1.5, 2.0 respectively. Fig.1 gives the four Gaussian curves. These curves illustrate the effect of variation of . The curve for =0.5 is narrowest and that of =0.1 is broadest. The width of the curve at half maximum has been found to be 2.355x2=4.7 eV for =2.0, same as that required by the theory. Thus, by choosing proper value of , the width of the spectral line can be changed. The value of  actually depends on the width of energy levels. Now let us discuss the results obtained for a spectra consisting of a number of X-ray satellites. The element for which spectra have been drawn is terbium ( 65 Tb). The region of the spectra is from 6240eV to 6310eV. There are 30 electronic transitions possible in the doubly ionized atom. The data for these transitions, i.e., the energies of these transitions and their relative intensities, given in table 1, is written on the note-pad and the file is given the name Tb.txt. The computer program was run using this data as mentioned above. The output was obtained in the file named Tbout1. This output file has two columns, one for energy and another for relative intensity. The output file is fed in the software Origin for plotting the graph.
When we plot graph between X (i.e., energy) and Y (i.e., relative intensity) in software Origin, we get the graph for the X-ray satellite spectra which are reproduced in fig. 2. This graph, i.e., the L-emission satellite spectra is the envelope of 30 Gaussian curves for the 30 electronic transitions given in table 1. Fig. 2 has three graphs (a), (b) and (c). In these three graphs, ΔE has been kept as 0.1eV and  has been varied, i.e., 1, 0.1 and 0. 5. The output file has 700 data points in these three graphs. When =1, then we get 9 satellite lines, when =0.5, then we get 15 satellite lines and when =0.1, then we get 18 satellite lines. Similarly, we have drawn another set of graph given in fig.3. This figure again has three graphs (a), (b) and (c). In these three graphs, ΔE has been kept as 0.03eV and  has been varied, i.e., 1, 0.1 and 0.5. The output file has 2333 data points in these three graphs. In fig.3 also, when =1, then we get 9 satellite lines, when =0.5, then we get 15 satellite lines and when =0.1, then we get 18 satellite lines. Thus, we get the same number of satellite lines if ΔE is changed from 0.1eV to 0.03eV, i.e., when the data points are change from 700 to 2333. These graphs demonstrate that in the computer program developed in this work, we can vary the number of electronic transitions, the energy range of satellite spectra, the number of data points in this energy range and the width of each Gaussian line. All these variations are possible and demonstrate the versatility in the developed program. This helps in obtaining the desired number of theoretical satellites which may be equated to the number of satellites obtained experimentally.

VII CONCLUSION
The aim of developing this computer program is to obtain theoretical X-ray satellite spectrum. The computer program has been developed in TURBO C ++ . In the present paper, we are reporting the algorithm, the developed computer program and the outputs obtained using the program. The X-ray satellite spectrum is the result of large number electronic transitions in a multiply ionized atom. Using the available theoretical methods, we calculate the energies and intensities of the different possible electronic transitions which give rise to the satellites. The energies and intensities of the transitions are fed in the developed computer program. The position of each line is taken to be the energy of transition as X and the height of each line is taken to be equal to the relative intensity as Y. Each spectral line, i.e., a graph between X and Y, corresponding to a transition is taken as a Gaussian line. The data for each Gaussian line is computed by the program. The data for composite spectrum of all the electronic transitions, i.e., for the envelope of all the Gaussian curves is computed by the program. The data obtained as the output of the program is plotted as a graph, using software Origin. The graph obtained is the theoretical X-ray satellite spectrum. This theoretical spectrum is compared with the available experimental results and the origin of the satellites is explained.
The performance of the computer program has been checked by taking an example. In the present paper, we are taking the example of an X-ray emission satellite spectrum in the Lα region of the element terbium ( 65 Tb). The Gaussian curve obtained for a single transition using the developed program illustrate the effect of variation of . Thus, by choosing proper value of , the width of the spectral line can be changed.
The theoretical spectra obtained for the considered example demonstrate the capabilities of the developed computer program. We can vary the number of electronic transitions, the energy range of satellite spectra, the number of data points in this energy range and the width of each Gaussian line. All these variations are possible and demonstrate the versatility of the developed program.
Though this program has been developed to obtain theoretical X-ray satellite spectrum involving a number of electronic transitions for which energies and intensities have been calculated using some theory, yet this program is very versatile and can be used to obtain any theoretical spectrum when the energies and intensities of the transitions giving rise to the spectrum are known. Also modifications can be incorporated in the program according to need.     printf("/nEnter Input FileName\n"); scanf("%s", InfileName); printf("Enter output -fileName\n); scanf("%s", outfileName); getch (); fp=fopen(InfileName, "r"); fp2=fopen(outfile, "w"); if ( .