Page 1 of 1

LATTICE and CALCULATE INPUT MATCHED BEAM

Posted: Mon 21 Nov 2022 15:44
by wtam
Hi Colleagues,

When I use "lattice" and "set_adv" to "calculate input matched beam", can I set constraints to the resulting twiss parameters? For example, if I want the resulting input beam to be a round beam.

Best regards,
Wai-Ming

Re: LATTICE and CALCULATE INPUT MATCHED BEAM

Posted: Tue 22 Nov 2022 09:54
by Didier
Dear Wai-Ming,

I don't see any way to do that except to average the results.

Regards,

Didier

Re: LATTICE and CALCULATE INPUT MATCHED BEAM

Posted: Wed 23 Nov 2022 09:04
by wtam
Dear Didier,

Is it possible to start with a known input beam and use "adjust" on a few quadrupoles to match the beam at the beginning of a "lattice"?

Best regards,
Wai-Ming

Re: LATTICE and CALCULATE INPUT MATCHED BEAM

Posted: Wed 23 Nov 2022 16:58
by Didier
Dear Wai-Ming,

I think that yes, it is necessary to put diagnostics of type "DIAG_DSIZE2" in the first lattice (at least, 5 I think) so as to force the matching. By the way, this is the way we calculate the beam to inject in the SPIRAL2 accelerator. Experimentally validated method.

Regards,

Didier

Re: LATTICE and CALCULATE INPUT MATCHED BEAM

Posted: Tue 3 Jan 2023 05:04
by wtam
Dear Didier,

Could you please show me how to use "DIAG_DSIZE2" on Q1 and Q2 in the example project (attached) to match the input beam calculated by "LATTICE" at the beginning of the lattice itself?

Best regards,
Wai-Ming

Re: LATTICE and CALCULATE INPUT MATCHED BEAM

Posted: Wed 4 Jan 2023 13:06
by Didier
Dear Wia-Ming,

Below is an example of how to use the DIAG_DSIZE2 diagnostics. Now starting with a round beam it is virtually impossible to get a perfect matching in your channel.
Another point, while working on your example I noticed a bug in the GAP element, which I corrected in the latest online version.

Regards,

Didier

match.cal
(77 Bytes) Downloaded 109 times
match.dat
(791 Bytes) Downloaded 121 times
match.ini
(43.77 KiB) Downloaded 125 times

Re: LATTICE and CALCULATE INPUT MATCHED BEAM

Posted: Fri 6 Jan 2023 02:04
by wtam
Dear Didier,

It is great! Thanks!
Two follow up questions:
(1) Does a "DIAG" statement count as an element? It seems it does but it does not affect the lattice periodicity.
(2) See attached. I keep commenting out the "DIAG_DSIZE2" statement one by one but the matching still works fine. I don't think I understand how it work.

Best regards,
Wai-Ming

Re: LATTICE and CALCULATE INPUT MATCHED BEAM  [SOLVED]

Posted: Mon 9 Jan 2023 10:21
by Didier
Dear Wia-Ming,

1) Yes DIAG are element but they are not counted in the periodicity for convenience
2) As long as there are at least 2 DIAG_DSIZE2, the adaptation is theoretically always feasible, but most of the time more are needed to ensure continuity of the focus channel, it depends very much on the machine.

Regards,

Didier