Twiss Transport (Twiss)
Twiss computes uncoupled transverse transport from entrance and exit optical functions and phase advances, with optional longitudinal linear maps and chromatic phase corrections. Coordinate, reference-momentum, and arrival-time conventions are defined in Longitudinal coordinate and reference time.
The supplied optics already contains design focusing; additional magnets apply additional effects and must not double-count it. Transverse beta functions must be positive. Mu is in cycles (1 corresponds to 2π); retain the full required phase difference. The drift mode needs the bunch transition gamma, while matrix requires positive bunch length and relative momentum spread.
Usage Example
The following JSON snippet shows a Twiss entry inside Sequence:
"Twiss1": {
"S (m)": 10.0,
"Command": "Twiss",
"S previous (m)": 5.0,
"Alpha x": 0.5,
"Alpha y": -0.3,
"Alpha x previous": 0.4,
"Alpha y previous": -0.2,
"Beta x (m)": 3.5,
"Beta y (m)": 2.8,
"Beta x previous (m)": 3.0,
"Beta y previous (m)": 2.5,
"Mu x": 0.123,
"Mu y": 0.456,
"Mu x previous": 0.1,
"Mu y previous": 0.4,
"Dx (m)": 0.5,
"Dx previous (m)": 0.3,
"Dpx": 0.01,
"Dpx previous": 0.005,
"DQx": 2.0,
"DQy": 2.0,
"Longitudinal transfer": "drift"
}
Interface parameters
Python attribute |
JSON key |
Unit |
Default |
Description |
|---|---|---|---|---|
|
|
m |
Required |
Exit position. |
|
|
— |
|
Command identifier. |
|
|
m |
Required |
Entrance position; the difference gives transport length. |
|
|
— |
Required |
Exit horizontal Twiss α. |
|
|
— |
Required |
Exit vertical Twiss α. |
|
|
m |
Required |
Positive exit horizontal Twiss β. |
|
|
m |
Required |
Positive exit vertical Twiss β. |
|
|
cycles |
Required |
Exit horizontal phase. |
|
|
cycles |
Required |
Exit vertical phase. |
|
|
cycles |
|
Exit longitudinal phase. |
|
|
m |
Required |
Exit horizontal position dispersion. |
|
|
— |
Required |
Exit normalized horizontal momentum dispersion. |
|
|
— |
Required |
Entrance horizontal Twiss α. |
|
|
— |
Required |
Entrance vertical Twiss α. |
|
|
m |
Required |
Positive entrance horizontal Twiss β. |
|
|
m |
Required |
Positive entrance vertical Twiss β. |
|
|
cycles |
Required |
Entrance horizontal phase. |
|
|
cycles |
Required |
Entrance vertical phase. |
|
|
cycles |
|
Entrance longitudinal phase. |
|
|
m |
|
Entrance horizontal position dispersion. |
|
|
— |
|
Entrance normalized horizontal momentum dispersion. |
|
|
— |
|
Horizontal chromatic phase coefficient for this segment. |
|
|
— |
|
Vertical chromatic phase coefficient for this segment. |
|
|
— |
|
|
Output and scope
The command updates particle coordinates and reference passage time but writes no diagnostic file. Place a monitor from Monitors and output at its exit to record the result. The transverse model includes neither x–y coupling nor vertical dispersion. Nonzero DQx or DQy makes phase depend on relative momentum deviation, so the full map is not a fixed six-dimensional linear matrix.
DQx and DQy are applied directly to this segment; no additional segment-length/circumference factor is applied. They must be consistent with the supplied optics and any additional nonlinear elements.
Hand-written runtime JSON may include Aperture type and Aperture value (defaults off and []), but TwissItem does not currently export these fields. When using the parameter builder, place an aperture-bearing Marker at the same location; see Aperture.
Physics Derivation
Longitudinal Transport
The central longitudinal map, between the entrance and exit dispersion transformations below, is controlled by the Longitudinal transfer parameter and supports three modes:
drift mode : Uses the gamma transition parameter. The longitudinal transport matrix element is:
where \(\gamma_t\) is the transition gamma, \(\gamma\) is the bunch reference-particle Lorentz factor, \(s\) is the current longitudinal position, and \(s_\mathrm{previous}\) is the longitudinal position of the previous element.
matrix mode : Uses the prescribed longitudinal phase advance. The transport matrix is:
where \(\phi_z\) is the longitudinal phase advance, \(\sigma_z\) is the bunch longitudinal size, and \(\sigma_\delta\) is the configured RMS relative momentum spread.
off mode : The central longitudinal transport matrix is the identity matrix. With nonzero dispersion, the entrance and exit companion terms can still change stored z.
Dispersion Handling
Since the transverse transport matrix describes only the non-dispersive part of the motion, dispersion must be removed before transport and restored after. These energy-dependent coordinate transformations also have longitudinal companion terms. For the canonical energy \(\eta=(E-E_\mathrm{ref})/(\beta_0P_0c)\), define
Here \(\beta_0\) and \(\gamma_0\) describe the current bunch reference particle; \(g(0)=1\). The transformations are:
Remove dispersion at the previous point :
Apply the prescribed transport :
The central longitudinal map acts on \((z_\beta,\delta)\):
The transverse map uses the entrance momentum deviation \(\delta\) for its chromatic phase:
Add dispersion at the new point :
where \(D_x\) is the horizontal dispersion at the current point, \(D_{x,\mathrm{previous}}\) is the horizontal dispersion at the previous point, and \(\delta\) is the relative particle momentum deviation.
For zero betatron amplitude on the prescribed dispersion orbit, both companion terms vanish; the existing drift slip set by \(\gamma_t\) is retained. In matrix mode, the entrance correction can also change \(\delta_2\) and hence the restored transverse dispersion.
These terms complete the dispersion coordinate transformations, not the full six-dimensional symplectic map: the action-dependent flight-time term associated with DQx/DQy is not included, and matrix retains its linear map in \((z_\beta,\delta)\) rather than canonical energy at finite momentum deviation.
Transverse Transport Matrix
The transverse transport matrix is expressed in terms of the Twiss parameters and phase advance at the previous and current points. Taking the horizontal direction as an example:
where \(\beta_x\) and \(\alpha_x\) are the horizontal Twiss parameters at the current point, \(\beta_{x,\mathrm{prev}}\) and \(\alpha_{x,\mathrm{prev}}\) are the horizontal Twiss parameters at the previous point, and \(\phi_x\) is the horizontal phase advance between the two points.
The transport matrix for the vertical direction (y) has exactly the same form; simply replace the subscript x with y.
Chromaticity Correction
Momentum deviation causes tune shifts, which are corrected through the chromaticity parameters:
where \(\Delta Q_x\) and \(\Delta Q_y\) are the horizontal and vertical chromaticities, respectively, and \(\delta\) is the relative particle momentum deviation.
Longitudinal Coordinate Continuity
Stored z remains continuous, retaining multi-turn slip. Physical arrival time is \(t_i=T_b-z_i/(\beta_b c)\) using the current reference event; nominal slot offsets do not enter this reconstruction.
t0 Update
The reference time t0 is updated based on the longitudinal position change:
where \(\beta\) is the normalized reference-particle speed and \(c\) is the speed of light.
Phase and momentum notation
Momentum deviation in these equations is the dimensionless \(\delta=P/P_0-1\), not an absolute momentum increment. Before chromatic correction, \(\phi_u=2\pi(\mu_u-\mu_{u,\mathrm{previous}})\). The longitudinal matrix map uses the configured RMS bunch length and relative momentum spread; it does not recompute them from the current particle distribution.