Conversation
Replace 72 scattered setStyleSheet() calls across 23 files with a single global stylesheet and shared color/font constants. Standardizes the palette (6 greens → 1, 7 reds → 1, etc.), establishes a 5-tier font hierarchy, and uses palette() for dark mode awareness. Strips hardcoded styles from 4 .ui files. Preserves semantic ROI identity and HKL axis colors as instrument conventions.
… files Strip ~50 redundant pointsize declarations from imageshow.ui (all inherited from root), ~40 from hkl_3d_slice_window.ui, and child font blocks from 3 other .ui files. Remove restrictive maximumSize on scroll area (was 425px), stats labels, and Plot Stats buttons. Relax Start/Stop Live View button minimumSize to prevent text cropping on resize. Reduce HKL 3D viewer minimum width from 1125 to 600. Total: -641 lines of redundant layout constraints.
Replace all px font-size values with pt in theme.qss and theme_colors.py to fix QFont::setPointSizeF warnings on macOS high-DPI displays. Add spacer to exit/shutdown QMessageBox dialogs to prevent text cropping.
Eliminates QFont::setPointSizeF warnings on macOS high-DPI by converting every font-size from px to pt in launcher.ui, dashpva.ui, update_dialog.ui, settings_dialog.ui, workbench.ui, workflow.ui, bayesian_viewer.py, and documentation/dialog.py.
- Add INPUT_CHANNEL to settings.py with get_input_channel() that derives from DETECTOR_PREFIX when not explicitly set - Add save_input_channel() to persist overrides to active config - Persist locator to .dashpva_locator so sibling subprocesses (launcher → workflow → viewer) share the active config - Fix DbProfileConfigSource.save() to merge instead of replace - Wire ConfigDialog in area_det_viewer and hkl_3d_viewer to read/save channel via settings - Update vit_viewer and scan_view to use settings fallback - Clear hardcoded default in pv_config.ui - Fix launcher exit to kill process groups via os.killpg
- Resolve sim server path relative to PROJECT_ROOT and use sys.executable instead of bare 'python' - Add 9 new tests for state file fallback, get_input_channel, and save_input_channel round-trip persistence - Fix test isolation: neutralize _STATE_FILE and DB fallback in isolated_settings fixture
ROI, Stats, and Metadata CA monitors now execute in a CaMonitorWorker QThread instead of blocking the main thread during start_live_view.
- Rename Streaming → Stream Live in launcher registry - Improve launcher text/button contrast (palette(mid) → palette(dark)) - Add ROI_COLORS, ROI_STATS_COLORS, LOG_* to theme_colors.py - Soften ROI palette (coral/ocean/teal/violet) across theme.qss and Python - Replace hardcoded color keywords (green/red/gray/orange) with constants - Reuse status palette for log and workflow output formatting
- Wrap /proc/stat read in try/except so workbench doesn't spam errors on macOS - Fix processor file combo paths to include src/dashpva/ prefix so launches resolve correctly from PROJECT_ROOT after the src layout restructure
Osayi-ANL
left a comment
There was a problem hiding this comment.
- ROI and Stats does not get plotted in the area detector or being calculated
- The channel input persistence for the HKL3D and Area Detector are connected so it updates both. Disconnect it so that one doesnt update the other
- The analysis processor gives an error
2026-05-14 17:15:50,316 HpcRsmProcessor ERROR: Frame processing error Traceback (most recent call last): File "/home/beams0/OODIASEIGIEHON/DashPVA/src/dashpva/consumers/hpc/analysis/hpc_rsm_consumer.py", line 397, in process 'parameters': self.codec_parameters}, ^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'HpcRsmProcessor' object has no attribute 'codec_parameters' - The HKL3D Start and Stop Live View text in the buttons are still cut off - All the buttons and UI colors are good and updated
Area Detector dialog now shows "Detector Prefix" instead of "Input Channel", pre-populates from TOML/DB, and derives the PVA channel automatically. Prefix changes rewrite ROI/STATS PV names and persist to the config source. HKL 3D dialog unchanged — keeps asking for Input Channel separately.
Review Items Addressed1. ROI/Stats not plotting: ConfigDialog now asks for Detector Prefix (not Input Channel). It pre-populates from the loaded profile and auto-derives the PVA channel. ROI/Stats PV names update when prefix changes. 2. HKL3D/Area Detector channel linked: Separated — each has its own persisted channel. Changing one no longer affects the other. 3. HpcRsmProcessor AttributeError: Initialized all codec attributes in 4. HKL3D button text cut off: Removed fixed widths so buttons expand to fit text. To test
|
Osayi-ANL
left a comment
There was a problem hiding this comment.
- hpc_rsm_analysis.pywhen I try to run the analysis
2026-05-15 17:09:30,495 HpcRsmProcessor ERROR: Frame processing error Traceback (most recent call last): File "/path/to/user/DashPVA/src/dashpva/consumers/hpc/analysis/hpc_rsm_consumer.py", line 421, in process rsm_object = {'name': 'RSM', 'value': PvObject({'value': self.type_dict_compressed}, {'value': rsm_data})} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pvaccess.pvaccess.InvalidDataType: Inconsistent data type: expected uint8, found object.
- Race Condition in area_detector_veiwer.py that doesn't allow for plotting.
We want to get the ROI's and then draw the rectangles, but sometimes the rectangles are drawn before the ROI values are gotten because the thread didn't finish fast enough, but the add_roi() doesn't get called again to then draw the rectangles again.
This results in roi not being plotted(my case)
Guard create_rsm() None returns to prevent np.ravel(None) producing object-dtype arrays. Skip frames before codec/qx are initialized. Re-add ROIs after CaMonitorWorker finishes fetching values via CA.
|
Fixed in cb62a67. InvalidDataType: Added None guards after ROI race condition: |
Summary
Centralize PV input channel with cross-process persistence.
INPUT_CHANNELis now derived fromDETECTOR_PREFIX(e.g.{prefix}:Pva1:Image) and persisted across viewer processes via a state file. Stats and ROI PVs are constructed from the same prefix. Once set — whether from TOML, DB profile, or typed manually — the channel persists across all viewers without retyping.Move CA monitors to a background thread. ROI, Stats, and Metadata CA monitors previously ran sequentially on the main GUI thread, causing 8+ second freezes when PVs were unreachable. They now run in a
CaMonitorWorker(QThread)so the GUI remains responsive during connection.Consolidate UI colors into a centralized theme system. Introduced
theme_colors.pyas the single source of truth andtheme.qssas the global stylesheet. Replaced hardcoded hex values and CSS color keywords ("red","green","gray","orange") across 12+ files with shared constants. ROI overlays use a soft modern palette (coral#E05A5A, ocean#4A90D9, teal#3EAF8E, violet#A878D0) — distinct and readable on dark detector images without the harshness of pure primaries.Improve launcher readability. Renamed "Streaming" section to "Stream Live". Improved contrast on section headers, buttons, and status labels by replacing
palette(mid)withpalette(dark)/palette(window-text).Fix font sizing and path resolution. Replaced all
pxfont sizes withptto avoid macOS high-DPI warnings. Fixed sim server and processor file paths after thesrc/layout restructure. Fixed/proc/staterror spam on macOS.Test plan
{DETECTOR_PREFIX}:Pva1:Imagesrc/dashpva/...paths/proc/staterror spam in logs on macOSpytest tests/— 119 tests pass