at.physics.orbit#
Closed orbit related functions
Functions
|
Gets the 4D closed orbit for a given dp |
|
Gets the 4D closed orbit for a given dct |
|
Gets the closed orbit in the full 6-D phase space |
|
Gets the closed orbit in the general case |
- find_orbit(ring, refpts=None, **kwargs)[source]#
Gets the closed orbit in the general case
Depending on the lattice,
find_orbit()
will:use
find_orbit6()
ifis_6d
isTrue
,use
find_sync_orbit()
ifis_6d
isFalse
and dct or df is specified,use
find_orbit4()
otherwise.
- Parameters:
- Keyword Arguments:
orbit (Orbit) – Avoids looking for initial the closed orbit if it is already known.
find_orbit()
propagates it to the specified refpts.df (float) – Deviation from the nominal RF frequency. Defaults to
None
guess (Orbit) – (6,) initial value for the closed orbit. It may help convergence. Default: (0, 0, 0, 0, 0, 0)
convergence (float) – Convergence criterion. Default:
DConstant.OrbConvergence
max_iterations (int) – Maximum number of iterations. Default:
DConstant.OrbMaxIter
XYStep (float) – Step size. Default:
DConstant.XYStep
DPStep (float) – Momentum step size. Default:
DConstant.DPStep
For other keywords, refer to the underlying methods
- Returns:
orbit0 – (6,) closed orbit vector at the entrance of the 1-st element (x,px,y,py,dp,0)
orbit – (Nrefs, 6) closed orbit vector at each location specified in refpts
See also
- find_orbit4(ring, dp=None, refpts=None, *, dct=None, df=None, orbit=None, keep_lattice=False, **kwargs)[source]#
Gets the 4D closed orbit for a given dp
Finds the closed orbit in the 4-d transverse phase space by numerically solving for a fixed point of the one turn map M calculated with
internal_lpass()
.under the CONSTANT MOMENTUM constraint dp and with NO constraint on the 6-th coordinate
Important
find_orbit4()
imposes a constraint on dp and relaxes the constraint on the revolution frequency. A physical storage ring does exactly the opposite: the momentum deviation of a particle on the closed orbit settles at the value such that the revolution is synchronous with the RF cavity:To impose this artificial constraint in
find_orbit4()
, thePassMethod
used for any element SHOULD NOT:Change the longitudinal momentum dp (cavities , magnets with radiation)
Have any time dependence (localized impedance, fast kickers etc)
- Parameters:
dp (float) – Momentum deviation. Defaults to 0
refpts (Type[Element] | Element | Callable[[Element], bool] | str | None | int | Sequence[int] | bool | Sequence[bool] | RefptsCode) – Observation points. See “Selecting elements in a lattice”
dct (float) – Path lengthening. If specified, dp is ignored and the off-momentum is deduced from the path lengthening.
df (float) – Deviation from the nominal RF frequency. If specified, dp is ignored and the off-momentum is deduced from the frequency deviation.
orbit (ndarray) – Avoids looking for initial the closed orbit if it is already known ((6,) array).
find_orbit4()
propagates it to the specified refpts.keep_lattice (bool) – Assume no lattice change since the previous tracking. Default: False
- Keyword Arguments:
guess (Orbit) – (6,) initial value for the closed orbit. It may help convergence. Default: (0, 0, 0, 0, 0, 0)
convergence (float) – Convergence criterion. Default:
DConstant.OrbConvergence
max_iterations (int) – Maximum number of iterations. Default:
DConstant.OrbMaxIter
XYStep (float) – Step size. Default:
DConstant.XYStep
- Returns:
orbit0 – (6,) closed orbit vector at the entrance of the 1-st element (x,px,y,py,dp,0)
orbit – (Nrefs, 6) closed orbit vector at each location specified in refpts
See also
- find_orbit6(ring, refpts=None, *, orbit=None, keep_lattice=False, **kwargs)[source]#
Gets the closed orbit in the full 6-D phase space
Finds the closed orbit in the full 6-D phase space by numerically solving for a fixed point of the one turn map M calculated with
internal_lpass()
with constraint
Important
find_orbit6()
is a realistic simulation:The requency in the RF cavities
(may be different from ) imposes the synchronous condition ,The algorithm numerically calculates the 6-by-6 Jacobian matrix J6. In order for (J-E) matrix to be non-singular it is NECESSARY to use a realistic
PassMethod
for cavities with non-zero momentum kick (such asRFCavityPass
).find_orbit6()
can find orbits with radiation. In order for the solution to exist the cavity must supply an adequate energy compensation. In the simplest case of a single cavity, it must haveVoltage
set so that , the energy loss per turnThere is a family of solutions that correspond to different RF buckets They differ in the 6-th coordinate by
, Nb = 0:h-1The value of the 6-th coordinate found at the cavity gives the equilibrium RF phase. If there is no radiation it is 0.
dp
,dct
anddf
arguments are applied with respect to the NOMINAL on-momentum frequency. They overwrite exisiting frequency offsets
- Parameters:
ring (Lattice) – Lattice description
refpts (Type[Element] | Element | Callable[[Element], bool] | str | None | int | Sequence[int] | bool | Sequence[bool] | RefptsCode) – Observation points
orbit (ndarray) – Avoids looking for initial the closed orbit if it is already known ((6,) array).
find_sync_orbit()
propagates it to the specified refpts.keep_lattice (bool) – Assume no lattice change since the previous tracking. Default: False
- Keyword Arguments:
guess (Orbit) – (6,) initial value for the closed orbit. It may help convergence. Default: (0, 0, 0, 0, 0, 0)
convergence (float) – Convergence criterion. Default:
DConstant.OrbConvergence
max_iterations (int) – Maximum number of iterations. Default:
DConstant.OrbMaxIter
XYStep (float) – Step size. Default:
DConstant.XYStep
DPStep (float) – Momentum step size. Default:
DConstant.DPStep
method (ELossMethod) – Method for energy loss computation. See
ELossMethod
.cavpts (Refpts) – Cavity location. If
None
, use all cavities. This is used to compute the initial synchronous phase.
- Returns:
orbit0 – (6,) closed orbit vector at the entrance of the 1-st element (x,px,y,py,dp,0)
orbit – (Nrefs, 6) closed orbit vector at each location specified in refpts
See also
- find_sync_orbit(ring, dct=None, refpts=None, *, dp=None, df=None, orbit=None, keep_lattice=False, **kwargs)[source]#
Gets the 4D closed orbit for a given dct
Finds the closed orbit, synchronous with the RF cavity (first 5 components of the phase space vector) by numerically solving for a fixed point of the one turn map M calculated with
internal_lpass()
under the constraint
, where is the design revolution frequency and is the imposed revolution frequency.Important
find_sync_orbit()
imposes a constraint and but no constraint on the value of or . The algorithm assumes time-independent fixed-momentum ring to reduce the dimensionality of the problem.To impose this artificial constraint in
find_sync_orbit()
, thePassMethod
used for any element SHOULD NOT:Change the longitudinal momentum dp (cavities , magnets with radiation)
Have any time dependence (localized impedance, fast kickers etc)
- Parameters:
dct (float) – Path lengthening.
refpts (Type[Element] | Element | Callable[[Element], bool] | str | None | int | Sequence[int] | bool | Sequence[bool] | RefptsCode) – Observation points. See “Selecting elements in a lattice”
df (float) – Deviation from the nominal RF frequency. If specified, dct is ignored and the off-momentum is deduced from the frequency deviation.
orbit (ndarray) – Avoids looking for initial the closed orbit if it is already known ((6,) array).
find_sync_orbit()
propagates it to the specified refpts.keep_lattice (bool) – Assume no lattice change since the previous tracking. Default: False
- Keyword Arguments:
guess (Orbit) – (6,) initial value for the closed orbit. It may help convergence. Default: (0, 0, 0, 0, 0, 0)
convergence (float) – Convergence criterion. Default:
DConstant.OrbConvergence
max_iterations (int) – Maximum number of iterations. Default:
DConstant.OrbMaxIter
XYStep (float) – Step size. Default:
DConstant.XYStep
- Returns:
orbit0 – (6,) closed orbit vector at the entrance of the 1-st element (x,px,y,py,dp,0)
orbit – (Nrefs, 6) closed orbit vector at each location specified in refpts
See also