Skip to content

Num beta osc stage length#175

Draft
ben-c-2013 wants to merge 93 commits intomainfrom
num_beta_osc_stage_length
Draft

Num beta osc stage length#175
ben-c-2013 wants to merge 93 commits intomainfrom
num_beta_osc_stage_length

Conversation

@ben-c-2013
Copy link
Collaborator

@ben-c-2013 ben-c-2013 commented Dec 1, 2025

Adds the capability to tailor the length of Stage according to desired number of betatron oscillations. Also includes tests, but these require PR #174.

In addition, also includes functions for estimating the orbit of the drive beam when driver guiding with an external azimuthal magnetic field is applied to a drive beam with an anglar offset.

…gives a given number of main beam betatron oscillations.
…c() to calculate the number of betatron oscillations a particle can undergo in the stage.
… betatron oscillations that should be performed in the main flattop by subtracting the contributions from the ramps.
…d Stage.flattop_length2num_beta_osc() for calculating the number of betatron oscillations when the gradient is small (usually the case for ramps).
…fying Stage.flattop_length2num_beta_osc() and Stage.calc_flattop_num_beta_osc().
…ength_num_beta_osc() and removed unnecessary comments and imports in some of the beatron oscillation length and phase advance class methods.
… flattop lengths to match the number of betatron oscillations.
@ben-c-2013 ben-c-2013 added the enhancement New feature or request label Dec 1, 2025
@ben-c-2013 ben-c-2013 requested a review from kyrsjo December 1, 2025 16:42
…ield used for driver guiding in abel/classes/stage/impl/stage_hipace.py.
…moval of main source from setup_StageReducedModels().
…ipace._external_focusing_gradient when ramps can be set up for the case with ramps.
…ipace external_focusing_gradient getter and setter.
…gradient as None by default for Stage subclasses not supporting external driver guiding fields.
… set external_focusing_gradient to 0.0 when it is None.
… trajectory taking into the effect of acceleration, driver guiding and ion background focusing.
…m_trajectory(), added doc strings to StageHipace._estimate_beam_trajectory(), StageHipace.estimate_beam_trajectory() and edited StageHipace.driver_guiding_trajectory() so that its solver is based on the total number of time steps.
@kyrsjo
Copy link
Collaborator

kyrsjo commented Mar 11, 2026

Fikse conflicts før review?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants