From 37105d6114c9a844ad671447682f54dbae485a71 Mon Sep 17 00:00:00 2001 From: Claudio Scafuri <claudio.scafuri@elettra.eu> Date: Fri, 1 Jul 2022 14:53:40 +0200 Subject: [PATCH] utility for fixing attibute format --- etc/fixformat.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 etc/fixformat.py diff --git a/etc/fixformat.py b/etc/fixformat.py new file mode 100644 index 0000000..4328b15 --- /dev/null +++ b/etc/fixformat.py @@ -0,0 +1,15 @@ +#fix format fro SIP devices +from tango import * +gp=Group('vpg') + + +gp.add('sr/vacuum/vg*') + +for vgpname in gp.get_device_list(): + attrname = vgpname+'/Pressure' + print(attrname) + vgp_pressure = AttributeProxy(attrname) + cfx = vgp_pressure.get_config() + cfx.format = '%.2e' + cfx.display_unit = 'mbar' + vgp_pressure.set_config(cfx) -- GitLab