Skip to content

Va interfaces - #64

Open
bhardwaj-gopika wants to merge 15 commits into
slaclab:mainfrom
bhardwaj-gopika:va_interfaces
Open

Va interfaces#64
bhardwaj-gopika wants to merge 15 commits into
slaclab:mainfrom
bhardwaj-gopika:va_interfaces

Conversation

@bhardwaj-gopika

Copy link
Copy Markdown
Contributor

PR for interface to use virtual accelerators for both LCLS and FACET.
Adds virtual_accelerator.registry — a single get_model() entry point replacing the per-model get_*_model builders, with a declarative table of what exists and how to configure it.

from virtual_accelerator.registry import get_model, models_available

print(models_available)
model = get_model("bmad_cu_hxr", end_ele="TD11")
model = get_model(["impact_cu_inj", "bmad_cu_hxr"], handoff_loc="YAG03", n_particles=1000)
model = get_model(["surrogate_f2e_inj", "bmad_f2_elec"], end_ele="PR10711")

Seven models registered: LCLS (impact_cu_inj, bmad_cu_hxr, surrogate_cu_inj, cheetah_cu_hxr) and FACET-II (impact_f2e_inj, surrogate_f2e_inj, bmad_f2_elec).

@bhardwaj-gopika

Copy link
Copy Markdown
Contributor Author

@pluflou @roussel-ryan

@bhardwaj-gopika
bhardwaj-gopika marked this pull request as draft September 8, 2026 16:54
@bhardwaj-gopika
bhardwaj-gopika marked this pull request as ready for review September 8, 2026 22:42

@roussel-ryan roussel-ryan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only had a chance to look at 1 file

Comment thread docs/model_registry_usage.md Outdated
impact_cu_inj ('YAG02', 'YAG03')
bmad_cu_hxr ('CATHODE', 'YAG02', 'YAG03', 'OTRH1', 'OTRH2', 'OTR1', 'OTR2', 'OTR3', 'OTR4', 'OTR11', 'OTR12', 'OTR21', 'OTRDMP', 'END')
surrogate_cu_inj ('OTR2',)
cheetah_cu_hxr ()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be populated

Comment thread docs/model_registry_usage.md Outdated
>>> list_models(facility="facet2")
['impact_f2e_inj', 'surrogate_f2e_inj', 'bmad_f2_elec']

>>> list_models(engine="bmad")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets use the 'simulator' nomenclature here and elsewhere since that is what is used in lume

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.

2 participants