From 6497ef7a57ea4a961a81b39f4aab0520ce0b8b14 Mon Sep 17 00:00:00 2001 From: panepucci Date: Fri, 18 Dec 2015 11:53:51 +0100 Subject: [PATCH] Closedown --- script/rock.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/script/rock.py b/script/rock.py index f0d9963..5b5970f 100644 --- a/script/rock.py +++ b/script/rock.py @@ -33,15 +33,16 @@ def rock(axis = th1, ffail = False, tt = 0.2, seti0 = False, dx = None, noref = print 'fit failed - centering on maximum' max_x= xdata[ydata.index(max(ydata))] axis.move(max_x) - - if seti0 and not ffail: - time.sleep(2) - run("setI0") - #add after_rock BPM1:SUM as reference for monitoring monochromator thermal drift - if (noref==False) and not ffail: - time.sleep(3) # wait a bit until mono theta finish moving - br = mono_beam.read() - caput('X06DA-OP-MO:MONOBEAM', br) - print 'rock_success new mono beam at ' + str(br) + ' at' + str(e) + ' keV' + + if not ffail: + if seti0: + time.sleep(2) + run("setI0") + #add after_rock BPM1:SUM as reference for monitoring monochromator thermal drift + if (noref==False): + time.sleep(3) # wait a bit until mono theta finish moving + br = mono_beam.read() + caput('X06DA-OP-MO:MONOBEAM', br) + print 'rock_success new mono beam at ' + str(br) + ' at' + str(e) + ' keV' \ No newline at end of file