DEVELOPMENT OF CODE PACKAGE FOR PARSING THE ATOMIC STRUCTURE AND FOR CALCULATING AND REPRESENTING THE INTENSITY SPECTRA

Gintaras Kerevičius1

1 Department of the Theory of Atom, Institute of Theoretical Physics and Astronomy, Vilnius University, A. Goštauto st. 12, LT-01108, Vilnius, Lithuania

This thesis marks a little more than a year of development of programs for parsing and classifying the input data of atomic structure, for calculating and in different ways representing the intensity spectra of that structure. The Python [1] programming language (PL) and Spyder [2] integrated development environment (IDE) were used to achieve this task. Most of the code is based on standard and built-in Python packages and modules. The default functions and methods on data-types were used extensively throughout the code. However, more specific packages written with PLs following the static typing discipline were used also, as the subroutines written in this manner perform a lot faster during a program runtime. Special variables, special and standard mathematical functions and interpolation subroutine were used from the NumPy [3] package. Quadrature subroutine from the SciPy [4] package was used for numerical integration. The Matplotlib package (year 2013, version 1.3.1), which is described in the original paper [5], was used for a graphical representation of intermediate and final results.

The parsing package and its modules were developed and tested using the atomic structure data calculated by the Flexible atomic code (FAC) [6] and my supervisor's programs. The latter programs calculate polarization and angular anisotropy parameters of various objects participating in the initial and final state of an atomic process. Matrix elements of the parameters are calculated in Born or distorted-wave approximation using the basis of intermediate coupling Hartree-Fock [7] eigenfunctions. Whereas, the former program [6] was used for calculation of the level energies, excitation cross sections and decay probabilities of discrete states of an atom. FAC uses the Dirac-Fock-Slater [6] approximation for calculating various atomic structure parameters. Described input data is parsed and stored by using the same code package, i. e. the package is not bound to the data. The parsing package consists of a number of modules. One of the modules splits raw-data into special and real data groups by looking for special identifiers, e. g. any type of assignment symbol or special symbols described in the define module. The other module determines the form of data, i. e. how it is presented in the file (structured, divided into blocks or typically tabulated). The third module is responsible for gathering global and local information about each subset of the data and discerning between numerical and symbolic data-types. Based on predefined rules and gathered information, each data subset is recognized as belonging to a particular atomic quantity. Then, the data is stored in an adaptive data-structure (list or dictionary), which builds up after each new data is encountered. New subsets of data belonging to the same atomic quantity as stored ones are robustly checked to stay consistent with each other. One of modules performs an unambiguous 1-to-1 and full classification of the states of an atom based on the absolute value or position of the expansion coefficient in an eigenstate expansion.

Some parts of the program are based on a command line interface, where the code queries a user for parameters to change the work-flow of the following procedure. Some queries are optional, e. g. there is a possibility to shift the specified lines of a given spectrum. The latter spectrum is presented in the graphical user interface (GUI). Hopefully, in later stages of development all program capabilities will be represented in the GUI. There are queries with a necessary answer, e. g. a user needs to specify at least one input parameter of the excitation energy and energy resolution of spectra, respectively. But, there are also queries that have default parameter values if these are not specified. For example, at the beginning of program runtime there is a query about the relative destination (or path) of theoretical data in an operating system. A path can be described by atom's name and its number of electrons. If one or all parameters are not specified, the program searches for theoretical data in the default path based on the specified parameters.

Packages responsible for calculating and representing the intensity spectra of atoms use the query answers and data-structure to extract needed information. There can be an arbitrary number of spectra calculated and presented together with experimental digitized spectra at each program runtime. If required, the GUI can show a real-time calculation of each intensity spectrum. A publication [8] on classification of the states and intensity spectrum of Cs was submitted. This code package was used to achieve the latter results.


[1] G.-V. Rossum and the Python Software Foundation, Python (version 2.7.6) (2013). Available at https://www.python.org/download/releases/2.7.6/

[2] P. Raybaut and the Spyder Developer Community, Spyder: Scientific PYthon Development EnviRonment (version 2.2.5) (2013). Available at https://pypi.python.org/pypi/spyder/2.2.5

[3] T. Oliphant ant the NumPy Developers, NumPy: array processing for numbers, strings, records and objects (version 1.8.2) (2014). Available at https://pypi.python.org/pypi/numpy/1.8.2

[4] T. Oliphant, P. Peterson, E. Jones and the Community library project, SciPy: Scientific Library for Python (version 0.13.3) (2014). Available at https://pypi.python.org/pypi/scipy/0.13.3

[5] J.-D. Hunter, Matplotlib: A 2D Graphics Environment, Comput. Sci. Eng. 9, 90-95 (2007).

[6] M.-F. Gu, The flexible atomic code, Can. J. Phys. 86, 675-689 (2008).

[7] C.-F. Fischer, General Hartree-Fock program, Comput. Phys. Commun. 43, 355-365 (1987).

[8] G. Kerevičius and A. Kupliauskienė, Classification of the 5p5nln'l' LSJ energy levels of Cs excited by 30 eV electrons, submitted to Lith. J. Phys. (2015).