xpsflow

Fit every core level with physics, not guesswork.

xpsflow reads what your XPS instrument writes, fits each region under literature constraints, lets the data decide how many peaks it supports, audits the result, and tells you, in plain language, how far to trust each number.

The browser version runs the full pipeline on your machine with WebAssembly. Files never leave the page. About 25 MB on first visit, then cached.

Report cover: the headline finding, a confidence rating with reasons, and the composition in three readings
The report leads with the answer and how much to trust it.
A region page: the Te 3d fit with components, the model-selection outcome and a plain-language checklist
One page per region: fit, components, model choice, and a checklist.

What happens between a raw file and a number you would quote

ReadKratos .kal, ISO 14976 VAMAS, text. Transmission functions travel with the data.
GradeSignal-to-noise, sampling, spikes and saturation on every spectrum. Nothing is smoothed before fitting.
ReferenceAdventitious carbon, ISO 15472 metals, a Fermi edge or a known peak. The method and shift are recorded.
IdentifySurvey peaks matched against 98 elements, scored on doublet spacing and Auger overlaps.
Fit and auditLiterature doublets, tied widths, bounded positions. BIC decides the model; every candidate is shown. The audit checks widths, positions, residual structure and whether each peak is needed.
QuantifyCounts per second, the file's transmission function, Scofield factors, and three readings of the composition: as measured, carbon excluded, overlayer corrected.

Every constraint carries its source

Templates are small YAML files. Each component cites where its position bounds, width bounds and doublet ties come from, and the report prints that table together with an ISO 19830 reporting record. Peaks the software adds itself are marked as such.

How provenance works →

Pass energy is not a factor of two

On a Kratos Axis the transmission at pass energy 40 relative to 20 runs from 2.1 to 3.3 across the spectrum. xpsflow uses the function the instrument wrote into the file, falls back to pass-energy scaling only when it must, and says which it did.

The quantification page →

On your machine

git clone https://github.com/KarthikSubramanian07/XPS-Flow.git && cd XPS-Flow
uv venv && uv pip install -e ".[web,pdf]"

xpsflow run examples/demo.vms --out runs/demo     # pipeline → report.pdf
xpsflow batch data/ --out runs/batch              # many samples, one comparison
xpsflow serve                                     # the workbench, with the assistant
xpsflow mcp                                       # an MCP server for AI clients

Python 3.11 to 3.13, MIT license. The local install adds PDF reports, the tool-calling assistant and the MCP server.

Documentation