slaclab / lcls-live

Tools for running the LCLS live accelerator models
https://slaclab.github.io/lcls-live/
Apache License 2.0
4 stars 8 forks source link

Add option to use DES values rather than ACT #43

Closed mattgibbs closed 1 year ago

mattgibbs commented 1 year ago

Most LCLS device attributes (all RF cavity phase/amplitudes, all magnet strengths) have a concept of "DES" and "ACT". "DES" is the desired value for the attribute. "ACT" is the actual value - the readback from the device. DES is usually set to a sensible value even if the device is turned off, tripped, or broken. Giving users the option to use DES values in data maps, rather than always using ACT, means you can still get somewhat-meaningful live machine data even during downtimes and maintenance days.

This PR adds one user-facing change: a new, optional use_des argument on lcls_live.datamaps.get_datamaps. If you set use_des to True, DES values will be used whenever they exist. If you set use_des to a list of datamap names (like ["klystron", "quad"]), DES values will be used for those particular datamaps.