Skip to main content

XPS analysis

Project description

GXPS

This project is still under development. Don't expect everything to work. If you encounter any bugs, please report them to me and include a logfile (On Linux: ~/.cache/gxps/logs, on Windows: C:\Users\$USER\AppData\Local\gxps\logs).

GXPS is a tool for visualizing and fitting X-ray photoelectron spectroscopy (XPS) data (although it may be possible to support also other kinds of spectroscopy data). For the fit, a variety of peak and background models are or will be implemented. Fit parameters can be constrained easily.

Installation

Ubuntu (or other Linux distros)

GTK needs to be version >=3.14. If you don't already have it installed, install python (>=3.5) and pip as well as libffi6 and python-gi through your package manager:

$ sudo apt install python3 pip3 libffi6 python3-gi libgirepository1.0-dev gir1.2-gtk-3.0 python3-gi-cairo libcairo2-dev python3-cairo-dev

(I don't know if you really need all of those dependencies)

GXPS is available via pip (don't use sudo!):

$ python3 -m pip install gxps

Update like this:

$ python3 -m pip install --no-deps --force-reinstall --upgade gxps

The pip installation puts a .desktop file into the $HOME/.local/share/applications directory, so it should appear as a normal installed application. You can also call it via $ gxps.

Windows

For running from source, please refer to these instructions. The more convenient method, however, is just running the pre-built .exe that you can find here. Just download the appropriate .zip file and extract it. Inside is an executable that runs the program. GXPS creates a folder in C:\Users\$USER\AppData\gxps for log files and configuration files.

I plan on making a standalone .exe without the big folder around it and also on maybe making an installer later. Please note that GXPS seems to be significantly slower in Windows. Also, the builds are only tested in Windows 10 and I have no idea if it runs on older versions. Also, GXPS is quite ugly on Windows. I will at least try and make icons that work in a non-dark mode.

OS X

It seems to be possible to run GXPS on a Mac but I don't know how.

Usage

Importing and visualizing spectra

For now, only files from the Omicron EIS software can be parsed. If you have another file format, please provide me with an example and I can write a parser for that. Or write one yourself in the gxps.io module. Spectra can be imported via the Edit menu or the "Plus" button, they can be removed again by making them active and clicking the "Minus button".

On the left, the parsed spectra are listed. Through a right click, you can edit metadata and show the selected spectra in the spot (make them "active"). Below the table, you can shift the active spectra to calibrate the energy axis and you can normalize them. The "Atom" symbol in the top bar allows you to select elements whose spectral lines are shown as vertical lines in the plot:

Screenshot 1

Fitting

The panel on the right manages the spectrum fitting. Through the "Parallel Lines Plus" symbol, regions are defined in which the chosen background subtraction algorithm is applied. You have to click and drag to draw the region. The "Parallel Lines Minus" symbol is for deleting these regions (click the region). Below that, new Peaks can be added via clicking and dragging in the plot. The Chooser Box defines the model of the added peak. The FIT button on the left does the actual fit.

Screenshot 2

Below the list of peaks are some buttons to manipulate the "active" peak. The label and the peak model can be changed and Parameters can be pinned to values or other parameters. Position, Area and FWHM are valid for each peak model. The values on the right vary however. Syntax is:

  • Type a value and hit enter. This fixes the parameter to that value.
  • Type boundaries like < 530 or >515 <517.3.
  • Type a simple formula like A*5 or B + 1.5 where A and B refer to another peak's same kind of parameter (if you are editing D's area, A refers to A's area). The unique letter of each peak is shown on the left in the peak table.

Exporting data

Through "File" → "Export as txt..." and "Export as image..." you can export your data to useful file formats. Image exporting will include some features for making nice plots. For now, however, the dialog does nothing besides saving an image in the default design (all the buttons are not working here).

Saving and opening a project is also possible in the "File" menu.

Peak models

This section will explain the peak models that are used.

Building

PyPI

Uploading a new version of GXPS to the PyPI works as follows:

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

Windows

Please refer to this manual.

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

gxps-0.8.10.tar.gz (988.1 kB view details)

Uploaded Source

Built Distribution

gxps-0.8.10-py3-none-any.whl (345.6 kB view details)

Uploaded Python 3

File details

Details for the file gxps-0.8.10.tar.gz.

File metadata

  • Download URL: gxps-0.8.10.tar.gz
  • Upload date:
  • Size: 988.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/46.1.3 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.9

File hashes

Hashes for gxps-0.8.10.tar.gz
Algorithm Hash digest
SHA256 04971338bddbcd5ea9375bf47839b27b543b29b536feb11c104269592f0bd5e8
MD5 b842c3f07852db0bdd4d728d98634048
BLAKE2b-256 b75a2d0b956bef4321ad38f3e1be4f512691365bc5339c78bd17bb1e5bc4a814

See more details on using hashes here.

File details

Details for the file gxps-0.8.10-py3-none-any.whl.

File metadata

  • Download URL: gxps-0.8.10-py3-none-any.whl
  • Upload date:
  • Size: 345.6 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/46.1.3 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.9

File hashes

Hashes for gxps-0.8.10-py3-none-any.whl
Algorithm Hash digest
SHA256 dae33722a6f334d0acc1c27a7cb2822001f92d9dea599da96204346cc9025532
MD5 7c1787f3065c93506e332f5e6cd9483b
BLAKE2b-256 7f0bf6e909b58d73f4f7bcc93aa0ebd05e0f5f6153dbb51088dc7a3628c18b6f

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