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/
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 trxasviewer-0.6.2.tar.gz.
File metadata
- Download URL: trxasviewer-0.6.2.tar.gz
- Upload date:
- Size: 523.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6e31046cc37e0a0baeba21df26d1d6de57f73216e1cd80d33a0e18a87983c4e
|
|
| MD5 |
105732f505f306ab6d102b924c55dea3
|
|
| BLAKE2b-256 |
5b6d197698a4c700701e86e104f3cdf50638bc25c86cdaf28dc892972ac66d27
|
Provenance
The following attestation bundles were made for trxasviewer-0.6.2.tar.gz:
Publisher:
autobuild.yml on AdvancedPhotonSource/trxasviewer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
trxasviewer-0.6.2.tar.gz -
Subject digest:
e6e31046cc37e0a0baeba21df26d1d6de57f73216e1cd80d33a0e18a87983c4e - Sigstore transparency entry: 2762557059
- Sigstore integration time:
-
Permalink:
AdvancedPhotonSource/trxasviewer@c6ec0d9e52e889bc224549bc3a1485cb022d13a9 -
Branch / Tag:
refs/tags/v0.6.2 - Owner: https://github.com/AdvancedPhotonSource
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
autobuild.yml@c6ec0d9e52e889bc224549bc3a1485cb022d13a9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file trxasviewer-0.6.2-py3-none-any.whl.
File metadata
- Download URL: trxasviewer-0.6.2-py3-none-any.whl
- Upload date:
- Size: 107.2 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 |
9d73c415750b8ddbb682a8270df99dc7c74536d50748d5b4ba1315d17fe10268
|
|
| MD5 |
1ae011208bbd66d54461ce3af75b9228
|
|
| BLAKE2b-256 |
035b3af8e23dc6792d858ca2625be926488792756b25c993b369c32ba627df3f
|
Provenance
The following attestation bundles were made for trxasviewer-0.6.2-py3-none-any.whl:
Publisher:
autobuild.yml on AdvancedPhotonSource/trxasviewer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
trxasviewer-0.6.2-py3-none-any.whl -
Subject digest:
9d73c415750b8ddbb682a8270df99dc7c74536d50748d5b4ba1315d17fe10268 - Sigstore transparency entry: 2762557112
- Sigstore integration time:
-
Permalink:
AdvancedPhotonSource/trxasviewer@c6ec0d9e52e889bc224549bc3a1485cb022d13a9 -
Branch / Tag:
refs/tags/v0.6.2 - Owner: https://github.com/AdvancedPhotonSource
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
autobuild.yml@c6ec0d9e52e889bc224549bc3a1485cb022d13a9 -
Trigger Event:
push
-
Statement type: