Commit cbbedad3 authored by bliss administrator's avatar bliss administrator
Browse files

fsh state string and raise ValueError in CorrectionScan

parent 0dd3c7a3
......@@ -119,8 +119,6 @@ def regions_correction_scans(no_points_list, acq_times, one_rd):
#print(f'1st index in the {idx}th corrections scan: {one_rd.pm.get_index(self._current_sample)}')
one_correction_scan.run() # run a single correction scan
# xes_regions to be replaced by "z3scan"
def xes_regions_simple(xes_energies, ene_steps , acq_times, *counter_args):
......@@ -499,7 +497,8 @@ class Rixs(ID26Measurement):
if self.get_param('xas_end') is not None:
# setup_globals.move_undulators(self.get_param('xas_end')) # best resolution before undulator peak
print('moving undulators')
#print('moving undulators') # this should go back when the line above works!
pass
# TODO: move together both!
......@@ -543,7 +542,7 @@ class Rixs(ID26Measurement):
self['xas_int'] = 0.0001
# retain fsh auto_status
fsh_before = setup_globals.fsh.state()
fsh_before = setup_globals.fsh.state_string
start_time=time.time();
# check input params
......@@ -666,9 +665,9 @@ class Rixs(ID26Measurement):
print('this should never happen')
# restore
if fsh_before == 'AUTO':
if fsh_before == 'Auto':
setup_globals.fsh.auto_on()
elif fsh_before == 'CLOSE':
elif fsh_before == 'Closed':
setup_globals.fsh.close()
setup_globals.fsh.auto_off()
else: # open
......@@ -737,13 +736,7 @@ class CorrectionScan(ID26Measurement):
try:
xes_main_max = self.get_param('xes_main_max')
except:
print('Xes_main_max not defined in the CorrectionScan, trying elsewhere.')
# try to get xes_main_max from the main_scan:
if xes_main_max is None:
try:
xes_main_max = self._main_scan.get_param('xes_main_max')
except:
print('Xes_main_max not defined in the main scan either, the macro will not work.')
raise ValueError('Xes_main_max not defined in the CorrectionScan, please, add xes_main_max value.')
if first_index is None:
first_index = self._main_scan._first_correction_index
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment