computer programs
IDATEN and G-SITENNO: GUI-assisted software for coherent X-ray diffraction imaging experiments and data analyses at SACLA
aDepartment of Physics, Faculty of Science and Technology, Keio University, 3-14-1 Hiyoshi, Kohoku-ku, Yokohama 223-8522, Japan, and bRIKEN SPring-8 Center, 1-1-1 Kohto, Sayo, Sayo-gun, Hyogo 679-5148, Japan
*Correspondence e-mail: yamamoto@riken.jp, nakasako@phys.keio.ac.jp
Using our custom-made diffraction apparatus KOTOBUKI-1 and two multiport CCD detectors, cryogenic coherent X-ray diffraction imaging experiments have been undertaken at the SPring-8 Angstrom Compact IDATEN, which was developed to easily conduct four procedures during experiments: aligning KOTOBUKI-1, loading a flash-cooled sample into the cryogenic goniometer stage inside the vacuum chamber of KOTOBUKI-1, adjusting the sample position with respect to the X-ray beam using a pair of telescopes, and collecting diffraction data by raster scanning the sample with X-ray pulses. Named G-SITENNO, the other suite is an automated version of the original SITENNO suite, which was designed for processing diffraction data. These user-friendly software suites are now indispensable for collecting a large number of diffraction patterns and for processing the diffraction patterns immediately after collecting data within a limited beam time.
(SACLA) facility. To efficiently perform experiments and data processing, two software suites with user-friendly graphical user interfaces have been developed. The first is a program suite namedKeywords: coherent X-ray diffraction imaging; X-ray free-electron laser; structural analysis of non-crystalline particles.
1. Introduction
Coherent X-ray diffraction imaging (CXDI) has been used for structural analyses of non-crystalline particles, with dimensions reaching the submicrometer and micrometer scale (Miao et al., 1999, 2008). In CXDI experiments, the Fraunhofer diffraction pattern from a sample particle illuminated by coherent X-rays is recorded with sufficient sampling frequency to satisfy the oversampling (OS) condition (Miao et al., 2003) using an area detector. Then, in principle, the phase-retrieval algorithm (Fienup, 1982) reconstructs the sample particle's projected electron density. X-rays with short wavelengths on the scale of angstroms (hard X-rays) weakly interact with atoms' electrons and penetrate deeply into particles. Therefore, hard X-rays are suitable for visualizing the structures of thick sample particles.
An X-ray free-electron laser (XFEL) provides hard X-rays that are ideal for CXDI experiments. With a duration of several tens of femtoseconds, intense XFEL pulses enable us to record single-shot diffraction patterns of non-crystalline particles with a submicrometer size in the diffraction-before-destruction scheme (Chapman et al., 2006). In addition, XFEL–CXDI experiments have the potential to overcome the resolution limit resulting from radiation damage of the samples during long exposure to synchrotron X-rays (Howells et al., 2009). Because X-ray pulse trains reach a sample at a frequency of several tens to a hundred Hertz, numerous diffraction patterns can be collected by supplying fresh sample particles to the irradiation area (Seibert et al., 2011; Nakasako et al., 2013).
2. XFEL–CXDI experiments using the KOTOBUKI-1 diffractometer at SACLA
To collect single-shot diffraction patterns from 100 to 1200 nm non-crystalline particles from the fields of material science and biology, we have conducted XFEL–CXDI experiments at the SPring-8 Angstrom Compact et al., 2012) using our custom-made diffractometer KOTOBUKI-1 (Nakasako et al., 2013) and a pair of multi-port CCD (MPCCD) detectors (Kameshima et al., 2014).
(SACLA) facility (IshikawaThe experimental procedures are briefly and schematically outlined in Fig. 1(a). The KOTOBUKI-1 diffractometer is composed of a vacuum chamber equipped with a cryogenic sample stage on a goniometer, a loading device, and an alignment table that mounts the chamber and the device. Prior to experiments, the alignment table aligns the KOTOBUKI-1 diffractometer to the X-ray beam such that the sample is placed within the focal spot of the focusing optics. Non-crystalline particles are densely scattered on thin membranes or embedded in vitreous ice in sample disks' pinholes (Takayama & Nakasako, 2012; Nakasako et al., 2013; Takahashi et al., 2013; Sekiguchi et al., 2014). Using the specially designed carrier `FURINKAZAN' and the loading device, a cooled sample holder is delivered from a liquid-nitrogen bath to the goniometer's cryogenic stage.
The sample disk is then raster scanned to supply fresh sample particles to the irradiation area based on the goniometer's movement, which is synchronized with the X-ray pulses (Nakasako et al., 2013; Takahashi et al., 2013; Sekiguchi et al., 2014). Image data of the recorded diffraction patterns are sent to the MPCCD data acquisition (DAQ) system. The SITENNO program suite (Sekiguchi et al., 2014) processes the diffraction patterns to visualize the electron density maps of the sample particles on the SACLA high-performance computer (HPC), which is composed of 960 Intel(R) Xeon(R) CPU X5690 cores (3.47 GHz/core). To efficiently perform experiments and analyses, software with a graphical user interface (GUI) is necessary for operating KOTOBUKI-1, and these operations include sample loading and exchange, diffraction data acquisition, and data processing.
We have developed two user-friendly GUI software suites for XFEL–CXDI experiments (Fig. 1b). The first is a program suite named IDATEN, which is responsible for aligning the diffractometer, operating sample loading and exchange, and collecting diffraction data. The other software is a GUI version of the SITENNO suite (G-SITENNO) intended for automatic data processing and phase-retrieval calculation. In the present study, we describe the details of the two GUI software suites, which enable primitive users to easily access experiments and analyses of non-crystalline particles.
3. Collecting diffraction data with the GUI software suite IDATEN
The GUI software suite IDATEN is designed to control mechanical devices installed in the KOTOBUKI-1 diffractometer. The suite is coded using the LabVIEW language (National Instruments, USA) and consists of four sub-programs (IDATEN-1, IDATEN-2, IDATEN-3 and IDATEN-4) which are used independently for different purposes (Fig. 1). We currently execute IDATEN with LabVIEW 2010 installed on a Windows 7 desktop computer. The computer is equipped with sufficient hard disks and memory to satisfy the system requirements for LabVIEW 2010.
3.1. Controlling the axes of KOTOBUKI-1 using IDATEN-1
Each mechanical device in the KOTOBUKI-1 diffractometer has a set of movable axes to adjust its position (Fig. 1). For example, the alignment table used for positioning the vacuum chamber has three translational axes (TBZ1, TBZ2 and TBY, as shown in Fig. 1). The position of each silicon blade comprising the guard slit is adjusted using its horizontal (SRY and SLY) and vertical (SRZ and SLZ) translation axes. The position of a sample holder on the cryogenic sample stage is adjusted by the goniometer, which is composed of three orthogonal translation stages (GNX, GNY and GNZ) that are mounted on a rotation stage (GNR). Used to monitor X-ray beam intensity, a PIN photodiode is inserted using the PDT translation axis. A sample disk mounted on the cryogenic pot is viewed using two telescopes (UWZ 400F, Union Optical, Japan) installed outside the vacuum chamber. The focus of each telescope is adjusted by translating the lens unit (TRF and TLF). The IDATEN-1 subprogram is designed to remotely control these axes based on the basic input of pulse values, which drive the targeted axes' stepping motors to attain the desired position (Fig. 2a).
Manual operation of IDATEN-1 is suitable for carefully adjusting the positions of the silicon blades near the X-ray beam if MPCCD detectors monitor background and parasitic scattering around the direct beam. In addition to manual operation, IDATEN-1 provides two user-friendly modes to automatically move the cryogenic pot to specified positions using combinational control of the goniometer axes. The first is the `Go to Sample Mount Position' mode for sample loading, and the other is the `Go to Rotation Center Position' mode for X-ray exposure. In addition, to measure the intensity profile of a focused X-ray beam, IDATEN-1 invokes automatic knife-edge scanning software (Nakasako et al., 2013) installed in the PC for beamline control (Yumoto et al., 2013).
3.2. Automatic control of the sample loader using IDATEN-2
The IDATEN-2 subprogram controls the automatic loading of a sample holder from the airlock to the goniometer's cryogenic pot in the vacuum chamber (Fig. 1). The program controls two gate valves (GV1 and GV2 in Fig. 1), a pair of vacuum control valves for the airlock (LVL), and the transfer rod (RDT), which is equipped with claws at the tip to catch the sample holder (CCR). The program is operated using a specially designed touch screen (Fig. 2b).
Immediately after setting a cooled sample holder inside the airlock using the `FURINKAZAN' carrier (Fig. 1), we evacuate the airlock by pushing the `Vac-ON' button. When the pressure of the airlock reaches approximately 1 Pa, the cover of the carrier is manually opened, and then the automatic sequence (as described in the following discussion) begins when the `Mount' button is pushed. The two gate valves are first opened. Then, coming into the airlock, the transfer rod catches the sample holder and takes the holder to the cryogenic pot at the sample mount position. When the `Dismount' button is pushed after data has been collected, the transfer rod removes the sample holder from the pot and brings the sample holder back into the carrier. By monitoring the open/close status of the cover with a photosensor, IDATEN-2 provides an interlock to safely avoid collision between the transfer rod and the carrier's cover.
3.3. Setting the sample at the focal spot of the X-ray using IDATEN-3
After setting a sample holder on the cryogenic stage, we adjust the position of the sample disk in the holder with respect to the X-ray beam's position using the IDATEN-3 subprogram, which controls the goniometer axes of the sample stage and the focus of each UWZ 400F telescope, which has high magnification and a long working distance. IDATEN-3 displays images from the two telescopes, and, to provide a set of stereoview images of the sample disk, the optical axes of these telescopes cross at approximately 60°. When users click on the centers of the sample disks in the stereo images that are displayed on a monitor, IDATEN-3 calculates the three-dimensional position of the center of the sample disk and moves the disk to the beam position using combinational control of the goniometer axes. To perform this procedure, the telescopes' optical axes are calibrated to the beam position using the crossed 50 µm-diameter tungsten wires that are glued on a sample holder prior to data collection.
In addition, we determine the edge positions of the pinhole in a mounted sample disk based on the pulse values from goniometer axes GNY and GNZ by scanning the disk along the horizontal and vertical directions under irradiation by a heavily attenuated X-ray beam. During scanning, the X-ray beam passes through only the pinhole area. Therefore, we can identify the pinhole's edge position by monitoring the
with a photodiode inserted along the PDT axis. This procedure is particularly important for defining the raster-scanning area of sample disks with pinholes ranging from 300 to 500 µm.3.4. Raster scanning a sample for data collection using IDATEN-4
In XFEL–CXDI experiments, sample particles are destroyed by intense X-ray pulses of 1010–1011 photons µm−2 pulse−1 with wavelengths of 1–3 Å (Nakasako et al., 2013). Consequently, fresh sample particles must be delivered into the irradiation area by raster scanning on the sample pinhole with the combinational drive of translation axes GNY and GNZ. The sample holder is moved at approximately 30 to 50 µm steps per pulse (Nakasako et al., 2013), and X-ray pulses stochastically hit sample particles, which are randomly dispersed on the membrane of a sample disk (Fig. 1a).
IDATEN-4 controls the automatic raster scanning of a sample according to the input values for the number of shots and the step size per pulse in the vertical and horizontal directions (Fig. 2d). When a raster scan begins, IDATEN-4 requests that diffraction patterns be recorded to the storage of the SACLA DAQ system. In accordance with timing pulses from the linear accelerator, IDATEN-4 synchronously controls the movement of the sample stage and the open/close status of a pulse selector installed upstream of the beamline (Fig. 1).
IDATEN-4 requires the name of the mounted sample and a sample identification code (either M or B), which G-SITENNO references during automated data processing. Code M is the label for samples from material science, while code B represents biological samples. The DAQ system automatically gives RUN and TAG numbers to each raster scan and each diffraction pattern, respectively.
4. G-SITENNO: a GUI version of SITENNO for automated data processing
We developed the SITENNO suite to process diffraction data, as reported recently (Sekiguchi et al., 2014). The suite is composed of four subprograms: TAMON, JIKOKU, KOHMOKU and ZOCHO. TAMON selects diffraction patterns worthy of analysis from several diffraction patterns obtained in each raster scan using threshold values relevant to the effective resolution. For each diffraction pattern, JIKOKU determines the beam center positions in the two MPCCD detectors and evaluates the centrosymmetry of the small-angle region, where the is approximated as a plane. KOHMOKU merges diffraction patterns from the two MPCCD detectors using the parameters reported by JIKOKU. Finally, developed in our laboratory (Kodama & Nakasako, 2011; Oroguchi & Nakasako, 2013), ZOCHO reconstructs sample particles' projected electron densities using various phase-retrieval algorithms (Fienup, 1982; Luke, 2005; Martin et al., 2012; Rodriguez et al., 2013).
In the previous report (Sekiguchi et al., 2014), we processed diffraction patterns by manually submitting commands at the terminal of the SACLA HPC. However, it was inconvenient to efficiently process a large number of diffraction patterns within limited beam time. Because manual operation is time-consuming and inefficient for busy users conducting experiments, we have developed a GUI-assisted SITENNO (G-SITENNO) subprogram to perform automatic data processing of diffraction patterns. The GUI front-end is coded using the C++ language with the Qt GUI toolkit (Digia, Finland) (Fig. 3). During the present development of G-SITENNO, the JIKOKU and KOHMOKU subprograms have been parallelized.
Any user with an account to access the HPC can run G-SITENNO using network access through a Unix-like terminal. Currently, G-SITENNO can process 1000 diffraction patterns in approximately 1000 s.
4.1. Automated data processing using G-SITENNO
In XFEL–CXDI experiments, we first collect diffraction patterns from cuboid-shaped copper oxide particles (Kuo et al., 2007) to determine the beam center positions and relative inclination of the two MPCCD detectors using the JIKOKU subprogram (Nakasako et al., 2013; Sekiguchi et al., 2014). Throughout a beam time, the beam center positions of the two MPCCD detectors in each diffraction pattern are refined using the locations determined to be the initial positions.
G-SITENNO typically monitors the status of raster-scan data collection using a background-running script, which submits a query to the DAQ system to confirm that a raster scan has finished at every 5 s interval. When the DAQ system returns a raster scan's finish time, the script automatically invokes the data conversion program, which assembles recorded diffraction data and outputs them as one file in the HDF5 format (The HDF Group, 2000) (Fig. 1b).
For each diffraction pattern, TAMON evaluates the effective resolution. The effective resolution is defined as the edge of the resolution shell, where the signal-to-noise ratio of the maximum diffraction intensity (I/σ) is larger than 2. TAMON selects diffraction patterns worthy of analysis by examining whether the effective resolution is better than 40 nm for M (material) samples or 70 nm for B (biological) samples. This criterion is currently defined based on our experiences with XFEL–CXDI experiments over the past two years.
The front panel of G-SITENNO displays both the status of the data processing for each raster-scan RUN and the number of diffraction patterns selected by TAMON (Fig. 3a). The second panel, which is available for each set of raster-scan data after SITENNO completes the four-step processing procedure, displays the quality of the processed data and the reconstructed projected electron densities, which are represented as frequency distributions of different parameters (Fig. 3b). The quality of the diffraction data is reported in terms of total intensity, effective resolution and centrosymmetry. In addition, the of the beam center position in the MPCCD Octal detector is also displayed. The success and failure of the phase-retrieval calculation is informed by using the relevant parameters, such as γ, RF and the oversampling ratio values conventionally used in CXDI structural analyses. The parameter γ represents the ratio of the total reconstructed densities inside and outside the sample (Miao et al., 2003). RF represents the sum of the differences between the calculated Fourier modulus of the retrieved electron density maps and the amplitudes of the observed diffraction patterns (Rodriguez et al., 2013). The oversampling ratio represents sampling frequency for the recorded diffraction patterns with the area detector (Miao et al., 2003). When we obtain correct images, γ and RF tend to decrease. However, it should be noted that these parameters are used only as necessary conditions to examine the success of the phase-retrieval calculations.
4.2. Montage graphically summarizing the results
A set of diffraction patterns, both the phase-retrieved G-SITENNO outputs a macro file for image-processing software ImageJ (Schneider et al., 2012) to compile a file, which includes all processed diffraction patterns as a montage (Fig. 4). During beam time, G-SITENNO conducts a phase-retrieval calculation for each diffraction pattern only once. However, a montage of each scan is useful for determining which TAGs should undergo further analysis.
and the calculated diffraction pattern from the map, are helpful for visually determining whether the pattern is worthy of further analysis.5. Conclusion and outlook
The IDATEN suite is now essential for alignment, sample loading and data collection in cryogenic XFEL–CXDI experiments using the KOTOBUKI-1 diffractometer. In particular, the IDATEN suite has enabled us to collect 39834 diffraction patterns from 391 raster scans of 86 non-crystalline particle samples during 59 h, a period that included alignment and sample exchange. To date, IDATEN has contributed to data collection for multiple research groups (Nakasako et al., 2013; Takahashi et al., 2013; Nakagawa et al., 2013; Xu et al., 2014). Data processed by G-SITENNO immediately after the raster scan are helpful for preparing a sample for subsequent experiments within the beam time. The two GUI program suites are excellent tools for collecting and analyzing large quantities of data and for developing new experimental procedures in XFEL–CXDI experiments, presently and in the future.
Although this paper has focused on the application to CXDI experiments at SACLA, the two software suites are available for experiments in SPring-8 as well. Specifically, cryogenic CXDI experiments of material and biological samples using the KOTOBUKI-1 diffractometer were conducted at SPring-8 (Takayama & Nakasako, 2012; Nakasako et al., 2013). In particular, cryogenic synchrotron–CXDI experiments dramatically reduce radiation damage to biological specimens, and consequently ∼10 nm spatial resolution can be achieved (Howells et al., 2009). Moreover, because IDATEN controls the rotation axis of the sample [GNR in Fig. 1(a)], users can obtain three-dimensional structures of frozen hydrated biological samples using cryogenic CXDI tomography (Nishino et al., 2009; Jiang et al., 2010). With slight modification to data input and pre-processing of diffraction patterns, G-SITENNO will also be useful for quick data analyses within limited beam time at SPring-8.
Acknowledgements
The authors are grateful to Drs Takashi Kameshima, Yasumasa Joti and Kensuke Tono of SACLA for their kind help during the XFEL–CXDI experiments and data analyses. The implementation of the two GUI suites was supported by the grant for XFEL key technology and the X-ray
Priority Strategy Program from the MEXT to MN and MY. Sample preparation and software development were also supported by grants from the JSPS to MN (No. 24654140) and TO (No. 26800227) and from the MEXT to MN (Nos. 23120525 and 25120725) and TO (No. 24113723 and 26104535). For software development, we used diffraction data collected in cryogenic XFEL–CXDI experiments performed at SACLA (proposal Nos. 2012A8005, 2012B8037, 2013A8043, 2013B8049 and 2014A8033) and cryogenic synchrotron–CXDI experiments at SPring-8 (proposal Nos. 20090097, 20100035 and 20110006).References
Chapman, H. N. et al. (2006). Nat. Phys. 2, 839–843. Web of Science CrossRef CAS Google Scholar
Fienup, J. R. (1982). Appl. Opt. 21, 2758–2769. CrossRef CAS PubMed Web of Science Google Scholar
Howells, M., Beetz, T., Chapman, H., Cui, C., Holton, J., Jacobsen, C., Kirz, J., Lima, E., Marchesini, S., Miao, H., Sayre, D., Shapiro, D., Spence, J. & Starodub, D. (2009). J. Electron Spectrosc. Relat. Phenom. 170, 4–12. Web of Science CrossRef CAS Google Scholar
Ishikawa, T. et al. (2012). Nat. Photon. 6, 540–544. Web of Science CrossRef CAS Google Scholar
Jiang, H., Song, C., Chen, C. C., Xu, R., Raines, K. S., Fahimian, B. P., Lu, C. H., Lee, T. K., Nakashima, A., Urano, J., Ishikawa, T., Tamanoi, F. & Miao, J. (2010). Proc. Natl Acad. Sci. USA, 107, 11234–11239. Web of Science CrossRef CAS PubMed Google Scholar
Kameshima, T., Ono, S., Kudo, T., Ozaki, K., Kirihara, Y., Kobayashi, K., Inubushi, Y., Yabashi, M., Horigome, T., Holland, A., Holland, K., Burt, D., Murao, H. & Hatsui, T. (2014). Rev. Sci. Instrum. 85, 033110. Web of Science CrossRef PubMed Google Scholar
Kodama, W. & Nakasako, M. (2011). Phys. Rev. E, 84, 021902. Web of Science CrossRef Google Scholar
Kuo, C. H., Chen, C. H. & Huang, M. H. (2007). Adv. Funct. Mater. 17, 3773–3780. Web of Science CrossRef CAS Google Scholar
Luke, D. R. (2005). Inverse Probl. 21, 37–50. Web of Science CrossRef Google Scholar
Martin, A. V. et al. (2012). Opt. Express, 20, 16650. Web of Science CrossRef Google Scholar
Miao, J., Charalambous, P., Kirz, J. & Sayre, D. (1999). Nature (London), 400, 342–344. Web of Science CrossRef CAS Google Scholar
Miao, J., Ishikawa, T., Anderson, E. & Hodgson, K. (2003). Phys. Rev. B, 67, 174104. Web of Science CrossRef Google Scholar
Miao, J., Ishikawa, T., Shen, Q. & Earnest, T. (2008). Annu. Rev. Phys. Chem. 59, 387–410. Web of Science CrossRef PubMed CAS Google Scholar
Nakagawa, A., Higashiura, A., Iwasaki, K., Murakami, M., Yamashita, E., Takeda, K., Hirano, Yu, Hanazono, Y., Takaba, K., Hibi, M., Tomisaki, Y. & Miki, K. (2013). Acta Cryst. A69, s28. CrossRef IUCr Journals Google Scholar
Nakasako, M. et al. (2013). Rev. Sci. Instrum. 84, 093705. Web of Science CrossRef PubMed Google Scholar
Nishino, Y., Takahashi, Y., Imamoto, N., Ishikawa, T. & Maeshima, K. (2009). Phys. Rev. Lett. 102, 018101. Web of Science CrossRef PubMed Google Scholar
Oroguchi, T. & Nakasako, M. (2013). Phys. Rev. E, 87, 022712. Web of Science CrossRef Google Scholar
Rodriguez, J. A., Xu, R., Chen, C.-C., Zou, Y. & Miao, J. (2013). J. Appl. Cryst. 46, 312–318. Web of Science CrossRef CAS IUCr Journals Google Scholar
Schneider, C. A., Rasband, W. S. & Eliceiri, K. W. (2012). Nat. Methods, 9, 671–675. Web of Science CrossRef CAS PubMed Google Scholar
Seibert, M. M. et al. (2011). Nature (London), 470, 78–81. Web of Science CrossRef CAS PubMed Google Scholar
Sekiguchi, Y., Oroguchi, T., Takayama, Y. & Nakasako, M. (2014). J. Synchrotron Rad. 21, 600–612. Web of Science CrossRef CAS IUCr Journals Google Scholar
Takahashi, Y., Suzuki, A., Zettsu, N., Oroguchi, T., Takayama, Y., Sekiguchi, Y., Kobayashi, A., Yamamoto, M. & Nakasako, M. (2013). Nano Lett. 13, 6028–6032. Web of Science CrossRef CAS PubMed Google Scholar
Takayama, Y. & Nakasako, M. (2012). Rev. Sci. Instrum. 83, 054301. Web of Science CrossRef PubMed Google Scholar
The HDF Group (2000). HDF5 Group, https://www.hdfgroup.org/HDF5 . Google Scholar
Tono, K., Inubushi, Y., Sato, T., Togashi, T., Ohashi, H., Kimura, H., Takahashi, S., Takeshita, K., Tomizawa, H., Goto, S. & Yabashi, M. (2013). J. Phys. Conf. Ser. 425, 072006. CrossRef Google Scholar
Williams, T. & Kelley, C. (2014). gnuplot 4.6: an Interactive Plotting Program, https://www.gnuplot.info/docs_4.6/gnuplot.pdf . Google Scholar
Xu, R. et al. (2014). Nat. Commun. 5, 4061. Web of Science PubMed Google Scholar
Yumoto, H. et al. (2013). Nat. Photon. 7, 43–47. Web of Science CrossRef CAS Google Scholar
© International Union of Crystallography. Prior permission is not required to reproduce short quotations, tables and figures from this article, provided the original authors and source are cited. For more information, click here.