How to scan Twiss Parameter?

Moderators: cyao, michael_borland

Zamank
Posts: 55
Joined: 03 Dec 2013, 10:57

How to scan Twiss Parameter?

Post by Zamank » 10 Dec 2013, 10:13

Hi Guys,

I am wondering how would I go about scanning various values of the twiss functions. In particular, I have a beamline with a 4-chicane bunch compressor somewhere in the middle, I was wondering how would I go about ONLY changing betax at the entrance of the BC (or only changing the alphax, or any of the twiss parameters really).

I tried parameter vary, but couldn't get it to work (probably not the right process anyway).


As always, thanks for the help!

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

Re: How to scan Twiss Parameter?

Post by michael_borland » 10 Dec 2013, 10:23

You can do this by inserting a TWISS element at the start of the beamline, then varying the parameters of that element.

--Michael

Zamank
Posts: 55
Joined: 03 Dec 2013, 10:57

Re: How to scan Twiss Parameter?

Post by Zamank » 10 Dec 2013, 11:50

Perfect, got it working...awesome thank you :D !

Zamank
Posts: 55
Joined: 03 Dec 2013, 10:57

Re: How to scan Twiss Parameter?

Post by Zamank » 08 Jan 2014, 20:37

Hi Michael,

I was wondering if there was a way to do a scan for PSIX (the phase advance)? I am currently using a input matrix file to do this, but the sddscollapse and .finc method that you use is so much cleaner.

Thanks in advance!

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

Re: How to scan Twiss Parameter?

Post by michael_borland » 09 Jan 2014, 09:47

I'm not sure I understand the question. Do you want to scan the initial betatron phase, the betatron phase advance of a beamline, or something else?

--Michael

Zamank
Posts: 55
Joined: 03 Dec 2013, 10:57

Re: How to scan Twiss Parameter?

Post by Zamank » 09 Jan 2014, 19:18

I basically want to implement a "phaseshifter" at any point of the beamline, where I would be able to increase/decrease the PSIX by any amount without affecting the optics/matching. Exactly what the TWISS parameter scanning does, but for PSIX.

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

Re: How to scan Twiss Parameter?

Post by michael_borland » 10 Jan 2014, 09:56

There isn't any way I can think of to do this without using an external matrix, as you are doing.

I'll add it to the to-do list for a future version.

--Michael

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

Re: How to scan Twiss Parameter?

Post by michael_borland » 10 Jan 2014, 09:59

Actually, I take that back. If you know the twiss parameters, I think ILMATRIX should do it. Just vary the NUX and NUY parameters.

I haven't tested this, but I think it should work.

--Michael

Zamank
Posts: 55
Joined: 03 Dec 2013, 10:57

Re: How to scan Twiss Parameter?

Post by Zamank » 14 Apr 2017, 12:38

Hi Michael,

I just wanted to inquire a bit more about the "ILMATRIX" scan for NUX. I have tried doing it by adding a ILMATRIX element into the beamline I want to scan NUX as so:

Code: Select all

MATRIX  : ILMATRIX,l=0,BETAX=3.964955e+01,ALPHAX=2.350896,BETAY=3.875236,ALPHAY=-2.690294e-01,NUX=6.283185307179586
But I get the error of:

Code: Select all

ILMATRIX problem: divide by zero
363 matrices recomputed for periodic Twiss parameter computation
error: can't treat cavities like drifts when CHANGE_P0=1
Program trace-back:
I have tried toggling the length of "ILMATRIX" element, and turning the &twiss_output, matched=1 on and off. I am basically trying to only scan through the phase advance at a particular point of the beamline without affecting any other optics functions. Using an outside script and the "MATR" element to import it has been working, but now that the scope of the scan has increased I would like to use Pelegant, so one parallel job submitted would be ideal.

Thank you in advance!

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

Re: How to scan Twiss Parameter?

Post by michael_borland » 14 Apr 2017, 17:01

Perhaps the attached example will help.

--Michael
Attachments
ILMatrixScan.zip
(3.92 KiB) Downloaded 554 times

Post Reply