Skip to content

Commit ac4bfb4

Browse files
committed
Fix
1 parent cf8e1b9 commit ac4bfb4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

xtrack/_temp/python_lattice_writer/lattice_py_generation.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
formatter = xd.refs.CompactFormatter(scope=None)
88
SKIP_PARAMS = ['order', 'model', '_edge_entry_model', '_edge_exit_model',
9-
'k0_from_h', 'h']
9+
'h']
1010

1111

1212
def _repr_arr_ref(arr_ref, formatter):
@@ -57,6 +57,8 @@ def _elem_to_tokens(env, nn, formatter):
5757
continue
5858
if kk == 'prototype':
5959
continue
60+
if kk == 'k0_from_h' and not ee.k0_from_h:
61+
continue
6062
if kk == 'knl' or kk == 'ksl':
6163
arr_ref = getattr(ee_ref, kk)
6264
vv = _repr_arr_ref(arr_ref, formatter)

0 commit comments

Comments
 (0)