TrXASViewer
A PySide6 GUI for visualizing and analyzing Time-Resolved X-ray Absorption Spectroscopy (TrXAS) datasets collected at synchrotron light sources such as the Advanced Photon Source (APS).
Free software: Apache Software License 2.0
Features
Viewer GUI (trxasviewer view)
File browser for SPEC-format raw TrXAS scan files with live detection of new scans during acquisition (NFS-safe polling)
Interactive 2-D energy–time difference map with crosshair line-cuts and zoom-in ROI
Flexible time-binning: linear, logarithmic, or manual multi-level binning
Ground-state subtraction: bunch-average or orbital-average methods
Kinetics extraction: up to four user-defined energy ROIs with interactive drag handles on the 2-D map, ±1σ error bars from scan-to-scan variance
Outlier removal: median absolute deviation (MAD) or standard deviation
Multiple output formats: NumPy NPZ, HDF5, OriginLab CSV, PNG/PDF plots
Background saving thread — GUI stays responsive during export
Modeler GUI (trxasviewer model)
Load kinetics traces exported from the viewer
Build arbitrary multi-state kinetic models via an adjacency matrix
ODE-based rate-equation fitting with scipy.optimize
Parallel multi-start optimization for robust global minimum search
SVD decomposition of the difference map
Installation
Via pip (requires Python 3.10+):
pip install trxasviewer
Standalone executable (no Python required): single-file builds for Windows, macOS, and Linux are attached to each GitHub Release:
Windows: trxasviewer-<version>-windows.exe
macOS: trxasviewer-<version>-macos.dmg (signed and notarized)
Linux: trxasviewer-<version>-x86_64.AppImage (make executable with chmod +x before running)
Double-clicking the executable launches the viewer GUI directly; run it from a terminal with a model argument to open the kinetic modeler instead.
Usage
# Open viewer with a raw data folder
trxasviewer view --rawfolder /path/to/data --syncbunch 1820
# Open the kinetic modeler
trxasviewer model
# Use a dedicated NPZ cache folder for faster repeated loading
trxasviewer view --rawfolder /path/to/data --cachefolder /path/to/cache
See trxasviewer view --help for the full list of options.
Scripting / Jupyter
The trxasviewer.core module is fully Qt-free and can be imported in plain Python scripts or Jupyter notebooks without launching the GUI:
from trxasviewer.core import TrXASDataset, TrXASDatasetManager, save_results
dset = TrXASDataset("/path/to/setup-full-00178")
results = dset.get_energy_vs_time(
target="normalized-GS",
norm_kwargs={"sync_type": "bunch", "sync_value": 1820,
"gs_method": "bunch-average", "gs_value": 5},
binning_kwargs={"method": "Linear", "lin_num": 5},
)
print(results["diff"].shape) # (n_energy, n_time)
A full worked example covering single-file loading, multi-file averaging, SVD, plotting, and saving is in examples/analyze_trxas.py.
Development
git clone https://github.com/AdvancedPhotonSource/trxasviewer
cd trxasviewer
pip install -e ".[dev]"
pytest tests/
ruff check src/
Metadata
Release files for trxasviewer 0.6.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| trxasviewer-0.6.2.tar.gz | 523.0 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| trxasviewer-0.6.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 630.2 kB
Release files / trxasviewer-0.6.2.tar.gz
| Download URL | trxasviewer-0.6.2.tar.gz |
|---|---|
| Size | 523.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e6e31046cc37e0a0baeba21df26d1d6de57f73216e1cd80d33a0e18a87983c4e
|
|
BLAKE2b-256 checksum How to use checksums |
5b6d197698a4c700701e86e104f3cdf50638bc25c86cdaf28dc892972ac66d27
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.
Transparency logRelease files / trxasviewer-0.6.2-py3-none-any.whl
| Download URL | trxasviewer-0.6.2-py3-none-any.whl |
|---|---|
| Size | 107.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9d73c415750b8ddbb682a8270df99dc7c74536d50748d5b4ba1315d17fe10268
|
|
BLAKE2b-256 checksum How to use checksums |
035b3af8e23dc6792d858ca2625be926488792756b25c993b369c32ba627df3f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.
Transparency logSecurity for trxasviewer 0.6.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for trxasviewer-0.6.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.