From ec2dd46c25272738ba2bebb43facd37f140f810a Mon Sep 17 00:00:00 2001 From: Lukas Pielsticker <50139597+lukaspie@users.noreply.github.com> Date: Thu, 30 Nov 2023 20:09:58 +0100 Subject: [PATCH] Update README.md --- pynxtools/dataconverter/readers/xps/README.md | 48 +++++++++++++------ 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/pynxtools/dataconverter/readers/xps/README.md b/pynxtools/dataconverter/readers/xps/README.md index b3834d4c7..792350837 100644 --- a/pynxtools/dataconverter/readers/xps/README.md +++ b/pynxtools/dataconverter/readers/xps/README.md @@ -1,24 +1,42 @@ -# xps reader +# XPS reader -## Contact person in FAIRmat for this reader - -Rubel Mozumder +## Purpose +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](https://www.nexusformat.org/) application definition [NXmpes](https://fairmat-nfdi.github.io/nexus_definitions/classes/contributed_definitions/NXmpes.html#nxmpes). -## Some Notes +## 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](https://www.specs-group.com/nc/specs/products/detail/prodigy/) files, propietary format of SPECS GmbH (v1.6) +- .xml: SpecsLab 2files, XML format from SPECS GmbH (v1.6) +- .vms: VAMAS files, ISO standard data transfer format ([ISO 14976](https://www.iso.org/standard/24269.html)), both in regular and irregular format +- .xy: SpecsLabProdigy export format in XY format (including all export settings) +- .txt: + - exported by [Scienta Omicron](https://scientaomicron.com/en) instruments + - exported by [CasaXPS](https://www.casaxps.com/) analysis software -1. The reader only compatible with xps data file (xml) of version 1.6. -2. The reader builds on [NXmpes](https://fairmat-experimental.github.io/nexus-fairmat-proposal/1c3806dba40111f36a16d0205cc39a5b7d52ca2e/classes/contributed_definitions/NXmpes.html#nxmpes) definition language. -3. The development process is intended in two steps. - i. [reader_utils](https://github.com/FAIRmat-NFDI/pynxtools/blob/master/pynxtools/dataconverter/readers/xps/reader_utils.py) parse the xps data from raw input files. - ii. Later the NXmpes nxdl template will be filled the parsed data comming from **reader_utils.py**. -4. XPS data file (1.6v) does not have data/values for all requied fields and attributes. So, to launch **xps** reader user must provide a [xps eln](https://github.com/FAIRmat-NFDI/pynxtools/blob/master/tests/data/dataconverter/readers/xps/xps_eln.yaml) with [raw data](https://github.com/FAIRmat-NFDI/pynxtools/blob/master/tests/data/dataconverter/readers/xps/In-situ_PBTTT_XPS_SPECS.xml) file. -5. Example script to run xps reader use code snipet below- +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: ```sh ! dataconverter \ --reader xps \ --nxdl NXmpes \ ---input-file $ \ ---input-file $ \ ---output .test.nxs +--input-file $ \ +--input-file $ \ +--output .test.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. An example can be found in [*pynxtools/examples/xps*](). + +## Development Notes +The development process is modular so that new parsers can be added. The read logic is the following. +1. First, [*XpsDataFileParser*]([https://github.com/FAIRmat-NFDI/pynxtools/blob/master/pynxtools/dataconverter/readers/xps/file_parser.py#L39]) 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 the *parse_file* function of that reader. In addition, it selects a proper config file from +the *config* subfolder. +2. Afterwards, the NXmpes nxdl template is filled with the data in *XpsDataFileParser* using the *config* 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). + +## Contact person in FAIRmat for this reader +Lukas Pielsticker