Added a property in the Device class (./lcls_tools/common/devices/device.py) for z_location that returns the value of the sum_l_meters property so all devices that inherit from it get the property.
Added unit test to ensure that Device.z_location and Device.sum_l_meters are equal
To Test
Try running the below script. To try with alternative devices you will have to find a machine area that has those kinds of devices.
Currently we only return z co-ordinate, it may be needed in the future to return x/y values too in the case that two components have the same z-location (two beamlines separated at the dipole)
Summary of Changes
Added a property in the
Device
class (./lcls_tools/common/devices/device.py
) forz_location
that returns the value of thesum_l_meters
property so all devices that inherit from it get the property.Added unit test to ensure that
Device.z_location
andDevice.sum_l_meters
are equalTo Test
Try running the below script. To try with alternative devices you will have to find a machine area that has those kinds of devices.
Additional Notes
Currently we only return z co-ordinate, it may be needed in the future to return x/y values too in the case that two components have the same z-location (two beamlines separated at the dipole)
closes #179