Files
x09lb/script/local.py
gac-x09lb 68aea72a8d Startup
2022-10-03 19:11:30 +02:00

37 lines
908 B
Python

###################################################################################################
# Deployment specific global definitions - executed after startup.py
###################################################################################################
def trig_ccd():
if ccd.dataMatrix in SENSORS:
if ccd.isSimulated():
time.sleep(0.1)
else:
image_id = ccd.currentImageCount
ccd.start()
ccd.waitReady(-1)
ccd.waitNewImage(5000, image_id)
def is_beam_ok():
return True
def wait_beam():
if not is_beam_ok():
print "Waiting for beam..."
while not beam_ok:
time.sleep(0.1)
print "Beam ok"
def before_readout():
wait_beam()
trig_ccd()
def after_readout(rec, scan):
if not is_beam_ok():
rec.invalidate()
def after_scan():
pass