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

    Cpc classification

    International classification

    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) FIG. 1 shows a conventional laboratory X-ray diffraction system.

    (2) FIG. 2A is a schematic diagram representing data integration and readout sequences per row versus time in a shuttered readout mode for a conventional CCD detector.

    (3) FIG. 2B is a schematic diagram representing data integration and readout sequences per row versus time in a rolling shutter readout mode for a CMOS detector.

    (4) FIG. 3A shows X-ray data from three Bragg reflections acquired on a conventional X-ray detector using a shutter to block the X-ray beam during readout with integration times shown next to each reflection.

    (5) FIG. 3B shows X-ray data from the same three Bragg reflections as shown in FIG. 3A acquired on a CMOS X-ray detector using a rolling shutter mode with integration times shown next to each reflection.

    (6) FIG. 4 is a flowchart showing the steps in an illustrative process for correcting rolling shutter timing skew in accordance with a first embodiment of the invention.

    (7) FIG. 5 is a schematic plot of incident X-ray intensity on the vertical axis versus time on the horizontal axis for a single Bragg reflection.

    (8) FIG. 6 is a flowchart showing the steps in an illustrative process for correcting rolling shutter timing skew in accordance with a second embodiment of the invention.

    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 FIG. 4. The process begins in step 400 and proceeds to step 402. Since the data must be acquired such that the width of each frame is less than the width of the rocking curve of the sample, in step 402, the sample crystal rocking curve width is determined. This width can be determined by taking several frames of data with very small frame widths (for example, 0.1 degrees). The width (at half height) of the rocking curve from several reflections appearing in the frames can then be determined and averaged to determine the required rocking curve width.

    (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 FIG. 5 which is a schematic plot of incident X-ray intensity on the vertical axis versus time on the horizontal axis. The X-ray intensity that would have been observed at a given reference time, t.sub.ref, 500 can be found by interpolating between the X-ray intensity values 502 and 504 that actually were observed in two or more adjacent frames.

    (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) I j ( t ref ) = I j ( t j , i ) + .Math. I j ( t j , i + 1 ) - I j ( t j , i ) .Math. ( t j , i + 1 - t j , i ) ( t ref - t j , i )

    (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) I j ( t ref ) = I j ( t j , i ) + .Math. I j ( t j , i + 1 ) - I j ( t j , i ) .Math. ( t j , i + 1 - t j , i ) ( t ref - t j , i ) + I j excess ( t j , i )
    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) I j ( t ref ) = ( t ref - t j , i - 1 ) ( t ref - t j , i + 1 ) ( t j , i - 1 - t j , i ) ( t j , i - 1 - t j , i + 1 ) I j ( t j , i - 1 ) + ( t ref - t j , i ) ( t ref - t j , i + 1 ) ( t j , i - t j , i - 1 ) ( t j , i - 1 - t j , i + 1 ) I j ( t j , i ) + ( t ref - t j , i - 1 ) ( t ref - t j , i ) ( t j , i + 1 - t j , i ) ( t j , i - 1 - t j , i + 1 ) I j ( t j , i + 1 )

    (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) φ j , i = φ i + Δφ t j t read
    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) FIG. 6 shows the steps in this second embodiment. The process begins in step 600 and proceeds to step 602 where the spindle angles in a selected integration routine are modified as outlined above. Next, in step 604, a data set is collected using a detector in rolling shutter mode. In step 606, the data collected in step 604 is processed with the modified integration software to generate the desired model. The process then finishes in step 608.

    (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.