Skip to content

Hide ViT patch tiles on iterative-only scans; tighten detector subtitle#6

Open
Garrett Bischof (gwbischof) wants to merge 2 commits into
mainfrom
fix/iterative-only-hide-vit-patch
Open

Hide ViT patch tiles on iterative-only scans; tighten detector subtitle#6
Garrett Bischof (gwbischof) wants to merge 2 commits into
mainfrom
fix/iterative-only-hide-vit-patch

Conversation

@gwbischof

Copy link
Copy Markdown
Collaborator

Summary

Two detail-view fixes in components/detail/holoptycho-viewer.tsx:

  1. Don't show ViT patch tiles on iterative-only scans. "ViT patch (amp)" and "ViT patch (phase)" read from <run>/diffraction/inference, which only exists when the ViT branch ran. Iterative-only runs have diffraction/dp but no inference, so those tiles were rendering empty/broken. Added a SourceInfo.hasInference flag (discovered by listing diffraction children, mirroring how hasVitAmp is detected under vit) and gate both tiles on it. The detector-frame grid collapses to a single column when the ViT patches are hidden.

  2. Tighten the detector-frame subtitle so it stops wrapping. Dropped the redundant frame word (the tile title is already "Detector frame") and shortened the stride note: frame 16 (latest) · 1 of every 4 frames16 (latest) · every 4.

Verification

  • npx tsc --noEmit passes.
  • Lint clean for the changed lines (a pre-existing Date.now() purity error elsewhere in the file is unrelated).

Notes

A --mode both run still shows the ViT patches (it has diffraction/inference); only iterative-only runs hide them.

- Detect <run>/diffraction/inference (the per-frame ViT patch output) via a
  new SourceInfo.hasInference flag, discovered like hasVitAmp. Iterative-only
  runs have diffraction/dp but no inference, so the 'ViT patch (amp)' and
  'ViT patch (phase)' tiles must not render for them.
- Gate both ViT patch tiles on hasInference and collapse the detector-frame
  grid to a single column when they are hidden.
- Simplify the detector-frame subtitle so it no longer wraps: drop the
  redundant 'frame' word (the tile title already says 'Detector frame') and
  shorten the stride note ('· 1 of every N frames' -> '· every N').
The tile header is a flex row (title left, subtitle right); a long subtitle
wrapped to a second line, making that tile's header taller and pushing its
image down out of alignment with the others. Keep the title from shrinking and
truncate the subtitle with an ellipsis (full text on hover) so the header is
always exactly one line. Also drop the redundant 'frame' word from the ViT
patch subtitles for consistency with the detector-frame tile.
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