From 3c5c3e4c198358206d422941696d12e869981d98 Mon Sep 17 00:00:00 2001 From: panepucci Date: Tue, 24 Nov 2015 14:38:47 +0100 Subject: [PATCH] Script execution --- script/diode_scan.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 script/diode_scan.py diff --git a/script/diode_scan.py b/script/diode_scan.py new file mode 100644 index 0000000..701da10 --- /dev/null +++ b/script/diode_scan.py @@ -0,0 +1,28 @@ +""" +Demonstrate the use of Line Scan: one or multiple positioners move together linearly. +""" + +#This optional preference limits the displayed plots +#set_preference(Preference.ENABLED_PLOTS, [ai1, ai2,]) + +#This optional preference displays wf1 as a 1d plot at each scan point, instead of a matrix plot +#set_preference(Preference.PLOT_TYPES, {wf1:1}) + +#Execute the scan: 200 steps, a1 from 0 to 40 +a= lscan(ao1, (diode,ai2,wf1), 0, 40, 200, 0.01) + +#Also samples an image: +#a= lscan(ao1, (ai1,ai2,wf1), 0, 40, 200, 0.01) + +#Alternative: Steps of size 0.1, a1 from 0 to 40 +#a= lscan(ao1, (ai1,ai2,wf1), 0, 40, 0.5, 0.01) + +#2 positioners moving together in 200 steps, a1 from 0 to 40 and a2 from 0 to 100 +#a= lscan((ao1,ao2), (ai1,ai2,wf1), (0, 0), (40, 100), 200, 0.01) + +#Setting attributes to the scan group +path = get_current_group() +set_attribute(path, "AttrString", "Value") +set_attribute(path, "AttrInteger", 1) +set_attribute(path, "AttrDouble", 2.0) +set_attribute(path, "AttrBoolean", True)