Skip to content

add bpms#36

Merged
roussel-ryan merged 3 commits into
mainfrom
bpms
May 29, 2026
Merged

add bpms#36
roussel-ryan merged 3 commits into
mainfrom
bpms

Conversation

@roussel-ryan
Copy link
Copy Markdown
Collaborator

This pull request adds and improves support for verifying and mapping Beam Position Monitor (BPM) process variables (PVs) in the BMAD virtual accelerator models. The main changes include enhancements to BPM element detection and mapping logic, as well as new tests to ensure BPM PVs are correctly exposed and mapped in the model.

BPM Support and Mapping Improvements:

  • Modified get_variables in virtual_accelerator/bmad/variables.py to explicitly handle BPMs by name, ensuring they are treated as BPMs even if their device type is generic (Monitor).
  • Updated get_tao_property in virtual_accelerator/bmad/cu_transformer.py to support returning BPM X and Y orbit positions (converted from meters to millimeters).

Testing Enhancements:

  • Added assert_bpm_pvs_match_tao_lattice utility in virtual_accelerator/tests/_bmad_model_test_utils.py to verify that all BPM lattice elements have corresponding PV mappings and that expected BPM PVs are present in the model's supported variables.
  • Integrated the new BPM assertion utility into the test suites for both CU-HXR and FACET models (test_cu_hxr.py and test_facet.py), adding dedicated tests to check BPM PV mappings. [1] [2] [3] [4]

@roussel-ryan roussel-ryan marked this pull request as ready for review May 29, 2026 23:49
@roussel-ryan roussel-ryan merged commit 2f141e8 into main May 29, 2026
20 checks passed
@roussel-ryan roussel-ryan deleted the bpms branch May 29, 2026 23:50
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