Skip to content

[WIP] tracker - #863

Merged
giadarol merged 50 commits into
xsuite:mainfrom
rdemaria:amend-Tracker
Sep 27, 2026
Merged

giadarol merged 50 commits into
xsuite:mainfrom
rdemaria:amend-Tracker

Conversation

@rdemaria

Copy link
Copy Markdown
Contributor

Description

This is built on top of #797

Checklist

Mandatory:

  • I have added tests to cover my changes
  • All the tests are passing, including my new ones
  • I described my changes in this PR description

Optional:

  • The code I wrote follows good style practices (see PEP 8 and PEP 20).
  • I have updated the docs in relation to my changes, if applicable
  • I have tested also GPU contexts

silkevdschueren and others added 16 commits September 23, 2026 16:11
…test straight vs curved for a1, b1, bs that should spot this type of bugs
Expose FieldExpansion field evaluation API
Move the FieldExpansion implementation out of the removed elements.py module and export its factory and concrete classes through beam_elements. Extend the public import checks. Upstream now builds kernels directly from classes, so the removed element initialization table is no longer needed.
Use one concrete element with C-level straight and curved dispatch, cache-aware coefficient updates, integrated strengths, and read-only geometry. Support environment operations, reject unsupported radiation and spin tracking, and update examples and regression tests.

Add thick slices that share parent data and track their longitudinal interval. Preserve offsets when slicing again and cover tracking, backtracking, survey, and Twiss strengths.
Comment thread xtrack/beam_elements/bfield_expansion.py Outdated
Comment thread xtrack/beam_elements/bfield_expansion.py
Comment thread xtrack/beam_elements/bfield_expansion.py Outdated
Comment thread xtrack/beam_elements/bfield_expansion.py Outdated
Comment thread xtrack/tracker.py Outdated
Add zero-filled optional coefficients, common field scaling, and explicit
uniform normal/skew strengths with cache-aware updates. Derive read-only
profile order and allocation metadata from the coefficient arrays.

Use integrator and num_integration_steps, remove the nstep alias, and
update examples and environment expressions. Support standard magnet
misalignments for elements and thick slices, clean serialization, and
xobject wrapping. Include scalar contributions in Twiss strengths once.

Update coverage for construction, scaling, lifecycle, misalignments,
slicing, and strength extraction; remove obsolete radiation/spin guard tests.

Validation: 164 tests passed, 4 skipped; example smoke checks passed.
@giadarol
giadarol merged commit 0c33ed7 into xsuite:main Sep 27, 2026
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.

3 participants