Page 1 of 1
Question about matrix output & R56
Posted: 02 Jul 2019, 12:06
by WEI-HOU
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
Re: Question about matrix output & R56
Posted: 02 Jul 2019, 12:21
by michael_borland
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
Re: Question about matrix output & R56
Posted: 02 Jul 2019, 13:00
by WEI-HOU
michael_borland wrote: ↑02 Jul 2019, 12:21
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.
--Michael
Hi 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
Re: Question about matrix output & R56
Posted: 02 Jul 2019, 13:06
by michael_borland
Wei Hou,
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
Then, you can try
Code: Select all
sddsplot -column=s,R56 matrix_output.SDDS_output.sdds
sddsplot -column=s,T566 matrix_output.SDDS_output.sdds
or
Code: Select all
sddsprintout matrix_output.SDDS_output.sdds -column=ElementName -col=R56 -col=T566
--Michael
Re: Question about matrix output & R56
Posted: 02 Jul 2019, 13:46
by WEI-HOU
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.
Re: Question about matrix output & R56
Posted: 02 Jul 2019, 14:28
by michael_borland
WEI-HOU wrote: ↑02 Jul 2019, 13:46
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.
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
Posted: 03 Jul 2019, 11:48
by WEI-HOU
michael_borland wrote: ↑02 Jul 2019, 14:28
WEI-HOU wrote: ↑02 Jul 2019, 13:46
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.
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
Hi Michael,
Thanks for your detailed explanation.
Regards
Wei Hou