w_p_limit

https://www.dacm-logiciels.fr/tracewin
Post Reply
United States of Americawtam
Initiated
Initiated
Posts: 63
Joined: Mon 7 Dec 2020 06:17
Location: Boston
Country:
United States of America (us)
United States of America

w_p_limit

Post by United States of Americawtam »

Colleagues,

I am not able to use w_p_limit twice in a model. For example:

drift 10 10
w_p_limit 0 10
drift 10 10
w_p_limit 0 0
drift 10 10

The above doesn't seem to work in the sense that after the command "w_p_limit 0 0", particles having a phase larger than 10 degree are still considered lost. Any idea?

Best regards,
Wai-Ming
User avatar
FranceDidier
Administrator
Administrator
Posts: 505
Joined: Wed 26 Aug 2020 14:40
Country:
France (fr)
France

Re: w_p_limit

Post by FranceDidier »

Dear Wtam,

I noticed a kind of shift between command and the element where it is applied, explaining your issue.
I fixed this issue and you can so upgrade your code

Regards,

Didier
United States of Americawtam
Initiated
Initiated
Posts: 63
Joined: Mon 7 Dec 2020 06:17
Location: Boston
Country:
United States of America (us)
United States of America

Re: w_p_limit

Post by United States of Americawtam »

Dear Didier,

I have upgraded the code. But I think the issue has not been fixed completely. For example:

drift 10 10
w_p_limit 0 10
drift 10 10
w_p_limit 0 12
drift 10 10
w_p_limit 0 0
drift 10 10

The first and second ones will work. But the third one won't work. I think it is a problem with "w_p_limit 0 0", specifically when you put two zeros.

Best regards,
Wai-Ming
User avatar
FranceDidier
Administrator
Administrator
Posts: 505
Joined: Wed 26 Aug 2020 14:40
Country:
France (fr)
France

Re: w_p_limit

Post by FranceDidier »

Dear Wai-Ming,

Indeed 0 has no effect at all, but first I don't see the point of such a command. If you want to stop the whole beam, there are many other ways and then try 0.0001, it will work.

Regards,

Didier
United States of Americawtam
Initiated
Initiated
Posts: 63
Joined: Mon 7 Dec 2020 06:17
Location: Boston
Country:
United States of America (us)
United States of America

Re: w_p_limit

Post by United States of Americawtam »

Dear Didier,

I believe "w_p_limit 0 0" means no limit.

drift 10 10
w_p_limit 0 10
drift 10 10
w_p_limit 0 0
drift 10 10

By doing the above, I want to set a limit to the phase (+/- 10 deg) at a specific location, and then cancel the limit with "w_p_limit 0 0". If "w_p_limit 0 0" has no effect, then the limit of +/-10deg will be there for the rest of the beam line, which is not what I want.

Best regards,
Wai-Ming
User avatar
FranceDidier
Administrator
Administrator
Posts: 505
Joined: Wed 26 Aug 2020 14:40
Country:
France (fr)
France

Re: w_p_limit

Post by FranceDidier »

Dear Wai-Ming,

I understand, so why not just put, "w_p_limit 0 100000" ?

Regards,

Didier
Post Reply