Hi,
I have a beamline (files attached) that I want to figure out the R56, T566 for its bunch compressor (BC1 in the lattice file).
Here are my questions.
1. How to output just matrices between certain beamline elements, such as matrix for BC1 ? ( I could set "start_from" in "marix_output" but there is no option for ending beamline element)
2. What would be the preferred way in ELEGANT to export R56 for any beamline elements ?
I attach files for your reference.
Thank you very much.
Regards
Wei Hou
Question about matrix output & R56
Moderators: cyao, michael_borland
Question about matrix output & R56
- Attachments
-
- LIA.zip
- (4.49 MiB) Downloaded 198 times
-
- Posts: 1933
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Question about matrix output & R56
Wei Hou,
elegant doesn't provide a way to set the start and end points for matrix output, just the start. However, the SDDS output file has all the matrix elements vs position, so you can get the data from there.
If you want matrices of individual elements, use individual_matrices=1 in the &matrix_output command, or look at the printout instead.
--Michael
elegant doesn't provide a way to set the start and end points for matrix output, just the start. However, the SDDS output file has all the matrix elements vs position, so you can get the data from there.
If you want matrices of individual elements, use individual_matrices=1 in the &matrix_output command, or look at the printout instead.
--Michael
Re: Question about matrix output & R56
Hi Michael,michael_borland wrote: ↑02 Jul 2019, 12:21Wei Hou,
elegant doesn't provide a way to set the start and end points for matrix output, just the start. However, the SDDS output file has all the matrix elements vs position, so you can get the data from there.
--Michael
Do you mean, I can actually get the matrix elements within certain range of positions from the SDDS output ?
If so, could you teach me the command for it ?
Thanks.
Regards
Wei Hou
-
- Posts: 1933
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Question about matrix output & R56
Wei Hou,
Referring to the input files you posted, try this
Then, you can try
or
--Michael
Referring to the input files you posted, try this
Code: Select all
&matrix_output
SDDS_output = "matrix_output.SDDS_output.sdds",
SDDS_output_order = 2,
full_matrix_only = 0,
output_at_each_step = 1,
&end
Code: Select all
sddsplot -column=s,R56 matrix_output.SDDS_output.sdds
sddsplot -column=s,T566 matrix_output.SDDS_output.sdds
Code: Select all
sddsprintout matrix_output.SDDS_output.sdds -column=ElementName -col=R56 -col=T566
Re: Question about matrix output & R56
Thank you for those helpful commands.
Could I dump the beam distribution using WATCH, just before element that I want (such as BC1 in my case), then track it with just BC1 to get the matrix for BC1 only?
Thanks.
Could I dump the beam distribution using WATCH, just before element that I want (such as BC1 in my case), then track it with just BC1 to get the matrix for BC1 only?
Thanks.
-
- Posts: 1933
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Question about matrix output & R56
Wei Hou,
There's no simple way to go from sets of two phase space coordinates to a transfer matrix, if that is what you are suggesting.
If you use the beamline BC1 (use_beamline=BC1 in &run_setup, then the final matrix will be the one for BC1 alone. That's the easiest approach by far.
--Michael
Re: Question about matrix output & R56
Hi Michael,michael_borland wrote: ↑02 Jul 2019, 14:28Wei Hou,
There's no simple way to go from sets of two phase space coordinates to a transfer matrix, if that is what you are suggesting.
If you use the beamline BC1 (use_beamline=BC1 in &run_setup, then the final matrix will be the one for BC1 alone. That's the easiest approach by far.
--Michael
Thanks for your detailed explanation.
Regards
Wei Hou