Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line length shrinks if Matrix element is used when TWISS is called #482

Open
eccortes95 opened this issue Apr 2, 2024 · 2 comments
Open
Labels
bug Something isn't working

Comments

@eccortes95
Copy link

A line with a MATRIX element, eg:
wiggler: matrix,l:= 4,rm11:= 1.000449786249,rm12:= 4.000639844715,rm21:= 0.00022577719708,rm22:= 1.00045326313,rm33:= 0.9786569514876,rm34:= 3.970145599493,rm43:=-0.01063922161568,rm44:= 0.97864807445;
from MADX can be exported to Xsuite.
However when I load the line and then do TWISS the line appears to shrink:
line = xt.Line.from_dict(loaded_dct)
tab = line.get_table()
print(tab['s'][-1])
OUTPUT: 2303.952493011991
line.build_tracker()
tw = line.twiss(method='4d')
print(tw0.s[-1])
OUTPUT: 2223.9524930120483

I can provide the lattice, if needed.

@giadarol
Copy link
Member

giadarol commented Apr 2, 2024

Hello. Yes it would be good to have the full lattice

@eccortes95
Copy link
Author

I've sent it.

@giadarol giadarol added the bug Something isn't working label Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants