Skip to content

Conversation

@SimonHeybrock
Copy link
Member

@SimonHeybrock SimonHeybrock commented Jan 8, 2026

Summary

  • Extend wire and strip views to work with all DREAM detector banks (mantle, endcap_backward, endcap_forward, high_resolution, sans)
  • Add roi_support=False parameter to disable ROI functionality for aggregated views that don't need it
  • Fix crash in DetectorView when ROI code tried to access spatial coordinates on non-2D views
  • Exclude ROI outputs from workflow spec when roi_support=False, so the frontend only shows available outputs

New outputs look like this when plotted:

image

Test plan

  • All existing tests pass
  • New tests for roi_support=False behavior in DetectorView
  • New tests verifying spec outputs match roi_support setting

🤖 Generated with Claude Code

SimonHeybrock and others added 4 commits January 8, 2026 10:56
Extend wire_view to support mantle and both endcap detectors (which share
the same dimension structure). Extend strip_view to support all 5 detector
banks by making get_strip_view generic - it now sums over all dimensions
except 'strip' rather than hardcoding specific dimension names.

Prompt: Please consider the structure of DETECTOR_BANK_SIZES for the views
in dream/views.py - I think we could enable support for the wire view for
the 2 endcap banks, and the strip view for all 5 banks?

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The ROI readback publishing code in DetectorView.finalize() called
_get_detector_coord_units() unconditionally, which assumes 2D output.
This caused crashes for 1D views like strip_view and wire_view that
have roi_support=False.

Pass the roi_support flag through the factory chain so DetectorView
can skip ROI publishing when ROIs are not supported.

Prompt: A recent change that made DetectorView publish empty ROI info at start
seems to have introduced a bug: The code in question, including
`_get_detector_coord_units` seems to be called even if the view does not
support ROIs at all, and this raises, e.g., for views that return 1d output,
such as the 'strip_view', even though roi_support is set to `False`.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Views with roi_support=False were still showing ROI outputs in the
frontend because the workflow spec's outputs model always included
ROI fields regardless of the roi_support setting.

Split DetectorViewOutputs into DetectorViewOutputsBase (without ROI
fields) and DetectorViewOutputs (with ROI fields). Updated
make_detector_view_outputs() to accept roi_support parameter and
return the appropriate outputs class.

Add tests verifying spec outputs exclude ROI fields when
roi_support=False.

Prompt: DREAM wire_view and strip_view define roi_support=False, but
for some reason the frontend still shows the ROI output in the list
of available outputs. Is the option not forwarded correctly? Are we
missing a test?

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Base automatically changed from loki-wire-view to main January 9, 2026 08:25
@SimonHeybrock SimonHeybrock merged commit 2deed46 into main Jan 9, 2026
4 checks passed
@SimonHeybrock SimonHeybrock deleted the dream-views branch January 9, 2026 08:30
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.

3 participants