TPxLab
Reproducible global deconvolution and quantification of temperature-programmed catalyst data.
TPxLab turns CSV/XLSX TPR, TPD, and TPO curves into inspectable baseline corrections,
editable peak components, simultaneous mixed-model fits, coordinate-aware integrals,
unit-checked quantities, diagnostics, figures, and reproducible exports. One
AnalysisService powers the Python API, CLI, and Tkinter GUI.
Install
Main is the tested 0.2.0 development line and is not yet a GitHub or PyPI release:
git clone https://github.com/hdkim99/TPxLab.git
cd TPxLab
python -m pip install .
The latest immutable release remains 0.1.1 (independent peak fitting):
python -m pip install \
https://github.com/hdkim99/TPxLab/releases/download/v0.1.1/tpxlab-0.1.1-py3-none-any.whl
TPxLab is not yet published on PyPI. The release workflow is prepared for PyPI Trusted Publishing but does not contain an API token or password.
The repository social-preview candidate is the actual bundled-example result, not a mock interface.
30-second global quickstart
From a source checkout:
tpxlab analyze examples/overlapping_tpr.csv \
--components-config examples/overlapping_components.json \
--baseline linear \
--output examples/output/global-analysis.xlsx \
--figure examples/output/global-analysis.png
tpxlab-gui
The GUI follows: load and map columns/units -> baseline and detect -> add/update/remove components -> choose model, center/width bounds, fixed/shared width constraints -> fit and quantify -> inspect components/total/residual -> export. Every edit is passed through the service to the same scientific core used by the CLI.
Python API
from tpxlab import AnalysisService, AnalysisSettings, PeakSeed
from tpxlab.io import load_raw_data
raw = load_raw_data("examples/overlapping_tpr.csv")
components = [
PeakSeed(
332,
220,
540,
model="gaussian",
center_lower=310,
center_upper=350,
width_lower=5,
width_upper=35,
),
PeakSeed(
373,
220,
540,
model="lorentzian",
center_lower=355,
center_upper=390,
width_lower=4,
width_upper=25,
),
PeakSeed(
414,
220,
540,
model="voigt",
center_lower=395,
center_upper=430,
width_lower=4,
width_upper=28,
),
]
result = AnalysisService().analyze(
raw,
AnalysisSettings(baseline_method="linear", fit_mode="global"),
components,
)
print(result.global_fit.identifiable, result.global_fit.statistics.r_squared)
Support status in v0.2.0
| Capability | Status | Notes |
|---|---|---|
| CSV and XLSX import | Supported | explicit or conservative automatic 3-column mapping |
| Linear, polynomial, ALS baseline | Supported | raw data is copied and read-only |
| Optional Savitzky-Golay smoothing | Supported | parameters exported |
| Peak detection and manual edits | Supported | positive peaks; add/update/remove in GUI |
| Simultaneous global deconvolution | Supported | one summed residual; mixed Gaussian/Lorentzian/Voigt |
| Center/width constraints | Supported | positive areas; validated bounds and fixed parameters |
| Shared width constraint | Supported | named shared sigma or gamma groups only |
| Identifiability diagnostics | Supported | ordering, dof, rank, condition, active bounds, covariance status |
| Independent bounded fitting | Supported | v0.1-compatible mode; not overlapping deconvolution |
| Trapezoid/Simpson integration | Supported | actual time coordinates, including irregular sampling |
| Calibration + sample-mass quantification | Supported | Pint dimensional validation |
| Explicit reduction degree | Experimental | API only; user supplies stoichiometry |
| Draft interchange metadata | Experimental | org.tpxlab.analysis/0.2-draft; no integration adapter yet |
| Asymmetric peaks, automatic model selection | Planned | not implemented |
| TPSR and pulse chemisorption workflows | Planned | not implemented |
Outputs
XLSX contains Raw, Processed, Peaks, Components, Global_fit, Settings, Metadata, and QC sheets; a directory destination writes the same layers as CSV. Exports include original channels, component curves, total curve, residual, exact constraints, parameter ordering, component parameters/Tmax/area/height/FWHM, local standard errors, component and global covariance, RSS/RMSE/R²/dof, Jacobian rank, condition number, optimizer status, active bounds, numerical rank tolerance, integration source, units, source file, and QC issues. PNG/SVG/PDF figures include raw/baseline, components/total, and residual.
Scientific scope and limitations
- Global mode minimizes one residual vector between the complete processed signal and the sum of all components. It is not a sum of separately fitted curves.
- Nonlinear decomposition can be non-unique. A full-rank local Jacobian is necessary, not sufficient, for physical uniqueness. Rank-deficient fits report unavailable covariance; boundary solutions report boundary-limited uncertainty.
- Reported covariance is the local linearized least-squares approximation. It does not replace replicate experiments, profile likelihood, or domain-informed uncertainty.
- A shared
sigmaorgammashould be used only when components have a defensible common broadening mechanism. TPxLab never decides that assumption automatically. - Global component quantification integrates each fitted component against measured time. Independent mode integrates the observed bounded region. The export labels this source.
- Peak fit
areais with respect to temperature; calibrated detector integration is with respect to time. Both are labeled separately. - Baseline and model choices remain analytical assumptions requiring residual review. TPxLab fits positive peaks and does not infer gas identity, chemistry, oxidation state, stoichiometry, or expected consumption.
- Non-monotonic temperature programs are flagged; repeated temperature ranges require user review.
Definitions, equations, parameter ordering, and validation details are in Scientific methods. The provisional, explicitly non-stable export contract is in Interchange metadata.
Related tools
- Ordifile — chromatographic data standardization.
- ReactorCheck — catalytic reactor calculation and QC.
- OperandoMerge — heterogeneous experiment timeline alignment.
These are independent repositories. Direct cross-project adapters are planned interoperability, not a current TPxLab feature.
Development
python -m pip install -e '.[dev]'
ruff check .
mypy src
pytest
python -m build
twine check dist/*
Runtime dependencies use permissive licenses compatible with MIT: NumPy/SciPy/pandas
(BSD), Pint (BSD), Matplotlib (PSF-based), and openpyxl (MIT). See pyproject.toml for
the declared dependency set and CONTRIBUTING.md
for the scientific contribution policy.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tpxlab-0.2.0.tar.gz.
File metadata
- Download URL: tpxlab-0.2.0.tar.gz
- Upload date:
- Size: 490.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d621dfa40f5fc0f44aecc2664894c094a25a16d7a468dcfe0a2f46d04b7c687
|
|
| MD5 |
38c221821a12bdc806740a60645c163c
|
|
| BLAKE2b-256 |
503d9746307bef44a5954118a64392b5e4f1777c3cd4f3fc837f834c5e1fa989
|
Provenance
The following attestation bundles were made for tpxlab-0.2.0.tar.gz:
Publisher:
release.yml on hdkim99/TPxLab
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tpxlab-0.2.0.tar.gz -
Subject digest:
1d621dfa40f5fc0f44aecc2664894c094a25a16d7a468dcfe0a2f46d04b7c687 - Sigstore transparency entry: 2569249488
- Sigstore integration time:
-
Permalink:
hdkim99/TPxLab@7dca1a83236af06cec62c6328e359f3aca9bcd57 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/hdkim99
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7dca1a83236af06cec62c6328e359f3aca9bcd57 -
Trigger Event:
release
-
Statement type:
File details
Details for the file tpxlab-0.2.0-py3-none-any.whl.
File metadata
- Download URL: tpxlab-0.2.0-py3-none-any.whl
- Upload date:
- Size: 40.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e05ffcf2b4f0b63fa70bbdf0a9c3757a20165cad7e7c6dfd01ab68bad297d8c1
|
|
| MD5 |
65d9f84f49c52c7f6d70dbea32e5b5b7
|
|
| BLAKE2b-256 |
00491fb7e4b56d1cf30c95abebe5e225c27d05fc2b3b317ea617a9e77ae20dfc
|
Provenance
The following attestation bundles were made for tpxlab-0.2.0-py3-none-any.whl:
Publisher:
release.yml on hdkim99/TPxLab
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tpxlab-0.2.0-py3-none-any.whl -
Subject digest:
e05ffcf2b4f0b63fa70bbdf0a9c3757a20165cad7e7c6dfd01ab68bad297d8c1 - Sigstore transparency entry: 2569249568
- Sigstore integration time:
-
Permalink:
hdkim99/TPxLab@7dca1a83236af06cec62c6328e359f3aca9bcd57 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/hdkim99
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7dca1a83236af06cec62c6328e359f3aca9bcd57 -
Trigger Event:
release
-
Statement type: