Introduction¶
Device Manipulation¶
The lightpath abstracts control of multiple devices into a single beampath
object. Actual device instantiation should be handled else where the lightpath
just assumes that you give it a list of devices that match the
LightInterface
. For now we can demonstrate the basic features of the
API by using a simulated path.
In [1]: import lightpath.tests
********************************************************************************
* Loading PyDM Data Plugins
********************************************************************************
Looking for PyDM Data Plugins at: /home/travis/miniconda/envs/test-environment/lib/python3.6/site-packages/pydm/data_plugins
Trying to load epics_plugin.py...
Trying to load archiver_plugin.py...
Trying to load fake_plugin.py...
Trying to load local_plugin.py...
Looking for PyDM Data Plugins at: /home/travis/miniconda/envs/test-environment/lib/python3.6/site-packages/pydm/data_plugins/epics_plugins
#Return the simulated path
In [2]: path = lightpath.tests.path()
You can look at all the devices in the path, either by looking at the objects
themselves or using the BeamPath.show_devices()
In [3]: path.show_devices()
+-------+--------+----------+----------+---------+
| Name | Prefix | Position | Beamline | Removed |
+-------+--------+----------+----------+---------+
| zero | zero | 0.00000 | TST | True |
| one | one | 2.00000 | TST | True |
| two | two | 9.00000 | TST | True |
| three | three | 15.00000 | TST | True |
| four | four | 16.00000 | TST | True |
| five | five | 24.00000 | TST | True |
| six | six | 30.00000 | TST | True |
+-------+--------+----------+----------+---------+
In [4]: path.devices