Page 1 of 1

Randomizing the bunched_beam centroid[0] values

Posted: 29 Jan 2025, 12:43
by Nagaoka
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

Re: Randomizing the bunched_beam centroid[0] values

Posted: 24 Feb 2025, 14:36
by michael_borland
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

Re: Randomizing the bunched_beam centroid[0] values

Posted: 06 Mar 2025, 09:33
by Nagaoka
Dear Michael,

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

Ryutaro