Closedown
This commit is contained in:
@@ -343,7 +343,8 @@ def wait_beam():
|
||||
time.sleep(0.1)
|
||||
print "Beam ok"
|
||||
|
||||
def before_readout():
|
||||
def is_scienta_sampling():
|
||||
global SENSORS
|
||||
sample_scienta = False
|
||||
for dev in ["Scienta.spectrum","EnergyDistribution", "AngleDistribution", "Scienta.dataMatrix", "Counts"]:
|
||||
if dev in SENSORS:
|
||||
@@ -353,6 +354,10 @@ def before_readout():
|
||||
if dev in SENSORS:
|
||||
sample_scienta = True
|
||||
break
|
||||
return sample_scienta
|
||||
|
||||
def before_readout():
|
||||
sample_scienta = is_scienta_sampling()
|
||||
wait_beam()
|
||||
trig_keithleys()
|
||||
if sample_scienta:
|
||||
@@ -383,10 +388,13 @@ def after_scan():
|
||||
|
||||
def set_adc_averaging(dwelltime=0.0):
|
||||
if dwelltime == 0.0:
|
||||
dwelltime = Scienta.getStepTime().read()
|
||||
if is_scienta_sampling():
|
||||
dwelltime = Scienta.getStepTime().read()
|
||||
fixed = AcquisitionMode.read() == "Fixed"
|
||||
else:
|
||||
fixed = True
|
||||
dwelltime = min(dwelltime, 20.0)
|
||||
dwelltime = max(dwelltime, 0.1)
|
||||
fixed = AcquisitionMode.read() == "Fixed"
|
||||
else:
|
||||
fixed = True
|
||||
prepare_keithleys(dwelltime, fixed)
|
||||
@@ -398,7 +406,9 @@ def set_adc_averaging(dwelltime=0.0):
|
||||
|
||||
def adjust_sensors():
|
||||
#Updating ranges from Scienta
|
||||
Scienta.update()
|
||||
if is_scienta_sampling():
|
||||
Scienta.update()
|
||||
|
||||
global SENSORS
|
||||
if SENSORS is not None:
|
||||
# Move integration to end
|
||||
|
||||
Reference in New Issue
Block a user