User Guide
The XPS Analyzer pipeline is organized into six modular stages. Each stage operates independently and communicates through validated Pydantic data models, ensuring type safety and data integrity throughout the analysis.
Pipeline Overview
graph TD
A[Raw Data] --> B[Data Loader]
B --> C[Preprocessing / Calibration]
C --> D[Background Subtraction]
D --> E[Peak Fitting]
E --> F[Quantification]
D --> G[Visualization]
E --> G
B --> H[Export]
F --> H
style A stroke-width:2px
style H stroke-width:2px
Module Reference
| Module | Page | Purpose |
|---|---|---|
data_loader |
Data Loading | File parsing, format detection, spectrum structuring |
preprocessing |
Energy Calibration | Binding energy shift correction |
analysis.background |
Background Subtraction | Shirley, Tougaard, and Linear background models |
analysis.peak_fitting |
Peak Fitting | Voigt/Gaussian/Lorentzian deconvolution, doublet fitting |
analysis.quantification |
Atomic Quantification | RSF-based concentration calculation |
export |
Data Export | CSV, Excel, and JSON serialization |
Code Conventions
- Immutability: All spectral operations return new model instances via
model_copy(deep=True). Setinplace=Trueto override. - Validation: All models use Pydantic v2 validators. Invalid data raises typed exceptions at construction time.
- Configuration: Global defaults in
config/default_settings.tomlcan be overridden per call.