2024 Volume 33 Issue 12
Article Contents

Fei Xie, Mei Xie, Baoyu Song, Qiaoyu Guo, Xuechen Jiao. ScatterX: A software for fast processing of high-throughput small-angle scattering data[J]. Chinese Physics B, 2024, 33(12): 120101. doi: 10.1088/1674-1056/ad8b36
Citation: Fei Xie, Mei Xie, Baoyu Song, Qiaoyu Guo, Xuechen Jiao. ScatterX: A software for fast processing of high-throughput small-angle scattering data[J]. Chinese Physics B, 2024, 33(12): 120101. doi: 10.1088/1674-1056/ad8b36

ScatterX: A software for fast processing of high-throughput small-angle scattering data

  • Received Date: 30/07/2024
    Accepted Date: 09/10/2024
    Available Online: 01/12/2024
通讯作者: 陈斌, bchen63@163.com
  • 1. 

    沈阳化工大学材料科学与工程学院 沈阳 110142

  1. 本站搜索
  2. 百度学术搜索
  3. 万方数据库搜索
  4. CNKI搜索

Figures(18)  /  Tables(6)

Article Metrics

Article views(792) PDF downloads(4) Cited by(0)

Access History

ScatterX: A software for fast processing of high-throughput small-angle scattering data

Abstract: Scattering experiments become increasingly popular in modern scientific research, including the areas of materials, biology, chemistry, physics, etc. Besides, various types of scattering facilities have been developed recently, such as lab-based x-ray scattering equipment, national synchrotron facilities and large neutron facilities. These above-mentioned trends bring up fast-increasing data amounts of scattering data, as well as different scattering types (x-ray, neutron, laser and even microwaves). To help researchers process and analyze scattering data more efficiently, we developed a general and model-free scattering data analysis software based on matrix operation, which has the unique advantage of high throughput scattering data processing, analysis and visualization. To maximize generality and efficiency, data processing is performed based on a three-dimensional matrix, where scattering curves are saved as matrices or vectors, rather than the traditional definition of paired values. It can not only realize image batch processing, background subtraction and correction, but also analyze data according to scattering theory and model, such as radius of gyration, fractal dimension and other physical quantities. In the aspect of visualization, the software allows the modify the color maps of two-dimensional scattering images and the gradual color variation of one-dimensional curves to suit efficient data communications. In all, this new software can work as a stand-alone platform for researchers to process, analyze and visualize scattering data from different research facilities without considering different file types or formats. All codes in this manuscript are open-sourced and can be easily implemented in matrix-based software, such as MATLAB, Python and Igor.

1.   Introduction
  • With the development of light source technology (e.g., synchrotrons and lasers), the brightness and stability of light beams have been greatly improved. In recent years, small angle scattering equipments with synchrotron radiation light sources,[14] high brightness desktop x-ray source spallation neutron sources,[58] and reactors as light sources have been developed rapidly and widely used.[9,10] After long-term development, the application of this technology has been so developed that covers many research fields such as porous carbon materials,[1113] catalysts,[1416] carbon fibers,[1719] biological macromolecules (including DNA,[20,21] RNA,[22,23] proteins,[24,15,26] etc.), polymer,[27,28] metal–organic framework materials,[29,30] chiral supramolecular gels,[31,32] etc. Small-angle scattering (SAS) finds very broad applications because of its unique capability to investigate multi-scale structures within a single measurement. This feature makes it suitable for the structural investigation of complex materials, which are usually difficult topics for imaging methods. With the help of SAS, many specific research contents appear and receive tremendous development, such as porosity in porous carbon materials,[33] fractal types and their dimensions in catalysts,[34] distance distribution function in active protein research,[35] aspect ratio and orientation degree of micropores in carbon fiber research,[36] long period and lamellar thickness in polymer[37] and other complex structural information. Although the data collection is easy, data processing and analysis of SAS are time-consuming and complicated, as well as require a high level of expertise and knowledge. At present, several softwares stand out, such as SAXSutilities,[38] BioXTAS RAW,[39] SASView,[40] ScatterBrian,[41] Fit2d,[42] NIKA,[43] EDFplot,[44] pyFAI,[45] IRENA,[46] ATSAS,[47] McSAS,[48] and SASfit.[49] Based on our humble experience, the major features of several representative softwares are listed in Table 1.

    From Table 1, it is seen that not all softwares are equally suitable for image processing, data reduction, and analysis. Besides, arbitrary platforms have been adopted for software coding. Although certain platforms are popular (i.e., Python, C, and C++), some are obsolete (i.e., Fortran) or limited to use (i.e., IDL and Igor Pro). The low popularity of platforms certainly brings some drawbacks to the development of SAS software. For example, it is well known to the SAS community that the data processing and analysis algorithm in Nika is decent and highly efficient, but the relatively less-known Igor Pro platform stops many from studying or modifying the well-documented coding. To guarantee a balance between functionality, algorithm, and community openness, MATLAB® is chosen as the platform for ScatterX. A large number of significantly different data formats have emerged in various experimental types. As a software with rich application scenarios, MATLAB® supports multiple complex import functions, including but not limited to TXT, DAT, TIF, EDF, and H5 formats.

    With the steadily increasing application of SAS platforms, involving synchrotron-based, neutron-based, and lab-based ones, users are not limited to narrow choices of equipments. For example, many users ordinarily travel between different synchrotrons worldwide all year round for different beamtimes, and build their own lab-based SAS instrument in the meantime. This revolutionary condition brings several noteworthy points. (i) Widely varying brands of detectors used by different SAS platforms deliver many distinct data types, which renders the previously developed SAS analysis software hard to accommodate all these data formats in a single framework. (ii) Abundant SAS hardware resources provide the users the opportunity to collect a large amount of data, the sheer volume of which makes it a challenge to process all the data in a fast and efficient way. (iii) The flux of various light sources changes in an exponential way, which makes a single color rendering scheme difficult to settle this huge intensity scale in a single run. (iv) Data visualization has been developing steadily, which makes the operational interfaces designed by the previously built software less efficient to deliver important scientific points. All the above points will be addressed by ScatterX, which is a highly interactive SAS data analysis program with flexible format compatibility. Functionally, the program can calculate the radius of gyration, long period, fractal dimension and other related physical quantities, one-dimensional electron density correlation function, and distance distribution function for different types of data sources, including synchrotron, neutron, and lab-based sources. Moreover, all functions can realize automatic or semi-automatic batch processing, which will greatly improve the analysis efficiency of high flux scattering data. The ScatterX software introduced in this paper is developed based on the GUI application program in MATLAB R2022B (MathWorks Inc., Natick, Ma, USA).[50]

2.   Concepts
  • There is a reciprocal relationship between the distribution of scatterers in real space and the space where x-ray scattering occurs.[51] This reciprocal correlation can be expressed mathematically as q = 2 π/d, where d and q are the distances in real space and reciprocal space, respectively.

    In the experiment, the incident monochromatic light penetrates the sample and projects the reciprocal spatial information to the two-dimensional detector in the direction of beam propagation. The two-dimensional grayscale image collected by the detector can qualitatively and quantitatively describe the scatterer structure information. For example, different scattering images appear in isotropic protein particles[52] or ellipsoids with anisotropic regular arrangements.[53] As shown in Fig. 1, when the scatterer’s distribution is isotropic, the two-dimensional scattering image is symmetrical around the central spot of the beam. When the distribution of the scatterer is anisotropic, the two-dimensional scattering image takes on an asymmetric form along the meridian and equatorial directions.[54]

  • In small-angle scattering, the sample scattering intensity measured by the detector is a relative intensity. The absolute intensity is the ratio of the scattering intensity to the incident intensity, also known as the differential scattering cross section per unit volume. The user can obtain physical parameters related to mass and density (such as molecular weight and volume fraction) through absolute intensity.[55] There are usually two methods for converting the relative intensity into absolute intensity, namely, the attenuation method and the standard sample method. The attenuation method is to physically attenuate the incident light intensity by absorbing foils (such as Ni sheets, Si sheets, etc.) of different thicknesses or rotating disks to reach a range that can be accurately measured, and then extrapolate the incident intensity. When x-rays pass through a substance, the attenuation law is

    Specifically, a batch of Ni sheets with gradient thickness is used to test the intensity I after attenuation by the Ni sheets at a scattering angle of 0. At this point, there is

    Plot the thickness t of the Ni sheet using ln I, and when t is extrapolated to 0, the intercept is the zero-degree angle incident intensity.

    The standard sample method uses samples with known differential scattering cross sections, such as water,[56,57] silica suspension,[58,59] gold sol,[60] polyethylene,[6165] glassy carbon,[59] etc. as standard samples.[66] The scattering intensity of the standard sample is tested under the same test conditions as the experimental samples. The relative scattering intensity of the investigated sample is converted into the absolute intensity.

    The following are the principles and steps of absolute intensity calibration. The intensity value recorded by the detector in the small-angle scattering experiment follows the relationship

    where I(q) is the measured scattering intensity at the location of q, q is the scattering vector, I is the incident light flux, A is the area illuminated on the sample, ΔΩ is the solid angle centered on the specific scattering direction related to q, η is the detector quantum efficiency, T is the sample transmittance, d is the sample thickness, ∂Σ/∂Ω is the differential scattering cross section per unit volume, and t is the exposure time.

    When measuring using the standard sample method, keep the test conditions the same, that is, the spot irradiation area, solid angle and detector quantum efficiency remain unchanged. At this time, the following formula can be obtained, in which the subscripts s and st represent the sample to be tested and the standard sample, respectively:

    The product of light intensity I (i.e., I0_st and I0_ s) and transmittance T (i.e., Tst and Ts) is the light intensity after passing through the sample, which is recorded as H (i.e., Hst and Hs) using an ionization chamber or diode. In short, the calculation formula for the absolute intensity of the investigated sample is

    Therefore, it is necessary for the user to provide thickness and ionization chamber counts for all samples in addition to scattering images to obtain accurate absolute intensities.

  • In SAXS, the radius of gyration (Rg) is an important parameter used to evaluate the size of scattering objects. It represents the average size of the scattering object during the scattering process. It can be calculated using the Guinier law, which describes the exponential decrease in scattering intensity as a function of the scattering vector at small angles

    where I0 is the zero-angle intensity after the transmission of the sample, q is the scattering vector, and Rg is the radius of gyration, which describes the overall size of the scattering unit. If the experimentally determined Rg is larger than the theoretical radius, it may indicate the presence of aggregates in the solution, which are slightly larger than individual large molecules.[67] Additionally, changes in Rg may also result from radiation damage, differences in sample buffer conditions, and alterations in molecular conformation.[68] Therefore, the evaluation of Rg provides valuable insights into the microstructure, intermolecular interactions, and conformational changes of the sample, making it of significant importance in the fields of materials science and biophysics.

    Furthermore, the intercept in the fitting process in the region above represents the scattering intensity at zero angle. When calibrated to the absolute intensity, it can also provide information about the molecular weight of the scattering particles. This calibration can be performed using the following equation:

    where I(0) is the scattering intensity at zero-angle, NA represents Avogadro’s constant, c represents the concentration of the solution, υ is the partial specific volume, and re is the classical electron radius.

  • Debye law includes a one-dimensional electron density correlation function γ (r) that describes the structural information between scatterers and a paired distance distribution function P(r) that describes the shape information of scatterers themselves. To describe a system with internal non-uniformity and complex electron density distribution, a correlation function is introduced into SAXS, represented by γ (r). This function is defined as

    where 〈 〉r represents taking the average of the product of electron density fluctuations for scatterers at two ends rkj apart. 〈η2〉 is called the mean square electron density fluctuation.

    For two-phase systems,[69,70] the correlation function is defined as

    Here ΔρA and ΔρB represent the fluctuations of the average electron density values of two points A and B with a distance of r, respectively.

    In SAXS, there is an opposing relationship between I(q) and γ (r). According to the statistical theory of scattering,[71]

    For spherically symmetric systems,

    And the intensity distribution can be transformed into a correlation function[72]

    Correlation function γ (r) reflects the correlation between the electron density function between any two points in the system with a distance of r, which determines the distribution of scattering intensity.

    Common models include two-phase systems and polymer chains, with Debye–Bueche and Ornstein–Zernike equations, respectively. The Debye–Bueche equation is

    The Ornstein–Zernike equation is

    where ξ is the relevant length and r is the distance between two scattering circles.

    The scattering intensity profile cannot reflect the structure information intuitively, which usually requires the appropriate transformation of SAXS profile. When the scatterer is a monodisperse system, the scattering signal is only contributed by the particle shape. At this time P(r) = r2γ(r). P(r) is the pair distance distribution function. Its definition is the number of straight lines with a length of r found in a particle composed of any small scattering element j and any other scattering element k. By determining the pair distance distribution function, we can learn more about the structure information. This function reveals the information about the molecular shape, which can explain the intensity distribution more intuitively.[73] Through Debye scattering formula,

    And the pair distance distribution function can be written as

    In addition, it is also very important in the construction of real-space 3D models. The calculated pair distance distribution function can be used to reconstruct the three-dimensional spatial structure of the scatterer. For example, the Dammif method needs to be accurately determined to obtain a virtual atomic model corresponding to the scattering profile.[74] The distance distribution function P(r) can measure the length and frequency of the carrier between atoms within protein molecules, providing information about the shape of the scattered particles.

    For example, for spherical scatterers, the distance distribution function is usually a symmetric Gaussian like distribution, with the maximum width representing its diameter. For rod-shaped scatterers, they usually exhibit a linear distribution on one side.

    Figure 4(a) presents the distance distribution function of spheres ranging from 10 nm to 50 nm. Figure 4(b) presents the distance distribution function of rod-shaped bodies ranging from 40 nm to 100 nm.

  • Guinier analysis can only be used at the low-q region where qRg ≪ 1. This restriction makes it only applicable for quantifying large features. In order to characterize small features such as interfacial and fractural details, Porod analysis was invented. The theorem mainly indicates the asymptotic behavior of scattering intensity varying with scattering angle.[75] Porod’s law points out that for an ideal two-phase system, the trend of the tail of the measured scattering curve should follow the equation described in Table 2.[76] Because in the experiment, when the high q region satisfies the “−4” power law, the scatterer is a sphere, when the high q region satisfies the “−2” power law, the scatterer is a disc, and when the high q region satisfies the “−1” power law, the scatterer is a rod.

    For uniform samples, Porod’s law is usually applicable, but for non-uniform samples with fractal structures, fractal theory is more commonly used. Fractal refers to the phenomenon of self-similarity on a series of length scales, and the very simple power-law relationship between the size of a measurable attribute and the scale used to measure the existence of the attribute. The main research involves the theoretical properties of fractal objects and the search for real physical systems with fractal behavior. If the aggregated particles form infinite fractal structures, the formula might be written as

    where q indicates the scattering vector and I(q) indicates the scattering intensity.

    where V denotes the volume of primary particles, P(q) is the Debye function in this case, and S(q) is derived from Teixeira. Via further simplification, it can be found that the intensity and fractal dimension satisfy the following equations:

    where α is directly related to the fractal dimension. When 3 < α < 4, the sample would be surface fractal, and the dimension Ds would be (6 – α). When 0 < α < 3, the sample would be mass or pore fractal, and the dimension Dm would be α.

3.   Software frame and function details
  • The raw data obtained from scattering experiments usually include images in two-dimensional matrix format and associated experimental conditions, including incident light wavelength, distance from sample to detector, detector pixel size, incident light intensity, etc. These data should be properly handled before we can obtain accurate data analysis. The main page of ScatterX is simple and easy to understand (Fig. 5).

    The processing module has the unique advantage of fast preprocessing speed, strong universality, and flexible format of data storage; the analysis module includes the calculation of many complex structural parameters, such as Guinier, Debye, and Porod. For visualization, the software supports the display of most standard line charts and scatter charts, and allows users to customize drawing elements, including the color of lines, axes, titles, etc., the operation of axes, and the change or addition of axis titles.

  • In x-ray scattering experiments, it is necessary to use multiple devices to store high-throughput two-dimensional scattering image data in real time. To meet this requirement, this work utilizes the high-performance HDF5 file system. HDF5 is a file format used for storing and managing large scientific datasets, also known as a distributed file system. This system allows data to be stored across multiple physical nodes in a single file. This facilitates the storage of the large amount of data generated in x-ray scattering experiments, including parameters such as slit aperture size, photon energy, beam size, beam divergence, ion chamber counts, vacuum level, sample-to-detector distance, photodiode counts, sample orientation, two-dimensional scattering images, and shutter frequency information. The HDF5 distributed file system enables users to perform read and write operations simultaneously. Therefore, even when dealing with high-throughput two-dimensional images, it is not necessary to fully load the image data into memory. This capability is crucial for real-time processing of high-throughput two-dimensional scattering image data.

  • (i) Data loading With the development of synchrotron facilities, neutron sources and the widespread application of commercial light sources, including x-ray scattering equipment and laser-based versions, are becoming increasingly popular in academia and industry. This prosperity has brought two challenges to scattering data analysis — an unprecedently large amount of raw data and a wide variety of data formats. For instance, time-resolved small-angle scattering and x-ray photon correlation spectroscopy (XPCS) techniques require extremely fast image acquisition speeds, as users will need to process large quantities of two-dimensional scattering images within a short time frame. Modern scattering measurements typically use semiconductor-based 2D array detectors, and the collected data are usually stored in grayscale image format, of which the data formats are vastly different. Table 4 delineates some popular data formats. The above-mentioned scenario requires users to frequently change analysis software, which sharpens the learning curve or even confuses novice users. To address these issues, ScatterX has established a versatile data-loading module that can load various formats of 1D diffraction pattern spectra and 2D diffraction images with unparalleled efficiency. Table 4 summarizes the data types applicable to ScatterX.

    For 1D diffraction patterns, the most commonly used 1D data type is the “X, Y” pair, where X represents the coordinates in the reciprocal space (scattering vector q or scattering angle 2), and Y represents the scattering or diffraction intensity. Although it is easy to understand for humans, this type of XY pair data is redundant for computers. To this, the waveform format gains increasing popularity, especially for large data throughput.[46] The waveform type is more suitable for high-throughput data acquisition systems than the “X, Y” pair type, because the waveform only records the values recorded by the detector, and the relevant X values are calculated based on the configurations of different devices, which only need to be read once. For example, Igor Pro is a powerful software program used for scientific data analysis and visualization, where a large amount of 1D data loaded will be imported and stacked into a 2D matrix. ScatterX can automatically recognize conventional XY pair data and waveform data, which largely enhances the universality.

    For 2D scattering images, ScatterX can directly use the integrated image loading subroutine in MATLAB to efficiently load 2D raw images stored in the most popular formats. As shown in Table 4, the supported formats include but are not limited to TIF, EDF, PNG, etc. Considering that many detector manufacturers develop their own private image formats, ScatterX also includes a separately built image loading program to meet the requirements of different commercial detectors, such as edf, dm3, mccd, mar3450, and so on.

    (ii) Auto beamcenter One advantage of the scattering method compared to imaging is the high flexibility of varying equipment setups and minimum sample preparations. This high level of flexibility necessarily brings up the scenario that the setup changes almost every experiment and calibration has to be done before every single experiment. With scattering geometry calibration, several key geometrical parameters shall be determined. The foremost parameter is the center. Traditionally, beam centering is achieved by testing samples with multiple diffraction peaks to fit the center of the circle coordinates.[43] This method includes manual selection of diffraction peaks, integration, and iterative averaging, which increases the time cost. ScatterX determines the center of the beam by directly analyzing the circularity of the reference material scattering through equal-intensity lines. After beam centering, the sample-to-detector distance shall be determined. Lastly, the pixel locations can be converted into q space or θ space. So, in this step, it is required to select data from nonoriented samples, such as air background, to determine the central position of the spot. Since the scattering signal of such samples is circumferentially symmetric, it can be determined that all the isointensity lines in the image are a series of concentric circles. Several isolines are selected and fitted with a circular equation, and the central coordinates can be obtained by averaging them. The center coordinates are displayed as red dots on the image. It is worth noting that the experimental process should ensure that all samples are tested under the same conditions. In this step, it is necessary to import experimental condition parameters, such as wavelength, detector pixel information, sample-to-detector distance, and other information. After confirming these conditions, the pixel unit of the two-dimensional image can be corrected to the q-space unit, as shown in Fig. 5(a).

    (iii) Sector integration Then, ScatterX allows the user to independently select the range of integral angles. The software will cycle the data from the center of the spot to the edge of the image in 1° steps for each angle within the range of angles. At the end of the cycle, a two-dimensional matrix T with scattering vector and angle as independent variables and intensity as dependent variables can be obtained. T = T (q, ϕ), as can be seen in Fig. 6(b). The averaged intensity scattering vector curve will be obtained by averaging the matrix T along the scattering vector direction.

    Batch processing is highly efficient in ScatterX. Thanks to the intrinsic support of matrix operation, the functionalities of display, processing, and storage are based on a matrix with various dimensions. To demonstrate its outstanding efficiency, a dataset consisting of 10000 two-dimensional scattering raw images was prepared as a testing model and tested on a server with 96 CPU cores. Three major scientific data analysis platforms, which include Python, Nika, and ScatterX, were compared in terms of data loading speed. Note that Python was chosen owing to its popularity in academia, while Nika was chosen due to that it is a well-fledged small-angle scattering data analysis packaged based on Igor Pro, which is widely used in synchrotron and neutron scattering facilities.[46] From Table 5, it is clear that ScatterX exhibits the fastest speed.

    (iv) Normalization There are two commonly used methods for background scattering subtraction: the first method is to subtract the background scattering of two-dimensional images firsthand, followed by carrying out one-dimensional data reduction. The second method is to reverse the order of the above two steps. In practice, the second method is widely used because of the greatly reduced operation time and improved accuracy.

    where K is the sum of the total counts of the ionization chamber during the exposure time. After the scattering image is converted into a one-dimensional curve, background subtraction and correction are still needed (Fig. 7). Users need to input the counting of the photomultiplier tube for each sample one by one or use the HDF5 file which contains all images and counting information.

    (v) Absolute intensity In the experiment, the detector measures the relative scattering intensity of the sample. If it is necessary to obtain parameters related to mass density, such as molecular weight, volume fraction (e.g., porosity of porous materials), and electron density difference, absolute intensity must be used. This software allows users to use samples with known differential scattering cross sections (such as water, glass carbon, etc.) as standard samples to convert the relative scattering intensity of samples into absolute intensity. The quantity combination related to the standard sample in the above formula is called the calibration factor CF, namely,

    where K is ionization chamber count, (∂Σ /∂Ω) (q) is the absolute intensity of the sample and d is the thickness of the sample. After CF is calculated, the intensity of all samples in the same batch will be converted to the absolute scale.

  • (i) Particle size Particle sizing is one of the most frequently used characterization tools for structural investigation. ScatterX allows the calculation of the radius of gyration through Guinier’s law. The radius of gyration is defined mathematically as the second moment of the electron density distribution of half the second moment of the distance distribution function, which physically describes the electron density weighted squared distance of scatters from the center of the object. Equation (9) is the general definition of the radius of gyration, by which a model-free quantification of particle size can be achieved.

    ScatterX allows us to calculate the radius of gyration through Guinier’s law, and can also extend the low q region to q = 0. If the sample is a monodisperse system, it can be found that there is a linear region in the low q region by converting the coordinate system to ln (I (q)) ~ q2. At this time, the slope a can be obtained by fitting the linear region, and the radius of gyration is root (−3a).

    When the measurement system is polydisperse, we usually need to solve a class of ill-conditioned equations, namely, the Fredholm integral equation. For this, we use the singular value decomposition (SVD) method to reduce the dimension.

    For the scattering intensity of polydisperse systems, there is a relationship

    where I(q) is the scattering intensity changed with scattering vector q, D(r) is the particle size distribution function of the scatterer,[77] and F (q, r) is the shape factor of the scatterer. To solve the attenuation linewidth function D(r), equations (3) and (4) are discretized into

    where j refers to the sampling channel sequence of intensity, and i refers to the number of sample particle size fractions. Equation (5) can be abbreviated in matrix form

    where Di = D (ri), Bj = I (qj). As the elements of matrix A, a(i, j) = F (ri, qj). The particle size distribution can be obtained by solving Eq. (6). However, the problem of particle size distribution inversion needs to solve the ill-posed equations, which can be solved by the least square method

    Assume AR ∧ (m × n), according to the singular value decomposition theory, the matrix A is decomposed to obtain

    where, U = (u1, u2, …, um), V = (v1, v2,…, vn); Σ = diag(σ1, σ2, …, σn); σ1σ2 ≥ ⋯ ≥ σn is a singular value, so the theoretical least squares solution is

    Through the expression above, it would be easy to calculate the particle size distribution of scatterers. Through the multi-page SVD decomposition tool provided by MATLAB 2022B, it is easier to quickly obtain the particle size distribution function.

    (ii) Correlation distance In SAXS, related functions γ (r) usually would be used for statistical analysis. It is the Fourier transform of scattering intensity I(q), which can analyze the layered morphology to obtain the structural parameters of the sample.

    where (Δρ)2 is the mean square value of electron density difference; and V is the volume of the x-ray irradiated sample. The correlation function describes the correlation of the electron density and the distance r between any two points in the system and determines the distribution of scattering intensity,

    From Fig. 10, the following structural parameters are extracted. Lp represents a long period, Lc represents average hard block thickness, D represents the average core thickness, Dtr represents the average interface thickness, Γmin/Γmax represents polydispersity and Lc/Lp represents local crystallinity.[78]

    (iii) Surface and interface The whole SAS curves can be subdivided into the Guinier region and Porod region, where the former characterizes the structure factor and form factor and the latter characterizes the surface and interfacial structures. Based on Porod’s theory, when two media are separated by a sharp interface, the scattered intensity follows an asymptotic law in the high q region: I(q) = Aq−4 + B. The deviation of the exponent from −4 indicates the non-sharp interface. The SAXS intensity of fractal objects has a simple power law form

    where I and α are both constants. The power-law exponent α can be determined from the slope of the linear part of the ln I(q) ~ ln q graph. From these values, the mass (Dm), pore (Dp) and surface (Ds) fractal dimensions can be calculated. For volume (mass or pore) fractals: α = Dm or Dp, and 1 < α < 3, and for surface fractals: α = 6 – Ds, and 3 < α < 4.

    (iv) Shape analysis The pair distance distribution function (PDDF) p(r) is the distribution of the distance taken between any two points within the scattering particle. The PDDF is a function of the size and shape of the particle and relates to the scattering curve by the Fourier transform. ScatterX allows users to calculate the pair distance distribution function as generally defined in the small-angle scattering theory.

    By integrating q-space for each ri, a series of p values will be obtained and there is no doubt that the results are discrete.

    It is worth noting that the range of q will affect the result of the integration. At this point, we can try to extend the intensity curve according to Guinier’s law and Porod’s law.

    (v) Integrate invariant In small angle scattering (SAXS), invariant Q is commonly used to help characterize the volume fraction and specific inner surface of two-phase systems, which is the integral over the entire space of the scattering curve after a coordinate transformation under the condition of absolute intensity as shown below:

    where Q is the second moment of the SAXS scattering curve from angle 0 to infinity, where the scatterings at angle 0 and infinity are derived via extrapolations. For further details, the Guinier extrapolation is used toward angle = 0, and the Porod extrapolation is used toward infinity. This procedure is supported by well-established scattering theories (Glatter and Kratky, 1982; Porod, 1982).

  • As data visualization is a key part of the function of ScatterX, the drawing system is an important part of its architecture. When data needs to be displayed, it can be used in the entire software package to provide users with a consistent experience.

    (i) Scattering image visualization ScatterX uses MATLAB’s rendering algorithm to provide adjustment capabilities for graphic display. When displaying 2D images, not only can you change the color map, such as jet, paula, gray, etc., but you can also adjust the contrast to enhance the user’s drawing. When performing fan-shaped integration, the software will also give a matrix to analyze the individual integration area and display it in the form of a grayscale image, which is beneficial to the analysis of the orientation data. In addition, the scattering image on the detector is presented as the reciprocal space of the sample, and the corresponding relationship will also be reflected in the coordinates, which is convenient for users to directly compare the peak position difference on the image and obtain more information, which is difficult in a one-dimensional curve owned.

    (ii) Scatter curve visualization In scattering experiments, a series of one-dimensional line graphs are obtained after image processing. The default MATLAB plots do not render well in papers or slides. As usual, ScatterX allows users to customize the thickness and color of the wireframe, data connection method, thickness and color. The software also allows direct printing of drawings, or conversion to PostScript (ps or eps), various bitmap graphics formats, or various other formats (e.g., Windows Metafile, WMF) for cross-platform exchange. The software GUI provides a convenient interface to these output options.

    (iii) Graphics user interface At the top of the user interface, users can switch between different functional modules by clicking on different tabs, such as fractal dimension calculation, Guinier calculation, one-dimensional electron density correlation function, particle size distribution, etc.

    Under each tab, users can select one or multiple files for processing. In addition, the interface provides parameter adjustment modules and chart display modules to help users optimize calculation results based on the actual type of samples.

4.   Conclusion
  • The software described in this paper has been developed for fast and batch data reduction and data analysis of a variety of scattering experiments. Our goal is to develop an efficient scattering image processing and data analysis tool that can be easily adapted to any scattering laboratory. The software is currently written in the commercially available MATLAB language and runs on Windows, Linux, and MacOS platforms. Processed data can be saved in formats compatible with popular software packages. Users and developers are encouraged to extend the program to meet their specific needs. The ScatterX program will continue to develop a Python version in the future to allow users to analyze data with fewer barriers and get started quickly in scattering applications.

Program availability
  • The source code is openly available in Science Data Bank at https://doi.org/10.57760/sciencedb.11355

Figure (18)  Table (6) Reference (78)

Catalog

    /

    DownLoad:  Full-Size Img  PowerPoint
    Return
    Return