diff --git a/util_programs/sad_to_bmad/DOC b/util_programs/sad_to_bmad/DOC index 1edea6a8c1..1914932dd2 100644 --- a/util_programs/sad_to_bmad/DOC +++ b/util_programs/sad_to_bmad/DOC @@ -16,6 +16,11 @@ There is an example parameter input file at: To translate: Copy util_programs/sad_to_bmad/sad_to_bmad.params to your working directory and edit. Documentation for editing this file and running the translation script is in the file itself. +To run use the command: + python /sad_to_bmad.py +Note: is optional. The default will be to take the sad lattice file name +set in the prameter file. + -------------------------------------------------------------------- -------------------------------------------------------------------- Notes: diff --git a/util_programs/sad_to_bmad/sad_to_bmad.py b/util_programs/sad_to_bmad/sad_to_bmad.py index 5170b1ead0..7334830a8e 100755 --- a/util_programs/sad_to_bmad/sad_to_bmad.py +++ b/util_programs/sad_to_bmad/sad_to_bmad.py @@ -146,9 +146,9 @@ def add_parens (str, operand): 'quad:k1': ['k1', ' / @l@'], 'sext:k2': ['k2', ' / @l@'], 'oct:k3': ['k3', ' / @l@'], - 'sad_mult:k1': ['b1', ' / @l@'], # In case a SAD quad -> Bmad sad_mult - 'sad_mult:k2': ['b2', ' / (2 * @l@)'], # In case a SAD sext -> Bmad sad_mult - 'sad_mult:k3': ['b3', ' / (6 * @l@)'], # In case a SAD oct -> Bmad sad_mult + 'sad_mult:k1': 'b1', # In case SAD quad -> Bmad sad_mult (when there is a solenoid field) + 'sad_mult:k2': ['b2', ' / 2'], # In case SAD sext -> Bmad sad_mult + 'sad_mult:k3': ['b3', ' / 6'], # In case SAD oct -> Bmad sad_mult 'bend:rotate': ['ref_tilt', ' * -1'], 'bend:drotate': ['roll', ' * -1'], 'l': 'l',