Hello,
I have a distribution which is given by two different bunches. These are both in the same file. I would like to phase all the linac with respect to one of the two. I think I have to use the command first_is_fiducial, but I need to say to Elegant which is the first bunch. Have I to put the bunches in two pages? I do not find how to do it.
Thanks in advance,
Simona.
Phasing and two bunches
Moderators: cyao, michael_borland
-
- Posts: 1959
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Phasing and two bunches
Simona,
This is a bit tricky to set up. You have to use both first_is_fiducial=1 and reset_rf_for_each_step=0 in &run_setup, along with track_pages_separately=1 in &sdds_beam. The linac will be phased to the first bunch (there's no straightforward way in elegant to phase it to the second).
See attached example.
--Michael
This is a bit tricky to set up. You have to use both first_is_fiducial=1 and reset_rf_for_each_step=0 in &run_setup, along with track_pages_separately=1 in &sdds_beam. The linac will be phased to the first bunch (there's no straightforward way in elegant to phase it to the second).
See attached example.
--Michael
- Attachments
-
- twoBunchPhasing.zip
- (1.81 KiB) Downloaded 226 times
-
- Posts: 45
- Joined: 06 Jul 2011, 03:14
Re: Phasing and two bunches
Thanks for your answer and the example. If I correctly understood you defined 3 gaussians of 1000 particles each. I have an Astra simulations with two "deformed" gaussian coming out and I do not know how to say to Elegant that one is bunch 1 and that the other one is bunch 2. I can separate them in time for sure and generate two files, but, how can I do the two pages? Is it enough I put two headers: one before each bunch or have I to do it differently?
Thanks again,
Simona.
Thanks again,
Simona.
-
- Posts: 1959
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Phasing and two bunches
Simona,
I generated two bunches (n_steps=2 in &run_control in makeBeam.ele).
For your case, try the following:
This sorts the particles into time order, then breaks the file into pages when there is a gap of 10 ps in the time values. The file astraOutput2Page.sdds would be used with &sdds_beam. Adjust the 10e-12 value to suit your particular case.
If you already have the two bunches in two files, you can combine them using
then use file3.sdds with &sdds_beam
Alternatively, use
--Michael
I generated two bunches (n_steps=2 in &run_control in makeBeam.ele).
For your case, try the following:
Code: Select all
sddssort astraOutput.sdds -pipe=out -column=t \
| sddsbreak -pipe=in astraOutput2Page.sdds -gapin=t,amount=10e-12
If you already have the two bunches in two files, you can combine them using
Code: Select all
sddscombine file1.sdds file2.sdds file3.sdds
Alternatively, use
Code: Select all
&sdds_beam
input_list = "file1.sdds file2.sdds"
track_pages_separately = 1
&end
-
- Posts: 45
- Joined: 06 Jul 2011, 03:14
Re: Phasing and two bunches
Perfect!
Many thanks,
Simona.
Many thanks,
Simona.