Skip to Content.
Sympa Menu

opal - Re: [Opal] Ks and Ksc frame

opal AT

Subject: The OPAL Discussion Forum

List archive

Re: [Opal] Ks and Ksc frame

Chronological Thread 
  • From: Arnau Albà <arnau.alba AT>
  • To: piot AT
  • Cc: opal AT
  • Subject: Re: [Opal] Ks and Ksc frame
  • Date: Mon, 6 Jan 2020 06:01:00 +0100
  • Authentication-results: localhost; iprev=pass ( smtp.remote-ip=; spf=pass; dmarc=none

Hi Philippe,

I will answer to the best of my knowledge.

Ks is a coordinate system attached to the reference particle (a.k.a. design particle), with its z-axis in the same direction as the momentum of the reference particle.
The bunch will follow a trajectory similar to the design trajectory, but not exactly the same. That is why there is another coordinate system Ksc, which is at the center of the bunch and whose z-axis is aligned with the mean momentum of the bunch

At each time-step OPAL pushes both the reference particle and the particles in the bunch, so both Ks and Ksc are updated at each time-step.

The rotation that is applied to the z-axis when transforming Ks->Ksc is the same rotation that is applied to the x and y axes. So the x and y axes are not specifically aligned according to the correlations in the bunch. 

Regarding your plots from the dogleg example:
You can find what each output from the stat file means in the documentation
In your case you are plotting mean_x, which is the bunch mean position relative to the reference particle (i.e. in the Ks coordinate system), and that is the reason for those kinks that you observe at each dipole. If you want to see the trajectory of a particle through the dogleg in the lab coordinate system, you could for example plot ref_x.


I hope that answers your questions.

Best regards,

Arnau Albà

On Fri, 3 Jan 2020 at 12:24, Philippe Piot <piot AT> wrote:
Dear All,
  I would like to clarify how the Ksc is found (sorry these may be very naive questions).
1/ I do not understand the statement in the user manual Sec "... coincides with the mean position of the particles and the mean momentum is parallel to z". I understand Ksc origin coincides with the bunch center but I would expect a statement on the basis vectors orientation. I take it from the statement that Ksc is generally aligned with (x,y,z) if the beam is moving rectilinearly?
2/ In fact, and in general, it appears from Fig. 6.2 that Ksc is rotated so that its "longitudinal" basis vector aligns with the local tangent of the reference trajectory? Though I do not get why Ksc is not exactly on Ks as the flow diagram of sec. 6.6 seems to imply.

  Finally what happened in the case of a beam with a strong spatial correlation between two degrees of freedom? For instance, I have a flat beam with a strong correlation in (x,y) is the Ksc frame rotated accordingly to ensure the cartesian space-charge grid is optimally matched to the principal axis of the beam?

  Thank you very much. All the best,  -- Philippe.

Philippe Piot,
Northern Illinois University, Dept of Physics and
Northern Illinois Center for Accelerator & Detector Development
DeKalb, IL 60115, USA
Tel: 815 753 6473, Web:

Argonne National Laboratory, Advanced Photon Source
Accelerator System Division
Lemont, IL 60439, USA
Tel: 630 252 2415, Web: 

Archive powered by MHonArc 2.6.19.

Top of Page