diff --git a/docs/source/tomoScanApp.rst b/docs/source/tomoScanApp.rst index b296df41..063ce569 100644 --- a/docs/source/tomoScanApp.rst +++ b/docs/source/tomoScanApp.rst @@ -1247,10 +1247,13 @@ Interlaced scan - Flag controlling whether the scan is regualr or interlaced. Choices are 'No' and 'Yes'. When "No" the angles are equally spaced using the Start angle, # of angles and Angle step parameters. When 'Yes' the list of angles is read from a file. * - $(P)$(R)InterlacedFileName - waveform - - The file name containing the list of interalced angles. - * - $(P)$(R)InterlacedRetakeFlat - - busy, - - Interlaced retake flat. Choices are 'Done' and 'Capture'. When 'Capture' a new set of flat field images will be collected. + - The file name containing the list of interalced angles in npy format. + * - $(P)$(R)InterlacedFileName + - waveform + - Interlaced file name containing the numpy list of angles to collect in interlaced mode. + * - $(P)$(R)StabilizationTime + - ao + - Settling time after the rotary stage motion is completed (used only in step scans). tomoScan_32ID_settings.req ~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tomoscan/tomoscan_pso.py b/tomoscan/tomoscan_pso.py index 32a64c25..6340a096 100644 --- a/tomoscan/tomoscan_pso.py +++ b/tomoscan/tomoscan_pso.py @@ -91,9 +91,6 @@ def begin_scan(self): # Call the base class method super().begin_scan() - # Compute the time for each frame - time_per_angle = self.compute_frame_time() - self.motor_speed = np.abs(self.rotation_step) / time_per_angle time.sleep(0.1) # Program the stage driver to provide PSO pulses @@ -276,10 +273,7 @@ def compute_positions_PSO(self): Assign the fly scan angular position to theta[] ''' overall_sense, user_direction = self._compute_senses() - # Get the distance needed for acceleration = 1/2 a t^2 = 1/2 * v * t - motor_accl_time = float(self.epics_pvs['RotationAccelTime'].get()) # Acceleration time in s - accel_dist = motor_accl_time / 2.0 * float(self.motor_speed) - + # Compute the actual delta to keep each interval an integer number of encoder counts encoder_multiply = float(self.epics_pvs['PSOCountsPerRotation'].get()) / 360. raw_delta_encoder_counts = self.rotation_step * encoder_multiply @@ -292,6 +286,13 @@ def compute_positions_PSO(self): # Change the rotation step Python variable and PV self.rotation_step = delta_encoder_counts / encoder_multiply self.epics_pvs['RotationStep'].put(self.rotation_step) + + # Compute the time for each frame + time_per_angle = self.compute_frame_time() + self.motor_speed = np.abs(self.rotation_step) / time_per_angle + # Get the distance needed for acceleration = 1/2 a t^2 = 1/2 * v * t + motor_accl_time = float(self.epics_pvs['RotationAccelTime'].get()) # Acceleration time in s + accel_dist = motor_accl_time / 2.0 * float(self.motor_speed) # Make taxi distance an integer number of measurement deltas >= accel distance # Add 1/2 of a delta to ensure that we are really up to speed.