Repository navigation
Translate rectangular face angles, bend angles and RF gradients to Bmad - #3
Merged
Merged
Conversation
- e1_rect/e2_rect become Bmad's sector e1/e2, adding the share of the bend angle ref_geometry gives that face; e1 and e2_rect may now be mixed. - angle_ref becomes Bmad's angle; it was dropped. - An RF gradient becomes voltage = gradient * L_active (or length), read from the element's length rather than a nonexistent L. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
📖 Documentation preview for this PR: https://pals-project.github.io/PALSParserPy/previews/PR3/ Rebuilt on every push; removed automatically when the PR closes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes three PALS-to-Bmad translation bugs:
e1_rect/e2_rectwrotebendP["e1"](failing when onlye1_rectwas given) and never converted the angle. They now become Bmad's sectore1/e2, adding the share of the bend angle thatref_geometrygives each face (bend.md): half each forARC/CHORD, all on the exit face forENTRANCE_COORDS, all on the entrance face forEXIT_COORDS. The angle is taken fromangle_ref, or worked out fromg_ref/radius_refwithlength,L_chordorL_rectangle. A face may now be given the sector way while the other is given the rectangular way; giving one face both ways is still an error.angle_refwas dropped, so a bend stated by its angle came out straight. It now becomes Bmad'sangle.gradientread a nonexistentprops["L"]and so always errored. It now becomesvoltage = gradient * L_active, falling back to the element length, Bmad'sgradientbeing a dependent attribute.Tests added for all three; the translation guide documents them.
🤖 Generated with Claude Code