Commit 4cacb83f authored by bliss administrator's avatar bliss administrator
Browse files

xas changes

parent 1d5a4f7a
Pipeline #77928 failed
......@@ -505,21 +505,18 @@ class ID26StepXAS(ID26Measurement):
# make sure all parameters for scan are defined:
if self.get_param('start_energy') is None:
if start_energy is None:
raise ValueError('Start energy not defined. Please, add the [\'start_energy\'] dictionary item.')
if self.get_param('end_energy') is None:
if end_energy is None:
raise ValueError('End energy not defined. Please, add the [\'end_energy\'] dictionary item.')
if self.get_param('int_energy') is None:
if int_energy is None:
raise ValueError('Step energy not defined. Please, add the [\'int_energy\'] dictionary item.')
print("Will do {0} loop(s)".format(_number_of_scans))
start_mono_en = self.get_param('start_energy')
end_mono_en = self.get_param('end_energy')
step_mono_en = self.get_param('int_energy')
no_intervals = np.ceil((end_mono_en-start_mono_en)/step_mono_en)
print('start,end, no_intervals', start_mono_en, end_mono_en, no_intervals)
no_intervals = np.ceil((end_energy-start_energy)/int_energy)
print('1st print start,end, no_intervals', start_energy, end_energy, no_intervals)
if self._move_scan_mode == 'in':
mot_counters = axes2counters(self._radiation_damage.xmot, self._radiation_damage.ymot)
......@@ -544,7 +541,7 @@ class ID26StepXAS(ID26Measurement):
if self._move_scan_mode == 'in':
self._first_correction_index = self.get_current_index()
my_xas_scan = setup_globals.ascan(ENERGY,start_mono_en, end_mono_en,int(no_intervals),acq_time, run = False)
my_xas_scan = setup_globals.ascan(ENERGY,start_energy, end_energy ,int(no_intervals),acq_time, run = False)
first_index =
......@@ -553,9 +550,9 @@ class ID26StepXAS(ID26Measurement):
self._nbpts = no_points
ok = True
else: #move_scan_mode False or "between"
my_xas_scan = setup_globals.ascan(ENERGY,start_mono_en, end_mono_en,int(no_intervals),acq_time, run = True)
my_xas_scan = setup_globals.ascan(ENERGY,start_energy, end_energy,int(no_intervals),acq_time, run = True)
ok = True
print(start_mono_en, end_mono_en, int(no_intervals), acq_time)
print(start_energy, end_energy, int(no_intervals), acq_time)
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