Method for correcting timing skew in X-ray data read out of an X-ray detector in a rolling shutter mode
09784698 · 2017-10-10
Inventors
- Roger D. Durst (Pfinztal, DE)
- Joerg KAERCHER (Madison, WI, US)
- Gregory A. Wachter (Sun Praire, WI, US)
Cpc classification
G06F17/17
PHYSICS
International classification
G01N23/207
PHYSICS
G06F17/17
PHYSICS
Abstract
In an X-ray detector operating in a rolling shutter read out mode, by precisely synchronizing sample rotation with the detector readout, the effects of timing skew on the image intensities and angular positions caused by the rolling shutter read out can be compensated by interpolation or calculation, thus allowing the data to be accurately integrated with conventional software. In one embodiment, the reflection intensities are interpolated with respect to time to recreate data that is synchronized to a predetermined time. This interpolated data can then be processed by any conventional integration routine to generate a 3D model of the sample. In another embodiment a 3D integration routine is specially adapted to allow the time-skewed data to be processed directly and generate a 3D model of the sample.
Claims
1. A method for correcting timing skew in X-ray crystallographic reflection data that is produced by a sample, detected by an X-ray detector and read out of the detector in a rolling shutter mode, comprising: (a) before collecting reflection data, setting a data collection frame width of the X-ray detector such that an angular width during which any X-ray reflection remains in Bragg resonance is substantially larger than the frame width; and (b) correcting collected reflection data by replacing the X-ray intensity of each pixel in a data frame by an intermediate X-ray intensity calculated at a reference time that is predetermined relative to a readout time of that frame.
2. The method of claim 1 wherein step (a) comprises: (a1) determining a rocking curve width of the sample; and (a2) setting the data collection frame width to a predetermined fraction of the rocking curve width.
3. The method of claim 2 wherein the predetermined fraction is less than one half.
4. The method of claim 3 wherein the predetermined fraction is one quarter.
5. The method of claim 2 wherein step (a1) comprises collecting a plurality of data frames, each data frame having a small frame width, determining a rocking curve of a plurality of X-ray reflections from the plurality of data frames and computing an average of the determined rocking curve widths.
6. The method of claim 1 wherein step (b) comprises calculating the intermediate X-ray intensity by interpolating the intensity value of a pixel in a data frame with the intensity value of the same pixel in a succeeding data frame.
7. The method of claim 6 in which the interpolation is a linear interpolation.
8. The method of claim 6 in which the interpolation is a Lagrange interpolation.
9. The method of claim 6 in which the interpolation is a spline interpolation.
10. The method of claim 1 further comprising processing the corrected data with a conventional X-ray integration routine in order to generate a 3D model of the sample.
11. The method of claim 1 wherein the sample is mounted on a rotating goniometer and wherein the method further comprises, before detecting the reflection data, synchronizing the detector readout and the goniometer rotation.
12. The method of claim 1 wherein the X-ray detector comprises a plurality of pixels, each of which detects X-ray crystallographic reflection data and wherein each pixel is reset after data have been read out.
13. The method of claim 1 wherein the X-ray detector comprises a plurality of pixels, each of which detects X-ray crystallographic reflection data and wherein each pixel is not reset after data have been read out.
14. The method of claim 1 wherein the X-ray detector is a CMOS detector.
15. The method of claim 1 wherein reflection data is read out of the detector non-destructively.
16. The method of claim 1 wherein reflection data is read out of the detector destructively.
17. The method of claim 1 wherein step (b) is performed by one of electronics in the X-ray detector and a processing system separate from the X-ray detector.
18. A method for correcting timing skew in X-ray crystallographic reflection data that is produced by a sample, detected by an X-ray detector and read out of the detector in a rolling shutter mode, comprising: (a) before collecting reflection data, determining a rocking curve width of the sample and setting a data collection frame width to a predetermined fraction of the rocking curve width such that an angular width during which any X-ray reflection remains in Bragg resonance is substantially larger than the frame width; and (b) correcting collected reflection data by replacing the X-ray intensity of each pixel in a data frame by an intermediate X-ray intensity calculated at a reference time that is predetermined relative to a readout time of that frame by interpolating the intensity value of the pixel with the intensity value of the same pixel in a succeeding data frame.
19. The method of claim 18 further comprising processing the corrected data with a conventional X-ray integration routine in order to generate a 3D model of the sample.
20. The method of claim 18 wherein the sample is mounted on a rotating goniometer and wherein the method further comprises, before detecting the reflection data, synchronizing the detector readout and the goniometer rotation.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
DETAILED DESCRIPTION
(9) In accordance with a first embodiment of the invention, the values of reflection intensities obtained during an actual readout are interpolated in time to calculate intensities which would have been produced by integrating all intensities for equal time periods. This is possible as long as the time interval during which any reflection remains in Bragg resonance is significantly longer than the angular width of a given frame (alternatively, the width (at half height) of the crystal sample rocking curve is substantially wider than the frame width). Typically, this condition implies a frame angular width of less than 0.3 degrees (this condition is often called “fine slicing” or “very fine slicing”).
(10) The steps comprising this embodiment are shown in
(11) Next, in step 404, the frame width which will be used to acquire an entire data set is set to a predetermined fraction of the determined rocking curve width. This predetermined fraction should be less then 0.5 of the rocking curve width and may, for example, be 0.25 of the rocking curve width. For example, if the width of the rocking curve is 0.6 degrees, the frame width might be set to one quarter of the rocking curve width or about 0.15 degrees or less. This requires that the entire data collection system, including the detector and the goniometer, be optimized to permit accurate fine slicing. Also, the rotation of the goniometer must be precisely synchronized with the readout of the detector. If these conditions can be met, then in step 406, a complete crystallographic data set is acquired using a detector with a rolling shutter mode and the frame width set in step 404.
(12) After the data set is acquired, the reflections are synchronized in step 408 by replacing the intensity value of each pixel by an intermediate intensity value calculated at a reference time occurring at the middle of the frame readout time. This is done as follows. Consider a particular pixel, j, and two adjacent frames, i and i+1, then the readout will produce two data points, one for intensity, I.sub.j,i which was read at time t.sub.j,i and also one for the intensity from the subsequent frame, I.sub.j,i+1. which was read at time t.sub.j,i+1. Ideally, it would be desirable to know the intensity at pixel j at some reference time, t.sub.ref that lies between the two readout times, that is, t.sub.j,i<t.sub.ref<t.sub.j,i+1 (for all j) where the relative location of t.sub.ref between t.sub.j,i and t.sub.j,i+1 is the same for all pixels. This intensity is shown schematically in
(13) For example, the intensity that would have been measured at a time t.sub.ref can be estimated by simple linear interpolation between the two actual measurements as set forth in the following formula:
(14)
(15) This linear interpolation is only approximate and will only be accurate as long as the readout time is short compared to the time that the Bragg reflection is in resonance.
(16) Of course, the “excess signal” I.sub.j,i.sup.excess(t.sub.j,i+1)=I.sub.j(t.sub.j,i+1)−I.sub.j(t.sub.ref) not assigned to the current frame would then be stored as the starting signal for the next frame (for the special case of the first frame in a series then the excess signal is zero, that is, I.sub.j,0.sup.excess(t.sub.j,0)=0).
(17) Including this excess charge from the previous frame then the interpolated frame intensity is given by:
(18)
Thus, the interpolation does not create or destroy any X-ray signal. A more accurate interpolation may be achieved by using a higher order fit, for example, a 3-point Lagrange interpolation can be used to yield a more accurate result. In this case three adjacent frames, i−1, i and i+1 are interpolated and the interpolated intensity at pixel j at a time t.sub.ref is given by:
(19)
(20) Other interpolation techniques could be used such as, for example, a spline interpolation. It is not necessary that the frames used in the interpolation be “real” frames. That is, some CMOS sensors have the capability to perform a non-destructive readout (in which the intensity in each pixel is read but the pixel is not reset to zero after the read operation). The interpolation formulae given above assume a normal, destructive readout. However, the interpolating frames (e.g., the frames taken at t.sub.i−1 and t.sub.i+1 above) can also be non-destructively read. The advantage with this arrangement is that the interpolation time can be less than the frame time (which in turn reduces the interpolation error).
(21) It is possible to perform this interpolation after data collection in software. However, a preferred implementation stores the data frames locally in the detector electronics and then the interpolation is performed in real time, in the detector electronics (in a FPGA or ALU). Next, in step 410, the data collected in step 406 is processed with conventional integration software to calculate the desired model. The process then ends in step 412.
(22) The advantage of this interpolation approach is that it allows the resulting data to be processed with conventional integration software that implicitly assumes synchronized data. However, the process of interpolation is necessarily approximate and thus introduces some error into the resulting integration. This error may be acceptable as long as the detrimental effect of the interpolation is small compared to the sum of all other error sources.
(23) In accordance with a second embodiment of the invention, an interpolation error is not introduced into the results. As noted above, 3D integration involves fitting the intensities from adjacent frames to a function in time or angle. While all existing integration routines assume that the angular range of each reflection is constant, this assumption is not necessary. Specifically, in accordance with the principles of the invention, the fit is performed on the actual angular range for each reflection.
(24) For example, assume that a particular frame I starts at t=t.sub.i and at a goniometer spindle angle φ.sub.i. The frame is integrated for some integration time, Δt, during which the sample is rotated through some angular range Δφ. The angular range for a reflection centered on a particular pixel j can then be calculated. In particular, the start angle for each pixel j is given by
(25)
where t.sub.j is the time at which pixel j is read out (relative to the start of the readout, that is, t.sub.j=j/N.sub.pixels*t.sub.read with N.sub.pixeis equal to the total number of pixels in the detector) and t.sub.read is the readout time for the detector.
Therefore, since the position j of each reflection is known and the time and angular position for the start of each frame are also known, the actual angular range for each reflection in each individual frame can be precisely calculated. Conventional 3D integration routines can then be used to perform the integration with these corrected angular ranges for each reflection substituted by the spindle angles used in the conventional routines. As an example, one conventional 3D integration routine is described in detail in an article entitled “Evaluation of Single-Crystal X-ray Diffraction Data from a Position-Sensitive Detector”, W. Kabsch, Journal of Applied Crystallography, v. 21, pages 916-924 (1988) which article is hereby incorporated herein in its entirety by reference. The integration routine described in this article can be used with the spindle angles φ and φ′ in the rotation equation shown in the article at page 919 replaced by the corrected angles φ.sub.j,i described above. The resulting equation for frame I is:
x′=D(u,φ.sub.j,i′−φ.sub.j,i)x≅x+u×x sin (φ.sub.j,i′−φ.sub.j,i)
where the modified spindle angles are defined as set forth above.
(26)
(27) While the invention has been shown and described with reference to a number of embodiments thereof, it will be recognized by those skilled in the art that various changes in form and detail may be made herein without departing from the spirit and scope of the invention as defined by the appended claims.