xpsflow

About xpsflow

xpsflow is an open-source tool for analyzing X-ray photoelectron spectroscopy (XPS) data. It reads the files that laboratory instruments write (Kratos .kal exports, ISO 14976 VAMAS .vms files and plain text), grades each spectrum before anything is fitted, references the energy scale, identifies the elements in a survey scan, fits every core level under literature constraints, lets a statistical criterion decide how many components the data support, audits each fit, quantifies the composition with the intensity scale written down, and produces a report a scientist can review and sign.

The project exists because published XPS fits are, too often, impossible to reproduce: the background was drawn by hand, the widths were not constrained, the doublets were not tied, and nobody wrote down which sensitivity factors were used. xpsflow makes the careful version of that routine the default one and records every choice, including where each constraint came from, so that a reader can judge the result without asking the analyst.

What it is not

It is not a replacement for the person who knows the sample. Differential charging, multiplet splitting in open-shell transition metals and the choice of a reference sample still need judgement; the software points at them and reports its own confidence, but the last page of every report is a sign-off for a human.

How it is built

The package is Python, licensed under the MIT license, with the physics in small readable modules and the expert knowledge in YAML templates that cite their sources. The same deterministic tools sit behind a command-line interface, a local web workbench, a tool-calling assistant, a Model Context Protocol server and the browser version on this site, which runs the complete pipeline in WebAssembly without sending files anywhere.

The source, the issue tracker, the changelog and the test suite are on GitHub. The reference database and every shipped template cite the primary literature they rest on; see the constraints and provenance page for how that database is built and how to contribute to it.