From 277bb77138a4db4f46194fa90cde14640f40b09b Mon Sep 17 00:00:00 2001 From: boccioli_m Date: Fri, 22 May 2015 15:18:26 +0200 Subject: [PATCH] Script execution --- script/Marco/power-supply.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/script/Marco/power-supply.py b/script/Marco/power-supply.py index 4faee7a..81cb4ae 100644 --- a/script/Marco/power-supply.py +++ b/script/Marco/power-supply.py @@ -21,7 +21,7 @@ ActualIA = Channel('PO2DV-NCS-VHQ1:Actual-IA', type = 'd') #set voltage to 0 print 'Ramping down power supply to 0V' -SetVA.put(0.1, timeout=None) +SetVA.put(0, timeout=None) #wait up to 2 minutes for voltage to be ~0 for setpoint1 in frange(0.0, 120.0, 1.0, True): @@ -53,13 +53,15 @@ for setpoint1 in frange(0.0, 50.0, 10.0, True): #?????????????????? What is the scan.append ([detector1], [detector1], [readback1, detector2, detector3]) #?????????????????????? what is setpoint? is position = X-axis? sleep( 0.1 ) # Settling time +#reset output to 0V +SetVA.put(0, timeout=None) #Closing channels SetVA.close() ActualVA.close() ActualIA.close() readable = detector2 -positions = detector1 +positions = scan.positions(0) threshold = (min(readable) + max(readable))/2 min_peak_distance = 5.0 @@ -72,8 +74,5 @@ print "Peak y: " + str(map(lambda x:readable[x], peaks)) scan.end() -#Post-actions -caput('PO2DV-NCS-VHQ1:Set-VA', '0') -#sleep(4.0) #??????????????????????????? Device modeling: how can I modelise a Power Supply, for example?