Hello
I would like to simulate the effects of rf cavity phase jitter on the arrival time of a bunch in a linac. I have a multi page parameter file, the first page containts the working point for the machine without errors and the later pages contain the working point plus some random errors on the cavity phases. Please could you advise if this input file is correct. I haven't used any fiducial settings on the RFCW elements directly. My understanding is that the first step fixes the reference phases for the lattice without errors and subsequent steps are tracked relative to these reference phases rather than being fiducialized again.
Thanks
James
&run_setup
lattice="nlsl_0p2nC.lte",
use_beamline="nlsl_0p2nC"
p_central=267.8600
&end
! first page has sets up angles and phases without errors
! second page has random errors for jitter studies
&load_parameters
filename="params.sdds"
&end
! for tolerance studies
&run_control
n_steps = 2
reset_rf_for_each_step = 0
first_is_fiducial = 1
&end
&sdds_beam
input = "m2_b4c_1500_10k.sdds",
input_type = "elegant",
reuse_bunch = 1
&end
&track
&end
reset_rf_for_each_step and first_is_fiducial
Moderators: cyao, michael_borland
-
- Posts: 1933
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: reset_rf_for_each_step and first_is_fiducial
James,
There is one problem that I see: before loading each page of the parameter file, elegant resets all element settings to the values in the lattice file, so that the new instance starts from the ideal machine, so to speak. Hence, if the first page has some values you want to use for the whole run, this won't work.
There are two options for resolving this:
1. Duplicate the common settings in every page of the parameter file.
2. Have a separate parameter file with the common settings. Load this file with a separate command:
&load_parameters
filename = common.sdds
change_defined_values = 1 ! Indicates that we want the lattice definition values overwritten
&end
You can create common.sdds easily with sddsconvert:
% sddsconvert params.sdds common.sdds -topage=1
You can continue to use your existing params.sdds file as well. The fact that the first page reloads values that you've already loaded won't hurt anything (unless the system is really large in which case it will need significant CPU time). However, it might be confusing. The best thing is to have an empty page for the first page of params.sdds, which you can do as follows:
% sddsprocess common.sdds empty.sdds -test=column,false
% mv params.sdds params.old
% sddsconvert params.old params.part -frompage=2
% sddscombine empty.sdds params.part params.sdds
When starting out, it is a good idea to set verbose=1 on load_parameters and to verify that you are getting the settings you expect. You should turn this off for production runs as it produces large printouts.
--Michael
There is one problem that I see: before loading each page of the parameter file, elegant resets all element settings to the values in the lattice file, so that the new instance starts from the ideal machine, so to speak. Hence, if the first page has some values you want to use for the whole run, this won't work.
There are two options for resolving this:
1. Duplicate the common settings in every page of the parameter file.
2. Have a separate parameter file with the common settings. Load this file with a separate command:
&load_parameters
filename = common.sdds
change_defined_values = 1 ! Indicates that we want the lattice definition values overwritten
&end
You can create common.sdds easily with sddsconvert:
% sddsconvert params.sdds common.sdds -topage=1
You can continue to use your existing params.sdds file as well. The fact that the first page reloads values that you've already loaded won't hurt anything (unless the system is really large in which case it will need significant CPU time). However, it might be confusing. The best thing is to have an empty page for the first page of params.sdds, which you can do as follows:
% sddsprocess common.sdds empty.sdds -test=column,false
% mv params.sdds params.old
% sddsconvert params.old params.part -frompage=2
% sddscombine empty.sdds params.part params.sdds
When starting out, it is a good idea to set verbose=1 on load_parameters and to verify that you are getting the settings you expect. You should turn this off for production runs as it produces large printouts.
--Michael
Re: reset_rf_for_each_step and first_is_fiducial
Thanks Michael, I have been duplicating the common settings in every page of the parameter file (there are only a few settings) so it looks like I'm ok for rf tolerance studies.
James
James