4. Goniometer alignment for XRR#
To start, place the Mythen in the most downstream position on the (what is the arm called?) Measure and record the gap value – typically around 90 mm. See Figure 4.5 for a photo identifying what the gap is.
4.1. XRD mode of the Photon Delivery System#
Future Tech!
Implement change_edge() in this profile.
Also need to explain how to use that to change energy
4.2. Direct beam camera#
Attach the mounting bracker for the direct beam camera to its mount point on the floor, as shown in Figure 4.1. When securing the mounting bracket to the floor, slide the spacing plate between the bracket’s horizontal member and the counterweight of the mu circle. This assures that the goniometer table moves freely during alignment and that the camera is close to the correct height relative to the beam.
Fig. 4.1 The mount for the direct beam camera#
Once the direct beam camera is in place and powered up, turn the analog video switch to the correct setting. This switch is on the XAS control station, as shown in Figure 4.2. Also mount the alignment pin on the goniometer head.
Fig. 4.2 (Left) The aligment pin mounted on the goniometer head. (Right) The switch for analog video signals.#
Verify that the direct beam hits the camera, then evaluate the size and shape of the beam. You may want to apply some attenuation to the beam – the YAG crystal bleeds at high flux, making it hard to assess the actual size and shape of the beam.
RE(mv(attenuator, 2))
The beam should be a small oval with the axes of the oval parallel and perpendicular to gravity. If the oval is slanted, try adjusting the yaw of the focusing mirror (See Section 2.5.3), for example
RE(mvr(m2.yaw, 0.01))
With the shadow of the pin in the focused, direct beam, note its
position on screen. Rotate the phi axis by 180 degrees. Note the new
position. Find the center point of these two positions and move
table.lateral to place the center of the beam at that center
point using command like this:
RE(mvr(table.lateral, 0.25))
Rotate the chi circle by -90 degrees so that the pin is in the horizontal plane. Repeat the procedure of noting the position, rotating phi by 180 degrees, and finding the center point. Place the beam at the center point by doing
RE(mvr(table.vertical, 0.25))
Read and record the table motor positions.
See Section 2.4 for details of table movement.
Future Tech!
Direct beam camera that can be read via AreaDetector. Do image
analysis on shadow of pin to compute correct table.vertical and
table.lateral positions.
4.3. Slit alignment#
Open the slits to their fully open position:
RE(mvr(slits.hsize, 8))
RE(mvr(slits.vsize, 8))
The direct beam should still be visible on the direct beam camera.
Note
What to do if the beam is not near the center of the slits?
To align and calibrate the goniometer slits, do
RE(align_slits())
The optional arguments to this plan are
nstepsNumber of steps in each scan (default is 31)
moveIf True, move to the centroid (default is True)
calibrateIf True, reset offset so that centroid is at 0
inttimeScan dwell time (default is 0.5 seconds)
The slit alignment procedure will run a linescan (need link to linescan explanation) on each of the four slits individually, plotting the signal on the monitor (need link to monitor explanation) versus slit position. This signal should be a step-like function, so the result is fit to an error function. The slit is moved to the centroid of the fitted error function and the offset of the slit is reset to define the zero position. The result of an individual slit scan looks like Figure 4.3.
Fig. 4.3 The fit to an individual slit scan, in this case, bottom blade.#
Once aligned and calibrated, set the slit size for the experiment, something like
RE(mvr(slits.hsize, 1))
RE(mvr(slits.vsize, 0.120))
4.4. Horizontal detector alignment#
With the beam in the center of the goniometer and in the center of the
slits, we next align the Mythen with the direct beam. To do so, we
perform a linescan of the dethor axis, moving the detector across
the incident beam.
The attenuator needs to be set to a value suitable for the incident beam, something like:
RE(mv(attenuator, 7))
then perform a linescan of the dethor motor:
RE(linescan(dethor, 'mythen', -3, 3, 61)
The live plot will show the progress of the scan. Once the scan is finished, some simple peak interpretation is performed, shown in Figure 4.4.
The peak-like shape is reduced to find the peak, the center of mass
(the “com”), and the center of the full width at half maximum
(the “cen”). In this case, dethor is moved to the cen value.
Fig. 4.4 Interpretation of the horizontal scan of dethor to center the
Mythen on the incident beam.#
At this point, take a count on the Mythen to find the position of the direct beam on the detector. Set the dwell_time to something short and do an exposure.
RE(mv(dwell_time, 0.1))
RE(count([mythen], 1))
The signal from the exposure will have a peak centered on some pixel. If the slits are 120 μm, then the direct beam will illuminate 3 or 4 strips, as the strip width is 50 μm, as shown on the Mythen2 specification sheet and there 1280 strips on the detector.
The direct beam should be around the 200th strip. Adjust the gap on the flight path holder so that is approximately true. A simple calculation of the center of the illuminated area from the count will be good enough. This places the beam closer to the bottom of the detector, thus most of the strips are above the direct beam – also, then, the reflected beam in an XRR experiment. See Figure 4.5.
Fig. 4.5 The gap measures the elevation of the Mythen and its flight path on the hand-operated vertical jack.#
4.5. Mythen Calibration#
With the beam around strip 200, run a linescan of delta, plotting the signal from the full MCA spectrum from the Mythen. This will be dominated by the integral under the 3 or 4 strip wide peak due to the direct beam.
This scan will find the extent of the detector in delta. As the beam passes over the detector, the signal will be approximately constant.
Typical scan parameters are:
RE(mythen_calibration(-4, 1, 1001))
The optional arguments to mythen_calibration are:
startFrom delta=0, the starting angle of the scan, in degrees
stopFrom delta=0, the ending position of the scan, in degrees
nstepsThe number of steps in the scan
inttimeThe dwell time at each point in the scan. Default is 0.1 seconds
forceWhen true, force the scan to run even if the beamline is not ready (e.g. no beam). Default is False.
The live plot will look something like Figure 4.6.
Fig. 4.6 A liveplot of the Mythen full MCA integration versus delta angle.#
When the linescan in delta is finished, some data reduction happens and a report is generated. This report is written to the screen. It is also written to a PowerPoint file in the data folder. It’s contents look something like Figure 4.7.
Fig. 4.7 An image of the PowerPoint report made on the Mythen calibration scan. (Note: there are some obvious errors in this picture. Picture will be updated once the report is fixed.)#
In the upper right corner of this report, the path to the proposal folder is written as is the UID of the Tiled record. The numerical results of the fit are given in the main text. A plot of fit to the beam position on the detector is shown in the plot. Form this fit, we get the formula for mapping delta angle to direct beam detector position, as well as values for the gap, the distance form the goniometer eucentric to the detector, and the pixel underneath the direct beam at delta=0.
Once this analysis is finished, the ROIs for the direct and reflected beam are set. Those values and the slits sizes are also in the report.
You can visualize the ROIs over the direct beam spectrum by moving delta to 0, doing a count, then plotting the spectrum just counted.
RE(mv(delta, 0))
RE(count([mythen], 1))
mythen.plot(N)
The value of N in the mythen.plot function identifies which ROI
will be shown in the plot.
mythen.plot(0)This will show the full MCA spectrum ROI, i.e. the entire detector
mythen.plot(1)This will show the direct beam ROI. As this is only a few strips wide, it is hard to see at full scale.
mythen.plot(2)This will show the reflected beam ROI. This is still quite narrow, but more apparent than the direct beam ROI.
Fig. 4.8 A zoomed-in view of the direct beam ROI on top of the MCA spectrum,
made using mythen.plot(1).#
As a final check of the instrument alignment and the setting of the detector ROIs, do a linescan with rather fine steps of delta. The live plot will show the direct beam ROI and the wider, reflected beam ROI as functions of delta. The narrower direct beam ROI should be well centered within the reflected beam ROI. If it is not, then something about the instrument alignment or the setting of the ROIs was done incorrectly.
At the end of the scan, the direct beam peak is interpreted for peak, com, and cen positions. The offset of the delta motor is reset so that the cen is at 0. This should be a very small change in offset.
Fig. 4.9 Showing the interpretation of the direct beam ROI as a function of delta angle. This should be narrow and centered very close to 0. Note that the com and cen are at the same position. This is a good alignment!#
Todo
Capture a live plot image and make Figure 4.9 a subfigure