Script execution

This commit is contained in:
x03daop
2017-04-12 10:53:24 +02:00
parent 34af33bd7c
commit 9a0d4e185d

View File

@@ -13,8 +13,6 @@ REGIONS = [REGION1, REGION2]
CLOSE_SHUTTER_AT_END = True
set_exec_pars(open = True)
Scienta.setAcquisitionMode(ch.psi.pshell.epics.Scienta.AcquisitionMode.Swept)
class SpectrumReader(ReadonlyRegisterBase, ReadonlyRegisterArray):
@@ -88,7 +86,7 @@ class ImageReader(ReadonlyRegisterBase, ReadonlyRegisterMatrix):
return ny
# plotting current spectrum
names = "Online Spectrum"
names = "Scienta spectrum"
plots = plot(None, names)
global online_spectrum_plot
spectrum_series = plots[0].getSeries(0)
@@ -113,7 +111,7 @@ def do_scan(motors, positions, regions, latency):
global SENSORS
scan_index += 1
SENSORS = [SampleCurrent, RefCurrent]
SENSORS = []
for (index, region) in enumerate(regions):
reader = SpectrumReader()
@@ -131,6 +129,8 @@ def do_scan(motors, positions, regions, latency):
set_device_alias(image, "ScientaImage{0}".format(index + 1))
SENSORS.append(image)
SENSORS.append(SampleCurrent)
SENSORS.append(RefCurrent)
adjust_sensors()
set_adc_averaging()