Closedown
This commit is contained in:
@@ -40,11 +40,8 @@ import ch.psi.pshell.device.ReadonlyRegisterBase as ReadonlyRegisterBase
|
||||
import ch.psi.pshell.device.ReadonlyRegister.ReadonlyRegisterArray as ReadonlyRegisterArray
|
||||
import ch.psi.pshell.device.ReadonlyRegister.ReadonlyRegisterMatrix as ReadonlyRegisterMatrix
|
||||
|
||||
print("01")
|
||||
from startup import *
|
||||
print("02")
|
||||
#import local
|
||||
print("03")
|
||||
|
||||
def check_region(region):
|
||||
"""
|
||||
@@ -63,13 +60,12 @@ def check_region(region):
|
||||
if 'slit' not in region:
|
||||
region['slit'] = get_device("ExitSlit").read()
|
||||
print("region {0}: setting default slit = {1}".format(region['name'], region['slit']))
|
||||
|
||||
|
||||
class SpectrumReader(ReadonlyRegisterBase, ReadonlyRegisterArray):
|
||||
def initialize(self):
|
||||
#super(SpectrumReader, self).initialize()
|
||||
self.scan_index = -1
|
||||
self.Scienta = get_device("Scienta")
|
||||
print("A" + str(self.Scienta))
|
||||
self.ExitSlit = get_device("ExitSlit")
|
||||
self.Eph = get_device("Eph")
|
||||
|
||||
@@ -146,7 +142,7 @@ class SpectrumReader(ReadonlyRegisterBase, ReadonlyRegisterArray):
|
||||
current_region_index = self.region_index
|
||||
self.setup()
|
||||
print("Acquiring region {0}.".format(self.region['name']))
|
||||
local.trig_scienta()
|
||||
trig_scienta()
|
||||
time.sleep(0.5)
|
||||
sp = self.Scienta.getSpectrum().read()
|
||||
return sp
|
||||
@@ -162,7 +158,6 @@ class SpectrumReader(ReadonlyRegisterBase, ReadonlyRegisterArray):
|
||||
class ImageReader(ReadonlyRegisterBase, ReadonlyRegisterMatrix):
|
||||
def initialize(self):
|
||||
self.Scienta = get_device("Scienta")
|
||||
print("C" + str(self.Scienta))
|
||||
|
||||
def read(self):
|
||||
return self.Scienta.getDataMatrix().read()
|
||||
@@ -228,10 +223,10 @@ def do_scan(motors, positions, regions, latency):
|
||||
|
||||
SENSORS.append(get_device("SampleCurrent"))
|
||||
SENSORS.append(get_device("RefCurrent"))
|
||||
local.adjust_sensors()
|
||||
local.set_adc_averaging()
|
||||
adjust_sensors()
|
||||
set_adc_averaging()
|
||||
|
||||
vscan(motors, SENSORS, positions, True, latency,False, before_read=local.wait_beam, after_read=local.after_readout)
|
||||
vscan(motors, SENSORS, positions, True, latency,False, before_read=wait_beam, after_read=after_readout)
|
||||
|
||||
for (index, region) in enumerate(regions):
|
||||
set_attribute(get_exec_pars().scanPath + "region{0}/ScientaSpectrum".format(index + 1), "RegionName", region['name'])
|
||||
|
||||
Reference in New Issue
Block a user