Skip to content

Add momentum_aperture method to Line class#751

Open
gbrogginess wants to merge 12 commits intoxsuite:mainfrom
gbrogginess:momentum_aperture
Open

Add momentum_aperture method to Line class#751
gbrogginess wants to merge 12 commits intoxsuite:mainfrom
gbrogginess:momentum_aperture

Conversation

@gbrogginess
Copy link
Contributor

Description

This PR introduces a new method:

line.momentum_aperture(...)

to compute the local momentum aperture (also referred to as local momentum acceptance, LMA) along a beamline by tracking particles with varying momentum offsets from selected elements.

The method evaluates, for each selected longitudinal location, the maximum stable negative and positive momentum deviations (δ) over a configurable number of turns.

For each location, particles are generated around the local closed orbit, a grid of momentum offsets is applied, and particles are tracked to determine the largest surviving negative and positive δ values.

The output is returned as an xt.Table indexed by longitudinal position s.

This feature is important because the local momentum acceptance is a key quantity for Touschek and quantum lifetime studies and their optimization.

A dedicated test suite covering this new functionality has been added.

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

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