23.5. Trajectory Scans

Data Collections on VMXi are performed by continuous motions of the goniometer with a Zebra sending triggers to the detector.

The two forms of data collection supported by the automated framework are Grid Scans and Rotation Omega Scans.

23.5.1. Hardware

The goniometer has three axes of interest for scanning, X, Y and Omega. The X and Y stages are virtual axes, and are performed by motion of the two scissor-jack stages X1 and X2. Omega is the single rotation stage.

There is a sample Z axis, but it is not used for scanning.

A rotating beam chopper is also considered as part of the scan, and acts as a fast shutter for data collections. This chopper is also used for position-compare triggering on the Zebra.

There is functionality in the controller that will cause the chopper to ignore the velocity profile in a scan. This gives the open/close behaviour required during trajectory scanning.

23.5.2. Trajectory Controller

The PMAC Trajectory Controller contains configuration for both a trajectory scan, and the PMAC coordinate system. Details for the system can be found in PMAC Design.

The representation in GDA is given by gda.device.trajectoryscancontroller.EpicsTrajectoryScanController and VMXi uses the Jython wrapper data_collection.scanning.trajectory_control.TrajectoryController (defined in i02-2-config/scripts).

23.5.2.1. Coordinate System

The goniometer sample X and Y stages are virtual and have to be mapped to the physical X1 and X2 stages by a coordinate system. Even if no trajectory is being configured or executed, these axes must be configured in the coordinate system if they ever need to be moved.

Other axes may be added into the system if they are required by a scan.

23.5.2.2. Trajectory Scan Axis Setup

The Coordinate System (CS) axes used by the trajectory scan have to be configured, setting if they are to be used (Use Axis), their resolution, offset and position arrays.

23.5.2.3. Trajectory Profile

A trajectory is specified by:

  • A position array for every scanned axis

  • A time profile array (time for each point in microseconds)

  • A velocity mode array

The velocity mode for each position determines how the velocity value for that position will be calculated. The options are:

  • Previous to Current - use the distance between previous and the current point in the velocity calculation

  • Current to Next - use the distance between current and the next point in the velocity calculation

  • Previous to Next - use the distance between the previous and the next point in the velocity calculation

  • Zero - set velocity to zero for this point

23.5.2.4. GDA

VMXi has logic to handle the setup of the controller, including the CS and axis specifications required for the two types of data collection and neutral operation.

The specifications are stored as JSON files in i02-2-config/etc/trajectory_control as omega_rotation.json, xy_grid.json, and standard.json.

The Jython TrajectoryController class has logic to switch between modes using these JSON files and prepare the trajectory profiles accordingly.

Creation of the position, velocity, and time profiles for the two scan types is handled by the data_collection.mapping_scan.points_generator

The profile has to include wind-up and wind-down times. Currently we also produce points for every conceptual scan point (trigger point), but this is not required; we could just provide the start and end position for the scan/row (and wind-up/down).

23.5.3. Zebra

A Zebra box is used for triggering the Eiger detector and recording axis positions during a scan.

The GDA controller is gda.device.zebra.controller.impl.ZebraImpl and VMXi uses the Jython wrapper data_collection.scanning.zebra_control.ZebraController (in i02-2-config/scripts).

The Zebra is configured to send one pulse per detector frame, gated by position compare on the chopper. The chopper rotates forward during the scan, being closed at 0, 45, 90, 135, … degrees and being open at 22.5, 67.5, 112.5, … degrees.

Use of the chopper in this way allows us to perform a snaked-grid with a single arm of the Zebra.

23.5.4. Rotation Scans

23.5.4.1. Description

RotationScanDescription(start=-30, step=0.1, num_points=600, point_time=0.002) 

23.5.4.2. Zebra

Setup:

  • Position Trigger: Chopper encoder

  • Position Dir: Positive

  • Time Units: ms

  • Capture: [Omega Encoder]

Gate:

  • Trigger Source: Position Compare

  • Gate Start: 22.5 - 9.234

  • Gate Width: 22.5

  • Gate Step: 45

  • Num Gates: 1

Pulse:

  • Pulse Source: Time

  • Pulse Start: 0

  • Pulse Width: 1

  • Pulse Delay: 0

  • Pulse Step: 2 ( = point_time in milliseconds)

  • Pulse Number: 600 ( = num_points)

23.5.4.3. Trajectory Profile

C: chopper (degrees)

ω: omega (degrees)

T: time (microseconds)

V: velocity mode (CTN = Current To Next, PTN = Previous To Next, PTC = Previous To Current)

Omega Profile

The trajectory profile arrays can be considered to have three parts:

  1. Wind-up and open chopper (Give half a second to reach speed over 10 degrees, keep chopper closed for this point). The first true trajectory point (second in the diagram) is to account for the chopper opening time, with omega’s value calculated based on the chopper’s time-to-open (5ms).

  2. Scan section (fully open chopper, simple progression of points at constant speed) - points are in black in the diagram. Note the first position has a time of 500us (the chopper opening time).

  3. Wind-down (close chopper, giving time for close, then final point to end trajectory with 1 degree wind-down in 1 second)

Note that the start position is not part of the trajectory profile - the goniometer is put into this position before the scan to provide the appropriate wind-up.

Also note, the chopper motor ignores the velocity profile, so will move at full speed.

23.5.5. Grid Scans

23.5.5.1. Description

GridScanDescription(rows=10, columns=100, row_interval=10, column_interval=10, num_points=1000, point_time=0.002)

x_start, y_start = 0., 0.

(row/column interval in microns, positions in mm, point_time in seconds)

23.5.5.2. Zebra

Setup:

  • Position Trigger: Chopper encoder

  • Position Dir: Positive

  • Time Units: ms

  • Capture: [X1 Encoder, X2 Encoder]

Gate:

  • Trigger Source: Position Compare

  • Gate Start: 22.5 - 9.234

  • Gate Width: 22.5

  • Gate Step: 45

  • Num Gates: 10 ( = number of rows)

Pulse:

  • Pulse Source: Time

  • Pulse Start: 0

  • Pulse Width: 1

  • Pulse Delay: 0

  • Pulse Step: 2 ( = point_time in milliseconds)

  • Pulse Nunber: 100 ( = columns)

23.5.5.3. Trajectory Profile

Grid Profile

Grids are broken up into rows.

Each row, like the rotation trajectory, has three sections:

  1. Beginning of the row (Chopper closed, wind-back, allow 1 second to reach position for turn-around)

  2. Constant velocity section (acquisition part)

  3. Row end (chopper closed)

The final row also adds a trajectory end point to wind-down the trajectory.