Files
x07db/script/templates/EnergyScan.py
2020-01-16 13:42:14 +01:00

20 lines
457 B
Python

if get_exec_pars().source == CommandSource.ui:
REGIONS = [[523.0, 527.0, 2.0], [527.0, 535.0, 4.0], [535.0, 558.0, 2.0]]
sensors=[i0, scienta.stats[0], scienta.getSpectrum()]
caputq("NAPP-SCIENTA:HDF1:Capture",1)
def trigger(position, scan):
scienta.start()
scienta.waitNewImage(-1)
try:
rscan(energy, sensors, REGIONS, latency = 0.0, before_read=trigger)
finally:
caputq("NAPP-SCIENTA:HDF1:Capture",0)
scienta.zeroSupplies()