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,
XpsDataFileParserselects 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_filefunction of that reader. In addition, it selects a proper config file from theconfigsubfolder. - Afterwards, the NXmpes nxdl template is filled with the data in
XpsDataFileParserusing theconfigfile. 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
Metadata
Release files for pynxtools-xps 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pynxtools-xps-0.0.3.tar.gz | 12.2 MB | Without provenance | Details for pynxtools-xps-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pynxtools_xps-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for pynxtools_xps-0.0.3-py3-none-any.whl |
Total release size: 12.3 MB
Release files / pynxtools-xps-0.0.3.tar.gz
| Download URL | pynxtools-xps-0.0.3.tar.gz |
|---|---|
| Size | 12.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9ef10f6631006dcb568cf1c7424e2da178fe49a6c630940a9df325e88199fdc8
|
|
BLAKE2b-256 checksum How to use checksums |
e70009d8e821f7b7a6273d0baa8771361d8f4728050598995649a4a2c88185d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.19
|
Release files / pynxtools_xps-0.0.3-py3-none-any.whl
| Download URL | pynxtools_xps-0.0.3-py3-none-any.whl |
|---|---|
| Size | 101.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
16bceb0bbd3d0d86d8d00cf0045328a42e50eb2f64f82592162eca3be4305c15
|
|
BLAKE2b-256 checksum How to use checksums |
5f0eca397f2dcfe808ba7247529410b0226bdbda029ed9a76ebde7d4f771b942
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.19
|
Security for pynxtools-xps 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.