Skip to content

Honour lattice_names when a linker is configured (#429) - #431

Merged
GamelinAl merged 1 commit into
mainfrom
429-lattice-names-with-linker
Sep 17, 2026
Merged

GamelinAl merged 1 commit into
mainfrom
429-lattice-names-with-linker

Conversation

@GamelinAl

Copy link
Copy Markdown
Member

With a linker on the simulator, Simulator.get_at_elems resolved a PyAML element only through the linker identifier built from the element name and ignored the lattice_names selector, so one PyAT element could not be driven by several PyAML elements (e.g. a serialized sextupole and the corrector coils sitting on the same thick element).

  • LatticeElementsLinker.get_identifier_for_name(name): identifier for a name of a lattice_names selector (implemented by the attribute linker)
  • Simulator.get_at_elems: with a linker, support list(a,b), [name]@i,j and [name]#a..b (bare @/# index the whole ring) through the linker
  • document that name refers to the linker attribute when a linker is used
  • tests: simulator-level selector tests on a Tag-linked lattice and the EBSNames addressing test parametrized with an equivalent linker config

Fixes #429

With a linker on the simulator, Simulator.get_at_elems resolved a PyAML
element only through the linker identifier built from the element name
and ignored the lattice_names selector, so one PyAT element could not be
driven by several PyAML elements (e.g. a serialized sextupole and the
corrector coils sitting on the same thick element).

- LatticeElementsLinker.get_identifier_for_name(name): identifier for a
  name of a lattice_names selector (implemented by the attribute linker)
- Simulator.get_at_elems: with a linker, support list(a,b), [name]@i,j
  and [name]#a..b (bare @/# index the whole ring) through the linker
- document that name refers to the linker attribute when a linker is used
- tests: simulator-level selector tests on a Tag-linked lattice and the
  EBSNames addressing test parametrized with an equivalent linker config

Fixes #429

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@JeanLucPons

Copy link
Copy Markdown
Member

Thanks for doc clarification and fix for linker !

@GamelinAl
GamelinAl merged commit 6091ea7 into main Sep 17, 2026
4 checks passed
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.

Bug: lattice_names is ignored when a linker is configured on the simulator

3 participants