Skip to content

Commit 3a3f972

Browse files
committed
Support translation
1 parent f6457d6 commit 3a3f972

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

xtrack/mad_parser/loader.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,10 @@ def _convert_element_params(self, name, params):
473473
elif parent_name in {'srotation', 'xrotation', 'yrotation'}:
474474
if (angle := params.pop('angle', None)):
475475
params['angle'] = (angle * 180) / np.pi
476+
elif parent_name == 'translation':
477+
if (ds := params.pop('ds', None)):
478+
raise NotImplementedError('`ds` parameter not supported yet for '
479+
'`translation` elements.')
476480

477481
if 'edge_entry_fint' in params and 'edge_exit_fint' not in params:
478482
params['edge_exit_fint'] = params['edge_entry_fint']

0 commit comments

Comments
 (0)