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:
- .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.2.tar.gz
.
File metadata
- Download URL: pynxtools-xps-0.0.2.tar.gz
- Upload date:
- Size: 11.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8e0f1eab2131a372f4265dc7b16946072135acbf14457e2781c373fb3f40a9d |
|
MD5 | 46adca430b5cb46b1947b8e424ac7104 |
|
BLAKE2b-256 | 634c45ba322600b0a0e015640def9cee57e539071f87bbb92e75abb0deb446ab |
File details
Details for the file pynxtools_xps-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: pynxtools_xps-0.0.2-py3-none-any.whl
- Upload date:
- Size: 81.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b692ab0c3384b593a7ff5bdb3c72985f394f9348fe7776e54213032fe65cd568 |
|
MD5 | 98d9d0e9334efedd770c16476d20a86d |
|
BLAKE2b-256 | f32ab6f871506f51272f34ce7bfbe356145c2d25427e9de1a2e247a2081e7446 |