Script execution
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user