Page 1 of 1

Closed orbit for off-momentum particles

Posted: 09 Jun 2020, 03:21
by dondreka
Dear all,

I'm having troubles getting the closed_orbit command to work with off-momentum particles.

What I'm trying to do is calculate orbit and Twiss for an off-momentum particle. There is one way I can get what I want, by inserting a MALIGN element and using its DP item to shift the momentum. This is demonstrated by the script dporbit_malign.ele in the attached archive.

However, I actually wanted to use a different approach, shifting the momentum using the CENTROID item of the bunched_beam command and then setting start_from_dp_centroid=1 in the closed_orbit command to set up the calculation of the off-momentum closed orbit. However, when I do this, I always end up with a zero orbit, no matter what I try. My failed attempt is demonstrated by the script dporbit.ele in the attached archive.

In both cases, I created bunch and output file to check the validity of my input parameters for the momentum shift. I set p_central to 1 and intend to apply a 5e-3 momentum shift. From the output files, which both indicate the momentum of the single particle I'm using as 1.005, those input parameters seem to be okay. Also, in the second case, I really do see an off-momentum track in the centroid file, which does, however, not coincide with the off-momentum orbit since the computed orbit appears to be zero.

I'm pretty sure I'm just missing something here, so any help on how I could get the off-momentum orbit to work using the centroid shift (as suggested by the documentation of the closed_orbit command) would be highly appreciated.

Thanks in advance and best regards
David

Re: Closed orbit for off-momentum particles

Posted: 10 Jun 2020, 18:00
by michael_borland
David,

The calculation starting from the beam centroids won't give you the result you want. Basically, the beam centroinds are only taken as a hint of the closed orbit location. It's not one of the more useful features in elegant, to be honest.

Is there a reason that the MALIGN approach isn't sufficient?

--Michael

Re: Closed orbit for off-momentum particles

Posted: 15 Jun 2020, 02:23
by dondreka
Dear Michael,

thanks for the clarification. I can certainly use the MALIGN approach. I don't remember exactly why I started trying the non-working approach. But I was probably misinterpreting the documentation on the start_from_dp_centroid item of the closed_orbit command in the Elegant, which says:

"[...] This can allow computing the closed orbit for an off-momentum beam, then starting the beam on that orbit using the offset_by_orbit or center_on_orbit parameters of the track command. [...]"

I mistook this as an indication that my failed attempt should have worked, which is basically why I asked the question.

Best regards
David