Randomizing the bunched_beam centroid[0] values

Moderators: cyao, michael_borland

Post Reply
Nagaoka
Posts: 16
Joined: 27 Oct 2022, 08:44

Randomizing the bunched_beam centroid[0] values

Post by Nagaoka » 29 Jan 2025, 12:43

Dear Michael,

Is there a way to ask elegant to generate random errors on the bunched_beam centroid[0] values to set up random initial tranejctory values in performing trajectory corrections in a transferline, instead of the user preparing a set of random initial values and entering them one by one and run elegant?

I thank you in advance for your kind feedback and I am sorry if this was a non-appropriate (silly) question.

Ryutaro

michael_borland
Posts: 2006
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: Randomizing the bunched_beam centroid[0] values

Post by michael_borland » 24 Feb 2025, 14:36

Ryutaro,

Yes, you can add a MALIGN (misalignment) element at the beginning of the beamline and then use the error_element command to add errors to it.

E.g.,

Code: Select all

...
MALINPUT: MALIGN
BL: line=(MALINPUT, ...)

Code: Select all

&error_element name=MALINPUT, item=DX, amplitude=0.1e-3, cutoff=2
&error_element name=MALINPUT, item=DXP, amplitude=0.1e-3, cutoff=2
&error_element name=MALINPUT, item=DY, amplitude=0.1e-3, cutoff=2
&error_element name=MALINPUT, item=DXP, amplitude=0.1e-3, cutoff=2
would impart 0.1 mm rms and 0.1 mrad rms errors in x and y, with a 2-sigma cutoff.

--Michael

Nagaoka
Posts: 16
Joined: 27 Oct 2022, 08:44

Re: Randomizing the bunched_beam centroid[0] values

Post by Nagaoka » 06 Mar 2025, 09:33

Dear Michael,

I thank you very much for showing me how my wished manipulation can be realized.

Ryutaro

Post Reply