Conversation
- beam_monitor.py: make lattice_path optional in _create_cu_hxr_bmad_model (the arg is unused; MODELS dict calls factories with no args); add ModelImageSource alias for StagedModelImageSource - live_stream_monitor.py (local + k8s): import MODELS/MODEL_INFO; add a model_selector cell that creates model_dropdown; update header to be a full-width hstack with the title on the left and the model dropdown + ℹ️ hover-tooltip on the right; source_setup now passes model_dropdown.value to ModelImageSource so changing the dropdown recreates the source; both live_controls and interactive_controls filter OTR2 from screen options when cu_hxr_bmad is selected (bmad model starts at OTR2, no OTR2 output)
…theticLiveImageSource
- live_stream_monitor.py (local + k8s):
- Restore OTR2 in screen dropdowns (both tabs)
- Fix tooltip: use mo.Html() instead of mo.md() so the title attribute
is not stripped; use line separator and escape HTML special chars
in the description text so the attribute value is valid
- Add QUAD:IN20:631, QUAD:IN20:651, XCOR:IN20:641, YCOR:IN20:642 to
slider_labels (already in MANUAL_INPUT_PVS, sliders now have explicit
label entries)
- Guard zero-range sliders (XCOR/YCOR min=max=0): fall back to -0.1…0.1
so mo.ui.slider does not receive start==stop
- beam_monitor.py: delete unused SyntheticLiveImageSource class and its
companion default_manual_input_values helper
…-to-expand details
pluflou
added a commit
that referenced
this pull request
Apr 20, 2026
Merge pull request #2 from slaclab/bmad
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant updates to support multiple beamline models in the LUME Live Stream Monitor, adds user-facing model selection, and improves the safety and flexibility of model input handling. The changes touch both the deployment configuration and the Python codebase, enabling users to choose between different simulation models and ensuring the UI and backend logic support this flexibility.
Key changes include:
Multi-model support and UI enhancements
model_selectordropdown to the UI, allowing users to select between available models (cu_hxr_stagedandcu_hxr_bmad), and updated all relevant dashboard and control cells to use the selected model. Also added a model info popup for user guidance. [1] [2] [3] [4] [5] [6]StagedModelImageSourcetoModelImageSource, now parameterized by model name, and updated its instantiation throughout the codebase. [1] [2] [3]Model definitions and metadata
MODELSdictionary mapping model names to their constructors, and aMODEL_INFOdictionary providing descriptions for each model, to drive both backend selection and UI display.Deployment and configuration updates
bmadtag for images and branches instead of the previouspooltag, ensuring that the correct model versions are deployed and built. [1] [2]Safety and flexibility improvements
ModelImageSourceto ensure only appropriate scalars are extracted depending on the selected model, and removed unused or redundant methods. [1] [2] [3] [4]These changes collectively make the live monitor more robust, user-friendly, and adaptable to future model additions.