I'm not sure what to call this, bug or working as intended, but it appears that adding random multipoles to the elements that allow it (CCBEND,KQUAD, etc) doesn't play well with trajectory correction. I've created a minimum functioning examples of the issue and attached it. The example is based on staticPlusDynamicErrors, which I found in my elegant examples directory. I added a CCBEND to the lattice, and then used &alter_elements to include random multipoles when adding static errors to the lattice, and then turn off the dynamic errors.
When I comment out the &alter_elements line, I find that the centroid trajectory during the second run matches the trajectory reported by &correct during the first run:
When I leave the &alter_elements list in, the two trajectories are different:
When I look through the run1-131231119.param file, I see that the random multipoles added to the CCBEND aren't recorded anywhere. So of course the two lattices will be different. From this reply it appears that those multipoles errors aren't available anywhere at all, so I can't load them into the dynamic runs.
I guess this is a feature request to get those multipoles added to the parameter or error log file. But really, I just wanted to report behavior I didn't expect in case it helps out future readers.
Using Random Multipoles with Trajectory Correction
Moderators: cyao, michael_borland
Using Random Multipoles with Trajectory Correction
- Attachments
-
- trajectory_random_multipoles.tar.gz
- (1.17 KiB) Downloaded 187 times
-
- Posts: 1951
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Using Random Multipoles with Trajectory Correction
The problem is that your random number seeds change between the two parts of the run
That causes different random multipole instances to be generated in the two stages of the run. If you use
in both cases, you should get the same results for the trajectory.
--Michael
Code: Select all
! this run sets the static errors and corrects them.
&run_setup
lattice = fodo.lte
use_beamline = xport,
p_central_mev = 100
rootname = run1-<seed>,
magnets = %s.mag
parameters = %s.param
random_number_seed = <seed>
&end
...
&run_setup
lattice = fodo.lte
use_beamline = xport,
p_central_mev = 100
rootname = run2-<seed>,
centroid = %s.cen
magnets = %s.mag
parameters = %s.param
final = %s.fin,
random_number_seed = "(<seed> 2 +)",
&end
Code: Select all
random_number_seed = <seed>
--Michael