A reader for transferring XPS data from vendor formats to NeXus and NOMAD.
Project description
A reader for XPS data
Installation
It is recommended to use python 3.11 with a dedicated virtual environment for this package. Learn how to manage python versions and virtual environments.
Install this package with
pip install git+https://github.com/FAIRmat-NFDI/pynxtools-xps.git
for the latest development version.
Purpose
This reader plugin for pynxtools is used to translate diverse file formats from the scientific community and technology partners within the field of X-ray photoelectron spectroscopy into a standardized representation using the NeXus application definition NXmpes.
Supported file formats
The reader decides which parser to use based on the file extension of the files provided. For the main XPS files, the following file extensions are supported:
- .spe, .pro: Phi MultiPak files, propietary format of PHI Electronics
- .sle: SpecsLabProdigy files, propietary format of SPECS GmbH (1 and v4)
- .xml: SpecsLab 2files, XML format from SPECS GmbH (v1.6)
- .vms: VAMAS files, ISO standard data transfer format (ISO 14976), both in regular and irregular format
- .xy: SpecsLabProdigy export format in XY format (including all export settings)
- .txt:
- exported by Scienta Omicron instruments
- exported by CasaXPS analysis software
We are continously working on adding parsers for other data formats and technology partners. If you would like to implement a parser for your data, feel free to get in contact.
Getting started
An example script to run the XPS reader in pynxtools:
! dataconverter \
--reader xps \
--nxdl NXmpes \
--input-file $<xps-file path> \
--input-file $<eln-file path> \
--output <output-file path>.nxs
Note that none of the supported file format have data/values for all required and recommended fields and attributes in NXmpes. In order for the validation step of the XPS reader to pass, you need to provide an ELN file that contains the missing values. Example raw and converted data can be found in pynxtools_xps/examples.
Contributing
Development install
Install the package with its dependencies:
git clone https://github.com/FAIRmat-NFDI/pynxtools-xps.git \\
--branch master \\
--recursive pynxtools_xps
cd pynxtools_xps
python -m pip install --upgrade pip
python -m pip install -e .
python -m pip install -e ".[dev]"
There is also a pre-commit hook available which formats the code and checks the linting before actually commiting. It can be installed with
pre-commit install
from the root of this repository.
Development Notes
The development process is modular so that new parsers can be added. The design logic is the following:
- First,
XpsDataFileParser
selects the proper parser based on the file extensions of the provided files. It then calls a sub-parser that can read files with such extensions and calls theparse_file
function of that reader. In addition, it selects a proper config file from theconfig
subfolder. - Afterwards, the NXmpes nxdl template is filled with the data in
XpsDataFileParser
using theconfig
file. Data that is not in the given main files can be added through the ELN file (and must be added for required fields in NXmpes).
Test this software
Especially relevant for developers, there exists a basic test framework written in pytest which can be used as follows:
python -m pytest -sv tests
Contact person in FAIRmat for this reader
Lukas Pielsticker
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pynxtools-xps-0.0.3.tar.gz
.
File metadata
- Download URL: pynxtools-xps-0.0.3.tar.gz
- Upload date:
- Size: 12.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ef10f6631006dcb568cf1c7424e2da178fe49a6c630940a9df325e88199fdc8 |
|
MD5 | 6e29189d01b8eba44cbaf2401af69b3f |
|
BLAKE2b-256 | e70009d8e821f7b7a6273d0baa8771361d8f4728050598995649a4a2c88185d3 |
File details
Details for the file pynxtools_xps-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: pynxtools_xps-0.0.3-py3-none-any.whl
- Upload date:
- Size: 101.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16bceb0bbd3d0d86d8d00cf0045328a42e50eb2f64f82592162eca3be4305c15 |
|
MD5 | 299817a03475bd97ca0b73965fc98ea6 |
|
BLAKE2b-256 | 5f0eca397f2dcfe808ba7247529410b0226bdbda029ed9a76ebde7d4f771b942 |