Dear Elegant users and experts,
we had some problems using link_elements and I hope to find some help here in the forum.
Many of the quads in our beamline are split in two halfs in order to be able to position a marker in the center (the markers represent strip line BPMs). The two halfs are indicated with the suffixes .U (upstream) and .D (downstream). The plan was to link the strength of the second half of the quad to the strength of its first half.
It turned out that the quadrupole strength is correctly listed in the parameter file (which I get from run_setup) after the elegant run. However, when I plot the twiss functions using sddsplot, it is clearly visible that the second half of the quads is still set to K1 = 0 (as it is by default).
Did I do something wrong in my files?
I would appreciate if you could help me to solve this problem.
Best, Matthias
link_elements
Moderators: cyao, michael_borland
link_elements
- Attachments
-
- FLASH1.sdds
- (5.38 KiB) Downloaded 211 times
-
- FLASH1.lte
- (55.95 KiB) Downloaded 222 times
-
- FLASH1.ele
- (3.29 KiB) Downloaded 219 times
-
- Posts: 1959
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: link_elements
Matthias,
The problem is that your &twiss_output command is in immediate mode, while &link_elements always has a deferred action. There are three solutions:
* Set output_at_each_step=1 in the &twiss_output and &matrix_output commands.
* Remove the &link_elements command and use features of &load_parameters to do the job
* Modify your lattice file to use the name name of the upstream and downstream parts of each magnet.
--Michael
The problem is that your &twiss_output command is in immediate mode, while &link_elements always has a deferred action. There are three solutions:
* Set output_at_each_step=1 in the &twiss_output and &matrix_output commands.
* Remove the &link_elements command and use features of &load_parameters to do the job
Code: Select all
&load_parameters
filename = FLASH1.sdds
change_defined_values = 1
allow_missing_elements = 1
&end
&load_parameters
filename = FLASH1.sdds
change_defined_values = 1
allow_missing_elements = 1
include_item_pattern = K1,
include_name_pattern = Q*.U,
edit_name_command = %/.U/.D/
&end
--Michael
Re: link_elements
Hi Michael,
thank you for the fast response and for your help!
I will see which one of the three solutions is the best. We will have to use these quads also for matching in the future.
Best, Matthias
thank you for the fast response and for your help!
I will see which one of the three solutions is the best. We will have to use these quads also for matching in the future.
Best, Matthias