slaclab / trace

Live and Archived data plotting tool
https://slaclab.github.io/trace/
3 stars 4 forks source link

ENH: EGU Axes #45

Closed aksharsarvesh closed 1 month ago

aksharsarvesh commented 2 months ago

Instead of automatically adding new axes for every curve, wait for the asynchronous reception of EGUs from the timeplot plugin. Use these units to attach the curve to the correct axis where EGU = axis name. If no such axis exists, create a new axis for it.

If we never receive an EGU signal, this is a PV with no EGU (for example PPS:IN20:1:MAGLOCK). If this happens, or it's a FormulaCurveItem, then change its axis name to match the name of the curve rather than the units, and it's a unique axis. Other curves can be added to that axis, but why would you want that? Perchance.

Because the signal for data comes in a few milliseconds before the signal for units, just how the timeplot plugin works, for a split second a new axis (the one that would be created because we didn't receive a units signal) would flash, then the curve would be put onto its correct axis. There is pretty much no way to fix this unless we sleep for a second or something to stall for the units signal. If that's worth it, we can do that.