XPCS Viewer: A python-based interactive tool to visualize and model XPCS dataset
Project description
Python-based XPCS data analysis and visualization tool.
Features:
G2 correlation analysis with fitting
SAXS 1D/2D visualization
Two-time correlation analysis
HDF5 data support (NeXus format)
GUI Features:
Light/dark theme support with system detection
Session persistence (resume where you left off)
Command palette (Ctrl+Shift+P) for quick access
Toast notifications for status updates
Keyboard shortcut management
Drag-and-drop file handling
Theme-aware plots (PyQtGraph & Matplotlib)
UI notes
Menu-driven header (no quick-access toolbar); all actions live under the menus/shortcuts.
Starts maximized with a rectangular layout and a minimum-size floor to prevent cramped controls.
PySide6 GUI interface with modern theming
Performance optimizations
Installation
Requirements: Python 3.12+
# Basic installation
pip install xpcsviewer
# Complete installation with all features and tools
pip install xpcsviewer[all]
# Install with specific optional dependencies
pip install xpcsviewer[dev] # Development tools
pip install xpcsviewer[docs] # Documentation building
pip install xpcsviewer[validation] # Profiling and validation tools
pip install xpcsviewer[performance] # Performance analysis tools
Usage
GUI (Interactive):
# Launch GUI with data path
xpcsviewer-gui /path/to/hdf/data
# Launch from current directory
xpcsviewer-gui
# With debug logging
xpcsviewer-gui --log-level DEBUG
CLI (Batch Processing):
# Show available commands
xpcsviewer --help
# Generate twotime plots for all phi angles at q=0.05
xpcsviewer twotime --input /data --output /results --q 0.05
# Generate high-resolution PDF plots
xpcsviewer twotime -i /data -o /results --phi 45 --dpi 300 --format pdf
Citation
Chu et al., “pyXPCSviewer: an open-source interactive tool for X-ray photon correlation spectroscopy visualization and analysis”, Journal of Synchrotron Radiation, (2022) 29, 1122–1129.
Development
# Clone and install
git clone https://github.com/imewei/XPCSViewer.git
cd XPCSViewer
pip install -e .[dev]
# Run tests
make test
# Build docs
make docs
Data Formats
NeXus HDF5 (APS-8IDI beamline)
SAXS 2D/1D data
G2 correlation functions
Time series data
Testing
make test # Run tests
make test-unit # Unit tests
make test-integration # Integration tests
make coverage # Coverage report
Documentation
make docs # Build docs
make docs-autobuild # Live reload docs
Configuration
Environment variables for customization:
Variable |
Description |
Default |
|---|---|---|
XPCS_LOG_LEVEL |
Logging verbosity (DEBUG, INFO, WARNING, ERROR) |
INFO |
XPCS_CACHE_SIZE_MB |
Maximum cache size in MB |
512 |
XPCS_THEME |
UI theme (light, dark, system) |
system |
Project Structure
xpcsviewer/
├── module/ # Analysis modules
├── fileIO/ # HDF5 I/O
├── gui/ # GUI modernization
│ ├── theme/ # Light/dark theming
│ ├── state/ # Session & preferences
│ ├── shortcuts/ # Keyboard shortcuts
│ └── widgets/ # Modern UI widgets
├── plothandler/ # Theme-aware plotting
├── threading/ # Async workers
├── utils/ # Utilities
└── xpcs_file.py # Core data class
Analysis Features
Multi-tau G2 correlation with fitting
Two-time correlation analysis
SAXS 2D pattern visualization
SAXS 1D radial averaging
Sample stability monitoring
File averaging tools
Gallery
Analysis Modules Showcase
Integrated 2D Scattering Pattern
1D SAXS Reduction and Analysis
Sample Stability Assessment
Intensity vs Time Series
File Averaging Toolbox
G2 Correlation Analysis
Diffusion Characterization
Two-time Correlation Maps
HDF5 Metadata Explorer
License
MIT License. See CONTRIBUTING.rst for development guidelines.
Project details
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 xpcsviewer_gui-0.1.0.tar.gz.
File metadata
- Download URL: xpcsviewer_gui-0.1.0.tar.gz
- Upload date:
- Size: 2.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
730575b62ac5a8973d64651e8d93c93a2e5f4dab7c3c88c19a8433f9744fb58a
|
|
| MD5 |
1bf7250a472ca2e05be070177af92b6a
|
|
| BLAKE2b-256 |
9fe26dde2a6f01384f2aa0699defda285f0cf1e2f672d043223ced2eda91db1d
|
Provenance
The following attestation bundles were made for xpcsviewer_gui-0.1.0.tar.gz:
Publisher:
release.yml on imewei/xpcsviewer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xpcsviewer_gui-0.1.0.tar.gz -
Subject digest:
730575b62ac5a8973d64651e8d93c93a2e5f4dab7c3c88c19a8433f9744fb58a - Sigstore transparency entry: 796273129
- Sigstore integration time:
-
Permalink:
imewei/xpcsviewer@dda19553276dc42eb63e30d8dbcbe578f758a6fc -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/imewei
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@dda19553276dc42eb63e30d8dbcbe578f758a6fc -
Trigger Event:
push
-
Statement type:
File details
Details for the file xpcsviewer_gui-0.1.0-py3-none-any.whl.
File metadata
- Download URL: xpcsviewer_gui-0.1.0-py3-none-any.whl
- Upload date:
- Size: 977.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9de1cb560253fc76ad55472c0004fddc56fb111e27cbec6a278cb10efc7f8c3
|
|
| MD5 |
ed1e59ef20e62db555285d083a1a3e51
|
|
| BLAKE2b-256 |
7a1ab8f8988744431d8d164e5a3c6f16d10a04ea28780ca7a8604b41686a8986
|
Provenance
The following attestation bundles were made for xpcsviewer_gui-0.1.0-py3-none-any.whl:
Publisher:
release.yml on imewei/xpcsviewer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xpcsviewer_gui-0.1.0-py3-none-any.whl -
Subject digest:
b9de1cb560253fc76ad55472c0004fddc56fb111e27cbec6a278cb10efc7f8c3 - Sigstore transparency entry: 796273140
- Sigstore integration time:
-
Permalink:
imewei/xpcsviewer@dda19553276dc42eb63e30d8dbcbe578f758a6fc -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/imewei
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@dda19553276dc42eb63e30d8dbcbe578f758a6fc -
Trigger Event:
push
-
Statement type: