Quick Start¶
Concise recipes for getting up and running with XPCS Viewer. For a guided walkthrough with explanations, see Getting Started with XPCS Viewer.
Launch the GUI¶
# Launch GUI in the current directory
xpcsviewer-gui
# Launch GUI pointed at a data folder
xpcsviewer-gui /path/to/hdf/data
# Launch with debug logging
xpcsviewer-gui --log-level DEBUG
GUI Workflow¶
Launch:
xpcsviewer-gui /path/to/dataSelect files from the Source list (left panel)
Add to Target with
Ctrl+Shift+Aor drag-and-dropChoose an analysis tab (SAXS 2D, G2, Twotime, etc.)
Results display in the interactive plot area
Key Shortcuts¶
Shortcut |
Action |
|---|---|
|
Open folder |
|
Reload data |
|
Command Palette |
|
Add to target |
|
View logs |
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
Load Data (Python API)¶
from xpcsviewer.xpcs_file import XpcsFile
# Open a multi-tau XPCS result file
xf = XpcsFile("/path/to/A001_Multitau_result.hdf")
# Display a summary of loaded attributes
print(xf)
# Access analysis type
print(f"Analysis type: {xf.atype}")
# Extract G2 data for all Q bins
q_values, t_el, g2, g2_err, labels = xf.get_g2_data()
# Restrict by Q and delay-time range
q_values, t_el, g2, g2_err, labels = xf.get_g2_data(
qrange=(0.01, 0.05),
trange=(0.1, 100),
)
Access SAXS Data¶
from xpcsviewer.xpcs_file import XpcsFile
xf = XpcsFile("data.hdf")
# 1D SAXS
q, Iq, xlabel, ylabel = xf.get_saxs1d_data()
# 2D SAXS
saxs_2d = xf.saxs_2d
Multi-File G2 Extraction¶
from xpcsviewer.module import g2mod
xf_list = [XpcsFile(f) for f in ["file1.h5", "file2.h5"]]
q, tel, g2, g2_err, labels = g2mod.get_data(xf_list)
See Also¶
Getting Started with XPCS Viewer – Step-by-step tutorial with explanations
Fitting G2 Correlation Functions – G2 fitting workflow
API Reference – Python API reference