Skip to content

Refactor area detector into per-dock module structure#82

Open
Osayi-ANL wants to merge 7 commits into
mainfrom
dev
Open

Refactor area detector into per-dock module structure#82
Osayi-ANL wants to merge 7 commits into
mainfrom
dev

Conversation

@Osayi-ANL
Copy link
Copy Markdown
Collaborator

What changed

Major refactor of the area detector viewer. The monolithic area_det_viewer.py was split into a package under src/dashpva/viewer/area_det/, with each panel extracted into its own dock module (docks/image_dock.py, docks/roi_dock.py, docks/stats_dock.py, docks/mask_dock.py, docks/mouse_pos_dock.py, docks/analysis_dock.py). The CLI entry point now resolves to the new path. Subsequent commits on the branch are layered on top of this restructure:

  • Initial refactor: new file structure, dock split, CLI rewired, dock header theming
  • Dock header theme color + test_cli to exercise the CLI button surface
  • Dock theming polish, PV channel area det switching cleanup, per-curve toggles in the stats plot,
  • removal of HKL Viewer/Save buttons from the image dock in area_det
  • Removed a stale HKL-clear comment block in the PV-channel switch path

Test plan

  • Launch the area detector via the CLI — confirm it lands on the new area_det_viewer.py and the window opens with stats, mouse position, and mask docks initially
  • Start Live View against a known PV channel — image renders, stats labels update, ROI overlays appear
  • Switch the PV channel mid-session — HKL/ROI/Stats monitors rebind cleanly, no duplicate callbacks, no "Missing PV data" spam, no orphaned overlays
  • Stop Live View — timers stop, no stale callbacks left attached
  • Plot Stats - Toggle each stat visibility in the stats plot
  • Drag/resize/rearrange docks — dock headers render with the themed color and titles stay readable in both light and dark system themes
  • Confirm the image dock no longer shows the removed HKL Viewer/Save buttons
  • pytest tests/unit/test_cli.py passes -- because we changed the area_det structure it passes

Osayi-ANL added 6 commits May 22, 2026 15:20
- Area detector in a new file structure
- Area detector includes docks
- cli points to new area_detector_viewer.py file
- Dock Header theme

add: roi and stats pv's are hardcoded in pva_reader.py
add: test_cli to test the cli buttons run
…urve toggles in stats plot; drop HKL Viewer/Save buttons from image dock
@Osayi-ANL Osayi-ANL requested a review from pecomyint May 26, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant