Skip to main content

XPS spectrum analysis

Project description

XPL

XPL is a tool for plotting and analyzing X-ray photoelectron spectroscopy (XPS) data. It can fit peaks using Pseudo Voigt profiles (more models to come) while enabling Area, Position and FWHM restrainment of the individual peaks to physically sensible values (or expressions).

New Version

There will be an implementation of Doniach-Sunjic type peaks as well as the possibility to control the Gauss-to-Lorentz ratio of Voigt/PseudoVoigt peaks in the near future.

However, I am also working on a total rewrite which will be in a new repository and a different PyPi package. This will take some time until it is functional, so bear with me.

Installation

Ubuntu

If you don't already have it installed, install python and pip as well as libffi6 and python-gi through apt. Python version needs to be >=3.5 (not tested below) and GTK needs to be version >=3.14.

$ sudo apt install python3 pip3
$ sudo apt install libffi6 python3-gi
$ pip3 install xpl

On starting, XPL creates a ~/.config/xpl folder where configuration files and converted spectrum files will be stored. To launch xpl, just select it from your applications menu. Alternatively, run it as a module:

$ python3 -m xpl

To update xpl, run

$ pip3 install --upgrade xpl

Windows

I have not yet succeeded in building a windows .exe style app or even an installer. However, you can try to install PyGObject manually and get the xpl package through pip.

First, you need Python 3.5 (other 3.x will probably work, not tested) from https://www.python.org/downloads/windows/ or Anaconda or whatever. Then, you need PyGObject eiter from https://sourceforge.net/projects/pygobjectwin32/ or through MSYS (http://www.msys2.org). I could not get it to work.

Usage

You can import spectra by clicking the plus icon in the main toolbar. So far, only exportet .txt files from the EIS Omicron software can be parsed.

When the "Spectra" tab is selected, you can choose the spectra to view by selecting them, right clicking and clicking "Plot selected spectra". The rightmost icon in the top toolbar lets you select elements whose peak positions should be displayed (see screenshot).

Screenshot

In the fitting tab, you can first add one or more regions by clicking "+" next to "Regions", then dragging across the Plot View.

When a region is selected, you can add peaks by clicking "+" next to "Peaks" and drawing them by dragging from the peak maximum downwards inside the selected region. After this, you can constrain the peak values in the bottommost three entries: They accept input either like < min > max where min and max are minimum and maximum values for the corresponding parameter, or like expression which can be a simple arithmetic expression or just a fixed value. A relation to the same parameter of another peak can be expressed by using their label (see screenshot below).

Screenshot

Exporting the data or the plot is not yet supported.

Building

PyPI

Run this for building the pypi package and uploading it.

python3 setup.py sdist bdist_wheel
python3 -m twine upload dist/xpl-VERSION*

Note to self: Don't forget to use the correct version name when uploading to pypi.

Executable for Linux

Just run

pyinstaller xpl_linux.spec

This makes an executable dist/xpl/XPL. For now, this still produces a Gtk-Warning about libcanberra when running the app but that can probably safely be ignored.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xpl-0.8.6.2.tar.gz (170.1 kB view details)

Uploaded Source

Built Distribution

xpl-0.8.6.2-py3-none-any.whl (222.3 kB view details)

Uploaded Python 3

File details

Details for the file xpl-0.8.6.2.tar.gz.

File metadata

  • Download URL: xpl-0.8.6.2.tar.gz
  • Upload date:
  • Size: 170.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8

File hashes

Hashes for xpl-0.8.6.2.tar.gz
Algorithm Hash digest
SHA256 6d18a2a285cd32e79526b385be4d2469b20677fb6e8eea075260b0f55e397410
MD5 cc8ba21050af119fd3d29028a7f1db10
BLAKE2b-256 e2d697213fef22dc4ebda03a08d4f1b9b4fb8a2e6be6a2c3957be4bb87bbc9e3

See more details on using hashes here.

File details

Details for the file xpl-0.8.6.2-py3-none-any.whl.

File metadata

  • Download URL: xpl-0.8.6.2-py3-none-any.whl
  • Upload date:
  • Size: 222.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8

File hashes

Hashes for xpl-0.8.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ac7072b54cd2834869a06cac4c3d1ffd2eb1e565c7be0af4939251509a76c5e1
MD5 228d108e857827332dc80ae1f5d448cc
BLAKE2b-256 7e09f42473b23d41c3b3f4eeb59430abc76662f25528a4fdbef6379c7a089bdb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page