diff --git a/script/HoloScan.py b/script/HoloScan.py index 3b5bc7af..45fc9da6 100644 --- a/script/HoloScan.py +++ b/script/HoloScan.py @@ -17,8 +17,8 @@ adjust_sensors() set_adc_averaging() set_preference(Preference.PLOT_TYPES, {'Scienta spectrum':1}) -try:tryy: - ascan((ManipulatorPhi, ManipulatorTheta), SENSORS, (PHI_RANGE[0], THETA_RANGE[0]), (PHI_RANGE[1], THETA_RANGE[1]), STEPS, LATENCY, RELATIVE, zigzag = ZIGZAG, before_read=trig_scienta, after_read = after_readout) - finally: - if ENDSCAN: - after_scan() \ No newline at end of file +try: + ascan((ManipulatorPhi, ManipulatorTheta), SENSORS, (PHI_RANGE[0], THETA_RANGE[0]), (PHI_RANGE[1], THETA_RANGE[1]), STEPS, LATENCY, RELATIVE, zigzag = ZIGZAG, before_read=before_readout, after_read = after_readout) +finally: + if ENDSCAN: + after_scan() \ No newline at end of file diff --git a/script/ManipulatorScan.py b/script/ManipulatorScan.py index 62ee6688..e66d8907 100644 --- a/script/ManipulatorScan.py +++ b/script/ManipulatorScan.py @@ -15,7 +15,7 @@ set_adc_averaging() set_preference(Preference.PLOT_TYPES, {'Scienta spectrum':1}) try: - lscan(MOTOR, SENSORS, RANGE[0], RANGE[1], STEPS, LATENCY, RELATIVE, before_read=trig_scienta, after_read = after_readout) + lscan(MOTOR, SENSORS, RANGE[0], RANGE[1], STEPS, LATENCY, RELATIVE, before_read=before_readout, after_read = after_readout) finally: if ENDSCAN: after_scan() diff --git a/script/PhotonEnergy.py b/script/PhotonEnergy.py index ac3a5033..29ff0ebd 100644 --- a/script/PhotonEnergy.py +++ b/script/PhotonEnergy.py @@ -26,7 +26,7 @@ else: set_preference(Preference.PLOT_TYPES, {'Scienta spectrum':1}) try: - vscan(writables, SENSORS, VECTOR, True, LATENCY,False, before_read=trig_scienta, after_read = after_readout) + vscan(writables, SENSORS, VECTOR, True, LATENCY,False, before_read=before_readout, after_read = after_readout) finally: if ENDSCAN: after_scan() diff --git a/script/XPSSpectrum.py b/script/XPSSpectrum.py index 2f656519..b10c718b 100644 --- a/script/XPSSpectrum.py +++ b/script/XPSSpectrum.py @@ -56,8 +56,12 @@ try: for cur_iteration in range(vars[2]): plots[cur_range+1].setTitle(str(ranges[cur_range]) + " - iteration " + str(cur_iteration+1)) - trig_scienta() - spectrum_array = Scienta.spectrum.read() + while True: + wait_beam() + trig_scienta() + spectrum_array = Scienta.spectrum.read() + if beam_ok: + break if ydata is None: ydata = spectrum_array else: