-
Notifications
You must be signed in to change notification settings - Fork 29
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
New Lattice.reduce method #429
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very nice!
@simoneliuzzo : there was a bug when comparing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tested with two lattice files. One EBS SR lattice, with few elements to reduce and an ARC cell of 10000 elements that has been correctly reduced to 141 elements. The optics after reducing are identical a part the last few digits of some parameters (numerical).
@simoneliuzzo: thanks for testing, I rely on you for that ! Did you try " |
Dear @lfarv , |
Of course, this is useful only if radiation is OFF: thin cavities are then set to |
The
Lattice.reduce
method is similar to theatreduce
Matlab function: it removed all elements with anIdentityPass
passmethod, and then merges compatible consecutive elements.A keep keyword allows to keep selected elements even if they have an
IdentityPass
passmethod. By default,Lattice.reduce
keepsMonitor
andRFCavity
elements.