{'fraction_non_alphanumeric': 0.021841763942931258, 'fraction_numerical': 0.018521400778210118, 'mean_word_length': 4.618187117458467, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
The expert systems for analysis of electron energy-loss spectra

In this paper is presented development of the expert systems for threshold spectra analysis, starting from firstly developed expert system for atom threshold spectra analysis, up to the expert system for analysis more complex molecule threshold spectra (firstly two-atomic and then tree-atomic molecules). The goal of the expert systems application is to automate, speed up and improve process of spectra analysis. Interest for threshold spectra originates from the fact that, by studding them, it is possible obtained information about processes which happened on energies near reaction threshold. Also, in these spectra can be seen peaks that correspond to forbidden transitions and which can't be seen in the optical spectroscopy. For testing of the expert systems, we used the threshold spectra for the He atom, and N2 and SO2 molecules. All these spectra are obtained on threshold spectrometer in Institute of Physics in Zemun (Laboratory for Atomic Collision Processes).


Introduction
In process of studying atomic and molecular collision processes, the threshold spectroscopy method takes important place [1]. With this method is performed a detection of electrons with "zero" energy, i.e. electrons which have lost their incident energy in the non-elastic collisions. Because of that, by using a specific configuration of electric field, it is possible to separate aforementioned electrons from the others. With this is accomplished that a process is examined on reaction threshold, hence the name of this method. The importance of this method originates from the fact that it enables a detection of excited as well as vibrational states, along with a recognizing of resonant states.
Expert systems presented in this paper are developed based on the backward chaining methodology and with a goal to analyze spectra obtained by threshold spectroscopy. For their development is used ESBT I2+ which in process of conclusion uses the aforementioned methodology that starts with goal and goes toward data. One of advantages of this methodology is that there is no conflict resolution, which can be complicated factor in process of practical exploitation of one expert system.
In the case of threshold spectra analysis, which can be generalized on all kind of spectra in electron spectroscopy, an application of ES enables the following: an estimation of usability of experimentally obtained spectra for future analysis, selective extraction of physical events from events that originate from noise, identification of an energy states of atoms and molecules whose spectra are recorded, and analysis of identified states, with an aim to separate the vibrational levels and resonances.

Experiment
Characteristic threshold spectra, which are used in process of ES development and testing, are obtained with threshold spectrometer in Institute of Physics in Zemun (Laboratory for Atomic  The essence of this method is a controlled penetration by outer electric field inside the area where the collision is performed between electron and gas beams. This electric field creates, in the center of interaction area, a potential which enables the extradition of electrons with zero energies.
Yield of detected electrons is shown in form of peaks that correspond to excitation of discrete states of atoms and molecules.
Recorded spectra contain the information about channel, i.e. energy, corresponding count, and also information about channel energy value that depends on, chosen in advance, a voltage scanning range on the monochromator plates. In that way, it is possible to assign exact energy value to each channel, so that the spectrum can be characterized as energetic (Fig. 4).

Expert system for analysis atom threshold spectra
First step in the process of spectrum analysis is inputting spectra from multi-channel analyzer, and their translation in the tables of appropriate format.
On Figure 2 is shown a characteristic threshold spectrum of He atom [3]. The threshold He spectrum Beside tables with recorded spectra, it was necessary to form the databases of energy levels of electron, as well as vibrational and resonance states, and also a tables which contain data modified by using Pascal programs.
Identification of peaks of states is first phase in working of ES, which encapsulates the following steps in process of spectra analysis: inputting data, finding and extracting peaks, ordering peaks in non-ascending array, energy scale calibration, resolution estimation, peaks classification and identification, and writing of data obtained by this analysis in the database.
Input of necessary, starting data is performed by interactive communication between ES and user. Those data are primarily used to direct ES on atom i.e. molecule whose spectra will be analyzed. Also, the ES obtains information about energy range on which the spectrum was recorded, and also the names of tables which are necessary for its operation. After the data input, the program will start with spectrum analysis. First step is extraction of all channels with peaks. However, experimentator's experience says that the big part of extracted peaks originates from noise, so the goal is removing this noise influence in the biggest possible measure. Because of that, the ES sorts all peaks in descending array. Reason for this lies in assumption that the most intensive peak originates from a discrete energy level, and not from noise. Based on average value of exactly determined number of peaks, for example ten biggest and ten smallest in spectrum that is analyzed, ES calculates a ratio between signal and noise. The criterion for peak to be analyzed is that the reciprocal value of relation -examined peak/biggest peak -is greater then the ratio between signal and noise. Peaks that satisfy this criterion then form a new table with peaks which will be analyzed. In this way the number of peaks that are interesting for analysis is reduced, and because of that, also necessary time for analysis.
Calibration of energy scale is next and very important step in the process of spectrum analysis, because the good calibration is necessary precondition for well-done energy positioning of peaks, and in the further work is a precondition for correct identification. Depending of experimental condition, the calibration can be done on two ways.
First way is based on inputting in system, at the same time, atom whose spectra is to be analyzed, and some characteristic gas. It is important that the gas has clearly separated and well known state from optical spectroscopy which enables an exact determination of his energy position.
Second way of calibration is based on some clearly defined structure (peak) that exists in the analyzed spectrum. Such structure (peak) is marked as "characteristic peak".
After the calibration of the energy sale, next step is an estimation of equipment resolution. Resolution (or the equipment power of decomposition) determines the least energy distance on which two near peaks can be seen separately, i.e. on which two peaks can be separated. If the energy value between two peaks is less then value of resolution, then those two peaks will be presented as one wider peak which will correspond to group of states.
"Characteristic peak" is also used for determination of parameters of referent peak which will have very important role in the further process of analysis.
The ending part of analysis in this phase is classification and identification of peaks based on the experimental data and table of energy level for atom or molecule which is used in experiment. Based on the performed calibration and calculated energy value of a channel, the ES calculates a corresponding energy value for each peak separately. This value is compared with possible energy values for states of given atom (or molecule). If ES determines presence of such a state in the resolution range, the peak obtains its classification number [3], [4], [5]. In order for peak to be classified as a state it is necessary that the energy deviation of examined peak compared with energy of corresponding state lies within range of maximal measurement error, which is determined by experimentator based on his work experience with experimental equipment [6]. The user inputs this value on the starting point of an analyzing process.
In the atom threshold spectra it is possible recognize a resonant influence on certain states. In groups, determined by value of their principal quantum number, the peaks form decreasing series. Resonant increment, which is consequence of emptying of resonance, results in deviation from this dependence (see Fig. 1).

Expert system for analysis two -atomic molecule threshold spectra
Although atom and molecule spectra are by their form discrete, the important difference between them originates from presence of vibrational levels in molecule spectra. Analysis is additionally complicated because of peak overlapping on the almost all energy ranges, which leads to forming of "compound structures" and also "shoulders" on the peaks of more intense states.
In the two-atomic molecule spectra, this is especially expressed (characteristic) on higher energies, while in the tri-atomic and poly-atomic molecule spectra this situation is present on whole energy range. ES which is developed with a goal to perform an analysis of those spectra should also enable an identification of molecule vibrational energy levels. Problem arises in the area of higher energy values, where peaks from vibrational levels (that originate from different states) are overlapping and make aforementioned "compound structures" (Figure 3).
Odbroj Figure 3: Characteristic N 2 molecule threshold spectrum Also, in this phase of development of ES, it was necessary to examine is it possible to reproduce a form of real spectrum, based on knowledge of certain parameters.
For testing is chosen a molecule of N 2 , because of the practical reasons. Namely, the spectrum of this molecule is the best covered by data. This fact enables us to verify does logic that was used for ES development give satisfactory results. On the Fig. 5 is given a block-diagram of ES which performs an analysis of N 2 threshold spectra.
Upgrading of existing ES was meant to solve the problems of presence of superimposed peaks on the peak that correspond to the energy state or vibrational level. They also cause a disturbance of symmetrical form of peak by creating of "shoulders" that appear on higher energy side of peak. In order for aforementioned two problems to be solved, two assumptions were made: first, that the peaks of states and vibrational levels have normal distribution, i.e. they are in Gaussian form, and second, that vibrational levels of certain state are on almost identical energy distance. As the energy value of channel is known, E ∆ , based on the knowledge of characteristic energy value, Ev, it is possible, for each state, to determine a characteristic number n of channels between vibrational levels like a ratio between those two values: For starters, the ES loads a channel on which, in given part of spectrum, is identified a state with lowest energy value. After that, using parameters determined by characteristic peak, ES generates Gaussian for each state (or vibrational level) separately.
The values of counts for corresponding state calculated in this way are put in table with spectrum, inside the field COUNT_G [3]. In the field named DEVIATION, the ES writes the values which are defined by deviation between calculated and recorded values. For further analysis are interesting only the channels whose corresponding count in colon DEVIATION satisfy condition to be classified as peak. ES using, for this purpose made Pascal programs, marks all aforementioned channels and in the field ORIGIN puts the mark P. In this way, ES is concentrated only on those channels. The goal is to find a cause for peak existence on aforementioned channels. Corresponding energy is calculated by following formula: (2) where E0 is energy of state or vibrational level that has been analyzed, dE is energy value on channel and n is difference between channel on which is a peak interesting for analysis, and channel on which is a state or vibrational level.
When the energy value has been calculated, ES can start with determination of examined peak nature. In this phase of work are necessary the tables of energy levels. By comparing the calculated energy value with energy values within the tables of vibrational levels and resonances, ES determines the origin of peaks, and in the case of positive identification, marks the peaks with an identification number 2 or 3. This number is written in field named ORIGIN. If in no table exists the appropriate energy value, ES concludes that the peak originates from noise, and gives it a classification number 4. Identical procedure is repeated for all peaks which are situated on channels within the range of state peak width, i.e. vibrational level.
After the peaks analysis is completed, ES calculates channel on which the vibrational level should appear, by following formula where x0 is a channel with state, k is integer multiplier that represents the number of vibrational level that belongs to one state, n is characteristically number of channels between two vibrational levels of given state. Quantity x that is calculated determines the serial number of channel on which ES positions itself in order to continue further analysis.
When the value of channel on which is expected appearance of vibrational level is calculated, first step is to check does a peak exist on a channel with serial number that corresponds to the value of variable x. If the result of checking is positive, ES positions itself on that channel, and generates peak in Gaussian form, and the procedure is repeated in the same way as in the case of a previously described state. When ES finishes with analysis of vibrational levels of one state, it starts with next. Aforementioned procedure is repeated until the analysis does not encapsulate all state and vibrational level peaks in the recorded energy range.

Expert system for analysis tri -atomic molecule threshold spectra
The threshold spectra of tri-atomic molecules are more complex than spectra of two-atomic molecules. "Compound structures" are characteristic for all energy ranges so that there are no separated and clearly defined structures. On Fig. 5 is given characteristic part of SO 2 molecule spectrum [5]. Next phase in developing process of this ES should give an answer on question is the same logic can be applied while analyzing the parts of spectra of polyatomic molecules with, for them, characteristic structures.
In order to obtain an answer to this question it was necessary to upgrade already existing ES with goal to show if ES can generate, based on minimal quantity of data, a spectrum which corresponds to experimentally obtained spectrum.
On the start of this phase, the user must input, in the database, an approximate number of vibrational levels. This data ES will use in process of spectrum generating if the exact number of vibrational levels isn't known for given state. On the beginning ES positions itself on the channel with lowest energy value in the given energy range. This channel is noted as "central". Generating of peaks is performed by I2+ and Pascal programs. When generating of peak of state is finished, ES begins with generating of peaks of vibrational levels on the same principle, moving itself on the channels where vibrational levels are situated (see formula 3).
However, what can be done in the case when the distance between channels isn't exactly known, and how ES can determine a value for moving. There are two ways for solving of this problem: first is moving for number of channel which corresponds to average value of known energy distances between vibrational levels, and second is initial movement for number of channels which correspond to energy difference between state and first vibrational level. More practical is the second way because then is possible, on the beginning, to obtain at least one vibrational level that corresponds to real position. When generating of vibrational levels is finished, the spectrum looks like one on Fig. 6-a.  Next step is correction of peaks height [4]. After this part of ES work, the spectrum looks like one Fig. 6-b. The spectrum obtained in this way resembles a real spectrum and that was the goal anyway. However, now it is necessary to check a position of peaks in order to see which are on their right place and if needed to make a movement. In this part of ES work, the peaks obtained the following marks: 2 -peaks which are on right place from the start, and 21, 22 and 23 -peaks which will be positioned on right place after first, second or third pass.  :  580  5480  4829  1651  0  581  5535  5535  1000  0  2  22  582  5454  4829  1625  0  583  5758  5115  1643  0  584  5859  5859  1000  0  2  2  585  5850  5115  735  0  586  5673  3754  1919  1  5  587  5596  4941  345  0  588  5660  5660  1000  0  2  21  589  5607  4941  666  0  590  5394  3627  1767  0  591  5415  3623  1792  1  5  592  5475  4936  593  0  593  5654  5654  1000  0  2  2  594  5542  4936  606  0  595  5546  3623  1923  1  5  596  5543  4851  692  0  597  5556  5556  1000  0  2  21  :  :  :  :  :  :  :  733  5992  3938  0  6  :  :  :  :  : : : On the end of this phase, the obtained spectrum looks like the one on Fig. 6-c. Also, by inputting of new peaks between existing ones, it need to be shown that is possible to obtain a spectrum which in greatest measure reproduces a look of real spectrum in the areas where there are more complicated structures as is case with tri-atomic molecule spectra, that are a specially interesting for analysis. Goal is to show that complex structures in those spectra can be interpreted like a sum of larger number of peaks which originate from vibrational levels of certain state.
Idea was to put one peak between every two peaks. Channel on which this peak will be positioned is calculated like arithmetic mean of channels between which the aforementioned peak was put.
Count of new peak is calculated by same principle. Additional peaks -peaks first generation -have mark "1" on Fig. 7-a. By comparing the spectrum obtained in this phase with the part of tri-atomic molecule spectrum of SO 2 (see Fig. 4), it can be seen that there exists more space for inputting of new peaks. Because of that, ES repeats aforementioned method twice and puts the peaks of second and third generation between existing peaks.
ES developed in this way enables detailed and very exact analysis of electron spectra of tri-atomic and poly-atomic molecules. Testing of aforementioned ES is performed on SO 2 molecule threshold spectra.

Conclusion
Application of ES in analysis process of threshold spectra gave expected results. Quantitative and qualitative improvement of analysis process has shown a complete justification of possible future work on the development of ES which would find their usability in processes of analysis of spectra that are obtained in characteristic processes in other areas of physics.