Question about matrix output & R56

Moderators: cyao, michael_borland

Post Reply
WEI-HOU
Posts: 31
Joined: 01 Mar 2018, 08:20

Question about matrix output & R56

Post by WEI-HOU » 02 Jul 2019, 12:06

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
Attachments
LIA.zip
(4.49 MiB) Downloaded 197 times

michael_borland
Posts: 1927
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: Question about matrix output & R56

Post by michael_borland » 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.

If you want matrices of individual elements, use individual_matrices=1 in the &matrix_output command, or look at the printout instead.

--Michael

WEI-HOU
Posts: 31
Joined: 01 Mar 2018, 08:20

Re: Question about matrix output & R56

Post by WEI-HOU » 02 Jul 2019, 13:00

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

michael_borland
Posts: 1927
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: Question about matrix output & R56

Post by michael_borland » 02 Jul 2019, 13:06

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

WEI-HOU
Posts: 31
Joined: 01 Mar 2018, 08:20

Re: Question about matrix output & R56

Post by WEI-HOU » 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.

michael_borland
Posts: 1927
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: Question about matrix output & R56

Post by michael_borland » 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

WEI-HOU
Posts: 31
Joined: 01 Mar 2018, 08:20

Re: Question about matrix output & R56

Post by WEI-HOU » 03 Jul 2019, 11:48

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

Post Reply