-
Notifications
You must be signed in to change notification settings - Fork 31
Labels
bugSomething isn't workingSomething isn't workingbug: affects latest releaseBug also exists in latest release versionBug also exists in latest release versioncomponent: pythonPython bindingsPython bindings
Description
For the elements ExactMultipole and ExactCFbend, the to_dict() method does not give the value of the int_order parameter.
>>> import impactx
>>> m_elem = impactx.elements.ExactMultipole(ds=1.0, k_normal=[0.0, 0.01, 0.002\
], k_skew=[0.0, 0.002, 0.0004], int_order=6, mapsteps=6)
>>> dir(m_elem)
['__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getstate__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '_pybind11_conduit_v1_', 'aperture_x', 'aperture_y', 'ds', 'dx', 'dy', 'finalize', 'has_name', 'int_order', 'mapsteps', 'name', 'nslice', 'push', 'rotation', 'to_dict', 'unit']
The int_order parameter is present in the element structure.
>>> m_elem.to_dict()
{'aperture_x': 0.0, 'aperture_y': 0.0, 'ds': 1.0, 'dx': 0.0, 'dy': 0.0, 'k_normal': [0.0, 0.01, 0.002], 'k_skew': [0.0, 0.002, 0.0004], 'mapsteps': 6, 'name': None, 'nslice': 1, 'rotation': 0.0, 'type': 'ExactMultipole', 'unit': 0}
but the int_order value is not in the dict return by the to_dict() method.
The same thing happens with the ExactCFbend element.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingbug: affects latest releaseBug also exists in latest release versionBug also exists in latest release versioncomponent: pythonPython bindingsPython bindings