Adaptive Beam Spot Calibration Method and System Based on Small Angle X-ray Scattering Equipment

Through the adaptive beam spot calibration method, the Ni filter and pinhole combination is optimized using Monte Carlo simulation and closed-loop feedback mechanism, which achieves high stability and anti-interference calibration of small-angle X-ray scattering equipment, solving the shortcomings of beam spot calibration in the prior art, and improving the reliability and efficiency of experimental data.

CN120253914BActive Publication Date: 2025-08-05安徽国科仪器科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510741137.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-05
Publication Date
2025-08-05
Estimated Expiration
2045-06-05

AI Technical Summary

Technical Problem

In the beam spot calibration, existing small-angle X-ray scattering equipment has problems such as extensive collimation system optimization methods, lack of dynamic calibration capabilities and insufficient environmental anti-interference, resulting in insufficient reliability and stability of experimental data.

Method used

Adaptive beam spot calibration method is adopted, and the Ni filter thickness and pinhole combination is optimized through Monte Carlo simulation, combined with a closed-loop feedback mechanism and data synchronization unit to achieve high stability and anti-interference ability. Detector calibration and light source calibration are used to achieve full-range automated calibration, and fine adjustments are used to use an adaptive PID controller.

Benefits of technology

It improves calibration accuracy and stability, reduces manual intervention, ensures the reliability and efficiency of experimental data in complex environments, and improves the overall performance and reliability of the equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120253914B_ABST
    Figure CN120253914B_ABST
Patent Text Reader

Abstract

The present invention provides an adaptive beam spot calibration method and system based on a small-angle X-ray scattering device. Using the Monte Carlo principle, the method simulates and optimizes the Ni filter thickness and pinhole combination to obtain an optimized X-ray source. The X-ray source then illuminates a detector to complete initial detector calibration. Image signals representing the sample's scattering characteristics are collected, and beam spot morphological characteristic data is output. Finally, calibration completion is determined through a multi-index statistical test. The method completes initial calibration by checking the light source stability. By controlling a water cooling mechanism and implementing step-by-step power loading, the method ensures stable operation of the light source module and provides stable calibration light source conditions. Finally, a spiral search algorithm is used to quickly locate a location with good beam spot quality during the coarse adjustment phase. An adaptive PID controller is then used to perform fine-tuning adjustments during the fine adjustment phase to determine calibration completion, ensuring system stability and sensitivity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of small-angle X-ray scattering, and in particular to an adaptive beam spot calibration method and system based on a small-angle X-ray scattering device. Background Art

[0002] Small-angle X-ray scattering equipment characterizes the internal microstructure of materials, such as shape, particle size, interlayer state, porosity, etc., by detecting fluctuations in the electron density of the material. It is one of the important means to study the nanoscale structure of matter.

[0003] Beam spot calibration is a critical process in small-angle scattering instruments. Through a series of tests and adjustments, it ensures that the instrument's beam (i.e., X-ray beam) achieves ideal characteristics in terms of spatial position, shape, size, and energy distribution. This ensures that small-angle scattering experiments can acquire high-precision, high-quality scattering data. This process runs through all aspects of the small-angle scattering instrument, from design and manufacture to installation, commissioning, and daily use and maintenance.

[0004] However, current small-angle X-ray scattering (SAXS) equipment faces significant technical bottlenecks in the field of beam spot calibration, mainly manifested in the crude optimization methods of the collimation system, the lack of dynamic calibration capabilities, and insufficient environmental interference resistance, which seriously restrict the reliability of experimental data. Specifically:

[0005] (1) Constrained by the static nature of the collimation system, the beam characteristics mismatch occurs: The design of existing collimation systems is mostly based on ideal geometric assumptions (such as infinitely small pinholes and uniform beam distribution), without combining the actual photon energy spectrum and spatial divergence characteristics for dynamic optimization. For example, patent CN118329943A (Huazhong University of Science and Technology, disclosing a calibration device and calibration method for a small-angle X-ray measurement device) proposes to locate the sample stage position by fluorescent marking, but its collimation parameters (such as pinhole diameter and filter thickness) still rely on preset values and do not integrate Monte Carlo photon tracing simulation (such as Geant4 or MCNP tools), resulting in a significant deviation between the beam divergence (typical value) and the theoretical model. In the experiment, taking a nanoparticle system (particle size 10nm) as an example, when a fixed 0.2mm pinhole was used, the beam energy spectrum was broadened by 15% after passing through the filter due to the lack of dynamic matching of the X-ray energy (Cu-Kα), and the low-q value scattering signal was covered by the high-energy stray light.

[0006] (2) Limited by the calibration process, there is a lack of closed-loop feedback and real-time compensation mechanisms: Existing calibration technologies generally lack closed-loop feedback, resulting in a step-by-step amplification of errors under environmental disturbances. For example, patent CN222704521U (Jinan Hanjiang Optoelectronics, disclosing an integrated microscopic observation device for small-angle X-ray scattering experiments) achieves micron-level positioning of the sample stage through microscopic imaging, but does not integrate real-time monitoring of the beam spot morphology (such as CMOS high-speed imaging or photon counting feedback). During the experiment, beam spot offset caused by light source power fluctuations or sample thermal expansion cannot be dynamically corrected.

[0007] (3) Due to the weak environmental anti-interference design, the long-term stability and adaptability of the equipment are insufficient: SAXS equipment is extremely sensitive to temperature drift and vibration, and the existing technology lacks a systematic anti-interference design. Taking patent CN118329943A as an example, although its high-precision sample stage adopts a rotating axis drive (usually piezoelectric ceramic drive), the high-precision light source displacement stage and metal frame that the calibration relies on lack a thermal expansion compensation design, resulting in the drift of the calibrated sample-detector distance (SDD) and beam centering parameters. At the same time, the calibration process proposed is a static one-time adjustment, and no closed-loop feedback mechanism is embedded. The calibration of the beam baffle center depends on the initial circular ring fitting. If the temperature drift causes the baffle bracket to deform, the baffle position cannot be dynamically adjusted through real-time image analysis, resulting in deviations in the scattering angle calculation, affecting the spatial analysis accuracy of the nanostructured sample, and further causing fluctuations in the beam spot morphology entropy value. Manual intervention is required to restart the calibration process, which seriously affects the efficiency of high-throughput experiments. Summary of the Invention

[0008] In view of the shortcomings of the prior art, the present invention aims to provide an adaptive beam spot calibration method and system based on a small-angle X-ray scattering device. In order to achieve the above-mentioned purpose, the present invention is implemented through the following technical solutions: an adaptive beam spot calibration method based on a small-angle X-ray scattering device, comprising obtaining a ray light source, and using the ray light source to illuminate a detector, extracting the detector response characteristics, and completing the initial calibration operation of the detector; outputting a stable light source to illuminate the sample, and collecting an image signal representing the scattering characteristics of the sample based on the detector; binarizing the image signal, using a threshold algorithm based on local entropy to divide the ROI area of the image into blocks, calculating the Shannon entropy in each block, and determining an adaptive threshold based on the Shannon entropy to convert the image into a binary beam spot. The spot image is separated from the foreground and background, and then morphological enhancement processing is performed. First, a cross kernel is used to erode the binary spot image to remove isolated points and noise. Then a diamond kernel is used to dilate the image to connect the possible broken spot contours. Subsequently, an opening and closing operation cycle is performed. During the operation, the shapes of the structural elements in the cross kernel and the diamond kernel are dynamically adjusted according to the local gradient direction to ensure isotropic smoothness and output the beam spot morphological feature data. Finally, a coarse and / or fine adjustment dual-mode adjustment strategy is used to iteratively optimize the collimation parameters and light source power, and the calibration is determined to be complete through multi-index statistical testing.

[0009] As a second aspect of the present invention, an adaptive beam spot calibration system based on a small-angle X-ray scattering device is proposed, comprising: a memory; a processor; and a light source module, a collimation module, a sample stage module, and a detector module electrically connected to the processor, respectively. The memory includes an adaptive beam spot calibration program, which, when executed by the processor, implements the adaptive beam spot calibration method based on the small-angle X-ray scattering device.

[0010] Compared with the prior art, the present invention has the following beneficial effects:

[0011] 1. To solve the problem that existing small-angle X-ray scattering equipment is susceptible to temperature drift and vibration interference during the calibration process, the present invention realizes a highly stable calibration process through the synergistic effect of the collimation module and the data synchronization unit. Specifically: first, the processor is used to compensate for the sample stage movement motor parameters and the detector installation inclination angle is compensated for the physical coordinates, thereby reducing the calibration interference caused by the equipment's own parameter errors. Secondly, based on the collimation module, Monte Carlo simulation is used to optimize the Ni filter thickness and pinhole combination, while improving the spectral purity and spatial collimation of the ray beam, reducing stray light interference and ensuring the accuracy of the calibration signal. Finally, based on the data synchronization unit, a data bus is used to achieve real-time interaction, construct a complete closed-loop process, and set a three-level protection mechanism to deal with abnormal situations, ensuring that the calibration process is not interfered with by the outside world. Therefore, it is different from the existing technology and has the advantages of high stability and anti-interference ability, ensuring that the calibration accuracy can be reliably guaranteed even in complex environments.

[0012] 2. In view of the problems in the prior art that the calibration process is complicated, time-consuming and dependent on manual experience, the present invention realizes all-round automated calibration through detector calibration, light source calibration and closed-loop output control. Specifically, first, the detector module is responsible for checking the stability of the light source, collecting dark current to establish a temperature model, collecting flat-field images and extracting base images and weight coefficients, completing the initial calibration operation, and laying the foundation for subsequent calibration. Secondly, the light source module is based on the control of the water cooling mechanism, performing power graded loading, ensuring the stable operation of the light source module, and providing stable calibration light source conditions. Finally, a graded adjustment strategy is adopted. The spiral search algorithm is first used to quickly locate the position with better beam spot quality in the coarse adjustment stage, and then the adaptive PID controller is used to perform fine adjustment in the fine adjustment stage. The calibration is determined to be complete through multi-indicator statistical testing, ensuring the stability and sensitivity of the system, greatly improving the calibration efficiency and accuracy, reducing manual intervention, achieving fast and accurate calibration effects, and improving the overall performance and reliability of the equipment. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The disclosure of the present invention is described with reference to the accompanying drawings. It should be understood that the drawings are for illustrative purposes only and are not intended to limit the scope of protection of the present invention. In the drawings, the same reference numerals are used to refer to the same components. Among them:

[0014] Figure 1 This is a schematic diagram of a module framework of a beam spot calibration system for a high-precision small-angle X-ray scattering device proposed in one embodiment of the present invention;

[0015] Figure 2 Schematic diagram of an optical path system of an optical path model of a small-angle scatterometer constructed based on a collimation module proposed in one embodiment of the present invention;

[0016] Figure 3 for Figure 2Schematic diagram of the test results of the simulation optimization of Ni filter thickness Figure 1 ;

[0017] Figure 4 for Figure 2 Schematic diagram of the test results of the optimized pinhole combination in the simulation Figure 2 ;

[0018] Figure 5 This is a schematic diagram of a process for performing a small-angle experimental test based on a small-angle X-ray scattering device after adaptive beam spot calibration, as proposed in one embodiment of the present invention;

[0019] Figure 6 FIG. 1 is a schematic diagram of the overall structure of a high-precision small-angle X-ray scattering device proposed in one embodiment of the present invention. DETAILED DESCRIPTION

[0020] It is easy to understand that according to the technical solution of the present invention, without changing the essential spirit of the present invention, a person skilled in the art can propose a variety of interchangeable structural modes and implementation modes. Therefore, the following specific embodiments and drawings are only exemplary descriptions of the technical solution of the present invention and should not be regarded as the entire invention or as a limitation or restriction of the technical solution of the present invention.

[0021] The present invention will be further described in detail below with reference to the accompanying drawings, but this does not limit the present invention.

[0022] As an understanding of the technical concept of the present invention, it should be noted that the proposed small-angle X-ray scattering device includes a light source mechanism, a collimation mechanism, a sample environment test mechanism, a detector mechanism, and an external shielded outer shell, which are arranged in sequence along the optical path. Among them, the light source mechanism generates an X-ray light source, provides the X-ray light source required for the experiment, and is connected to an external water-cooling mechanism to ensure long-term stable operation of the light tube. The collimation mechanism transmits the X-ray light source and integrates a filter unit at the output port of the X-ray light source to filter out the Cu-Kβ generated by the Cu target light source, leaving pure Cu-Kα, while controlling the beam divergence angle. The sample environment test mechanism fixes the sample to be tested and provides an in-situ test environment. Based on the standard XYZ three-axis motion, it controls the position of the sample to be tested in the Y-axis direction of the optical path and the position movement in the XZ two-dimensional plane perpendicular to the optical path. The detector mechanism realizes the data acquisition that characterizes the scattering characteristics of the sample. The shielded outer shell ensures the radiation safety of the entire system.

[0023] like Figure 1 、 Figure 5 as well as Figure 6As shown, as one embodiment of the present invention, an adaptive beam spot calibration system based on a small-angle X-ray scattering device is first proposed, comprising a memory, a processor, a light source module, a collimation module, a sample stage module, and a detector module. The processor includes a data synchronization unit, which is electrically connected to the light source module, the collimation module, the sample stage module, and the detector module, and is used to implement real-time interactive processing between the modules via a data bus. In a specific implementation, the memory includes an adaptive beam spot calibration program, which, when executed by the processor, implements the following adaptive beam spot calibration method based on a small-angle X-ray scattering device.

[0024] During the device's power-on self-test, the processor electrically connects to the sample stage module's motion motor, sets parameters for the motor, and compensates for microstep errors. Simultaneously, the processor electrically connects to the detector module's dual-axis inclination sensor, measures the detector's mounting inclination, and performs physical coordinate compensation to establish the device's physical parameters that represent the detector's precise reference. This completes sample stage motion parameter calibration and detector mounting inclination correction. These physical parameters include positioning parameters that improve the sample stage's positioning accuracy, as well as coordinate data after physical coordinate compensation.

[0025] Based on the collimation module: Using the Monte Carlo principle, the Ni filter thickness and pinhole combination are simulated and optimized to improve the spectral purity and spatial collimation of the ray light source output by the light source module, and obtain an optimized ray light source (beam).

[0026] Based on the detector module: By collecting dark current under different temperature conditions, a temperature model characterizing the relationship between the detector dark current and temperature is established. Using diffuse tungsten lamp wide-field illumination and monoenergetic beam spot scanning, combined with an optimized X-ray light source with enhanced X-ray spectral purity, multiple frames of flat-field images of different positions on the detector are collected. After extracting the basis image and weight coefficients through non-negative matrix decomposition, a flat-field image characterizing the detector response characteristics is obtained, completing the initial calibration of the detector. It should be noted that dark current is a key issue restricting the further development of detectors. This is because the introduction of impurity bands forms a dark current conduction path between the detector conduction band and valence band, namely, impurity band conductivity.

[0027] Based on the light source module: After the above calibration steps are completed, a stable light source is output to provide a standardized lighting environment. Based on this stable light source, the sample placed on the sample stage module is illuminated to collect image signals that characterize the scattering characteristics of the sample.

[0028] Based on the processor, the collected image signals are systematically preprocessed to eliminate noise interference and optimize the data structure. The image signal data is output and then subjected to adaptive binarization and morphological enhancement. After the beam spot morphological feature data is output, a coarse and / or fine adjustment dual-mode adjustment strategy is used to iteratively optimize the collimation parameters and light source power. The calibration is determined to be complete through multi-index statistical testing to ensure the stability and sensitivity of this calibration system.

[0029] In one embodiment of the present invention, the calibration process during the power-on self-test of the device is divided into two parts: sample stage calibration and detector installation compensation. The processor controls the sample stage moving motor. The sample stage calibration process is as follows: the microstepping parameters of the sample stage Y-axis moving motor are set, and combined with the gear ratio, a laser rangefinder is used to perform several round-trip calibrations. The mean and standard deviation of the moving motor step error are calculated using the following formula to determine the actual physical step length. , , and establish a step length compensation table: , to compensate for the micro-step error of the moving motor and ensure that the moving accuracy of the sample to be tested meets the requirements, where, To indicate the Y-axis position of the sample stage after compensation, is the mean value of the step error, and n is the number of steps of the moving motor. It should be noted that the lead screw pitch is a fixed parameter of the sample stage moving motor, which is used to convert the motor's rotational motion into linear motion. Its value is determined during the design and manufacturing process of the small-angle X-ray scattering equipment. n is the number of steps of the moving motor, that is, the number of steps taken by the motor according to the set microstep subdivision parameters. It is a key parameter for controlling the moving distance of the sample stage and is set by the control system of the equipment according to experimental requirements. For example, when the sample stage needs to move a certain distance for scanning, the control system will calculate the corresponding number of steps n to drive the moving motor.

[0030] It is understandable that during the installation of the small-angle X-ray scattering device, the detector will have a certain installation tilt angle, which will cause the physical coordinates of the subsequently acquired image pixels to shift, affecting the image geometric accuracy. Therefore, in this embodiment, the proposed detector installation compensation process is as follows: a preset dual-axis tilt sensor is used to measure the actual installation tilt angle θ of the detector to achieve tilt compensation for the pixel values of the detector pixel array, eliminating the impact of the installation tilt angle on the coordinates, ensuring image geometric accuracy, and thus accurately representing the spatial position coordinates of each pixel point in the detector pixel array: , where θ=0.01° is the detector installation angle, x p and x y is the compensated pixel physical coordinate, x and y are the original pixel coordinates, x0 and y0 are the pixel coordinate origin, p x and p yis the pixel size. It can be understood that by performing rotation compensation on the original pixel coordinates, the effects of installation tilt on the coordinates can be eliminated, thereby ensuring the geometric accuracy of the image. In specific implementation, assuming that the detector pixel array undergoes shear distortion due to installation tilt, the modified formula eliminates the tilt effect through reverse rotation, ensuring the geometric fidelity of subsequent image analysis (such as beam spot positioning and scatter signal extraction). When θ = 0, the matrix is the identity matrix, and the coordinates remain unchanged. When θ ≠ 0, the matrix counteracts the effects of detector tilt through reverse rotation. It should be noted that the pixel values of the detector pixel array are derived from the spatial sampling of the X-ray signal by the detector and represent the relative value of the X-ray intensity at each pixel location. The detector converts the received X-ray signal into an electrical signal, which, after analog-to-digital conversion (ADC), is converted into a digital signal, namely the pixel value. These pixel values constitute the basic image data, reflecting the spatial distribution of the sample under X-ray irradiation. Pixel coordinates represent the pixel's position within the detector pixel array and are typically expressed as row and column numbers, such as (x, y). It is used to define the relative position of pixels in a two-dimensional array and to identify the spatial distribution of pixel values. Pixel coordinates and pixel values together constitute image data, where pixel coordinates provide spatial position information and pixel values provide signal strength information at that position.

[0031] In one embodiment of the present invention, the process of optimizing the thickness of the Ni filter is as follows: first, based on the Monte Carlo principle, a large number of random samples are used to simulate the behavior of X-ray (beam) photons in the filter to calculate the transmittance at different thicknesses. The transmittance is calculated based on the X-ray attenuation law: , where is the mass absorption coefficient, X-ray Cu-Kα in the Ni filter =49.2cm 2 / g, X-ray Cu-Kβ in Ni filter =281cm 2 / g,ρ=8.9g / cm 3 is the density of the Ni filter, and d = 10 μm is the thickness of the Ni filter. Secondly, the X-ray photons are initially set: assuming that the photons emitted by the X-ray source have a certain energy distribution (in this embodiment, mainly Cu-Kα and Cu-Kβ rays). For each simulated photon, its position and initial direction on the incident surface of the Ni filter are randomly generated. When the photon propagates in the Ni filter, the mass absorption coefficient corresponding to its energy is used to determine whether the photon is absorbed by a random number: let the generated random number be ,like , then the photon is determined to be absorbed, otherwise, the photon continues to propagate, where, is the thickness of the filter that the photon passes through in this propagation step; again, perform transmittance statistics: perform N simulations, (N is a large number, such as ), and the number of photons passing through the Ni filter n is counted, and the transmittance at this thickness is estimated to be ; From this, the optimization objective function is constructed: for different Ni filter thicknesses d, the estimated transmittances of Cu-Kα and Cu-Kβ X-rays are calculated respectively. and , and then construct the optimization objective function Finally, the algorithm iterates through a preset thickness range (e.g., 5-20 μm, with a 1 μm step size) and calculates the objective function F for each thickness. The thickness that maximizes F is selected as the optimal Ni filter thickness to improve scattered signal detection accuracy. It should be noted that the collimation module plays a critical role in the performance of small-angle X-ray scattering equipment, and the Ni filter thickness directly affects the spectral purity of the beam. To improve spectral purity and reduce stray light interference, Monte Carlo simulation is used to optimize the Ni filter thickness and enhance scattered signal detection accuracy.

[0032] Based on the above technical concept, the process of optimizing the pinhole combination is as follows: First, simulate and calculate the geometric divergence angle of the pinhole: Pinholes include at least single pinholes and double pinholes. For a single pinhole, the theoretical geometric divergence angle is determined based on the pinhole diameter and the distance from the pinhole to the light source using geometric relationships: Based on Monte Carlo simulation, when a large number of randomly generated photons starting from the light source propagate to the pinhole, whether they pass through is determined based on the pinhole size, and the distribution of the landing points of the photons passing through the pinhole on the detector is counted. The actual geometric divergence angle is estimated by calculating the standard deviation of the landing point distribution. , where d1 is the diameter of a single pinhole and L is the distance from the pinhole to the light source. For a double pinhole: the diameters of the front and rear pinholes and the distance between the pinholes are considered, and the theoretical geometric divergence angle is determined using the cascade collimation effect. Also based on Monte Carlo simulation, when a large number of photons are randomly generated from the light source and propagated to the pinhole, their propagation paths are tracked, and the distribution of the photons' landing points on the detector after passing through the double pinholes is counted to calculate the actual geometric divergence angle. In the formula, d1 is the diameter of the second pinhole, which is used to determine whether the photon can pass through the pinhole in the calculation of the geometric divergence angle, affecting the distribution of the photon landing points on the detector. d2 is the diameter of the first pinhole, which together with the diameter of the second pinhole determines the geometric divergence angle of the double pinhole combination and affects the propagation characteristics of the photon after passing through the double pinhole. L is the distance from the pinhole to the light source. sep Next, perform a signal-to-noise ratio simulation: Based on the ROI area set on the detector surface (e.g., 20mm×20mm), count the number of photons received in the area through Monte Carlo simulation and calculate the estimated value of the signal strength. At the same time, the equivalent number of photons generated by noise (such as detector dark current, environmental interference, etc.) in the area is counted to calculate the estimated value of the noise intensity , the signal-to-noise ratio estimate is Finally, the geometric divergence angle and signal-to-noise ratio simulation results for different pinhole combinations were compared, and the pinhole combination with the lower geometric divergence angle and higher signal-to-noise ratio was selected as the optimal solution. In specific implementation, the dual pinholes were preferably made of stainless steel, with an aperture accuracy of ±1μm and a hole spacing tolerance of ±5μm. During installation, they were calibrated using a laser collimator to ensure a coaxial error of <10μm between the two pinholes.

[0033] In one embodiment of the present invention, since the detector dark current varies with temperature, uncorrected dark current may result in increased image noise. Therefore, an initial data calibration operation is required for the detector. First, the dark current is continuously collected at a constant temperature of preferably 22°C, once every 10 minutes for 2 hours, to establish a dark current temperature model: , where is the dark current value of the detector when the temperature is T. T represents the temperature variable in degrees Celsius (℃). In the model, it is used to represent the difference between the current temperature and the reference temperature (22℃). The reference temperature in a constant temperature environment When, at position The collected dark current, is the temperature coefficient, which is obtained by linear regression fitting and reflects the sensitivity of the dark current at this position to temperature changes; secondly, according to the real-time temperature sensor data Calculate the corrected dark current , to eliminate the influence of detector temperature drift and ensure data reliability for long-term experiments: .

[0034] Based on the above technical concept, in order to solve the problem of correcting the non-uniformity of detector response, it is also necessary to use a diffuse tungsten light source (color temperature 2856K) for flat-field calibration. Due to the spatial non-uniformity of the light source, 20 frames of flat-field images at different positions are collected to fully cover all areas of the detector; non-negative matrix factorization (NMF) is used to extract the basis image that characterizes the detector response characteristics. and weight coefficients representing the spatial positions of each flat-field image and / or the positions of each pixel on the detector , calculate the flat-field responsivity , to reflect the response characteristics of each pixel of the detector: , , where is the response attenuation coefficient of the detector edge area, which is obtained by automatically identifying edge pixels and fitting them through the edge detection algorithm. It is a flat field image, which represents the light intensity received by the detector at the position (x, y), and comprehensively reflects the non-uniformity of the light source and the response characteristics of the detector. is the weight coefficient, a set of coefficients obtained by non-negative matrix decomposition (NMF), which is used to measure the contribution of the corresponding base image in the flat field image. is the kth basis image, which is extracted by NMF to characterize the main characteristic patterns of the detector response and used to construct the flat field image. is the average value of the flat-field image, used to normalize the flat-field response rate, Dark current refers to the current generated by the detector at position (x, y) in the absence of light. Its value varies with temperature. 65535 is the maximum digital count value of a 16-bit ADC. A 16-bit ADC can represent values from 0 to 65535, with 65535 corresponding to the strongest signal or saturation. It is understood that using 65535 as a reference value to normalize the dark current term is intended to standardize the dark current effect to a range equivalent to the ADC maximum value, thereby ensuring the accuracy and consistency of the responsivity calculation.

[0035] It should be noted that during the flat-field image acquisition process, the spatial position of the flat-field image is: In flat-field calibration, in order to consider the spatial non-uniformity of the light source, 20 frames of flat-field images at different positions are collected. These refer to the image positions collected by the detector when the diffuser is at different spatial positions. These positions cover the entire imaging area of the detector and are used to fully characterize the impact of the spatial non-uniformity of the light source on the detector response, thereby providing sufficient information for subsequent image correction. The pixel position on the detector is: For the base image and weight coefficient When calculating the flat-field response rate R(x,y), each pixel position on the detector (x,y) has corresponding response characteristics. Through these calculations, the correction parameters of each pixel position can be obtained to eliminate the impact of detector response non-uniformity on the image and improve the uniformity and accuracy of the image.

[0036] In one embodiment of the present invention, the process of the light source module outputting a stable light source is divided into two parts: water cooling mechanism control and power loading control. In specific implementation, the water cooling mechanism control part preferably adopts a three-layer closed-loop control strategy: the outer layer uses the PID algorithm to adjust the water temperature, the middle layer uses the PI algorithm to stabilize the water flow, and the inner layer uses the Fuzzy algorithm to control the speed of the pump motor carried by the water cooling mechanism. At the same time, in order to ensure the stable operation of the light source module, it is preferred to incorporate an anti-saturation mechanism into the water cooling mechanism, that is, to automatically adjust the water temperature setting value when the refrigerator in the water cooling mechanism reaches the maximum power, and the flow sensor signal carried by the water cooling mechanism needs to be processed by Kalman filtering. , thus ensuring that the flow fluctuation is controlled within a very small range, where, is the flow estimation value at time t after Kalman filtering, which represents the more accurate and smooth flow estimation value output by the filtering algorithm. represents the estimated flow rate after Kalman filtering at the previous moment (time t-1), is the actual flow value measured at time t, which represents the raw flow data directly collected by the flow sensor and contains noise and interference.

[0037] During implementation, the outer layer uses a PID control algorithm to precisely adjust the water temperature, with the target temperature set at 22°C. The middle layer uses a PI control algorithm to ensure a stable water flow rate of 5L / min. The inner layer uses a fuzzy control algorithm to adjust the pump motor speed. When the chiller reaches maximum power, the system adjusts the water temperature setpoint to 22.5°C to avoid integral saturation. Simultaneously, the signal collected by the preset flow sensor is processed by Kalman filtering to ensure that flow fluctuations are strictly controlled within 0.05L / min. This provides stable and reliable heat dissipation for the light source module, ensuring stable operation at the ideal operating temperature and thus stable X-ray output.

[0038] The purpose of power loading control is to prevent the output light source power from changing too quickly and causing thermal shock to the equipment. The process is as follows: First, use the power ramp strategy to load the power, and set each level of loading to synchronously monitor the temperature gradient of the light tube power anode. , when the temperature gradient exceeds the set threshold, that is , the system automatically extends the stabilization time of this power level to 20 seconds;

[0039] Next, set the power loading sequence to meet the following conditions: Under the above conditions, when each power level is loaded, the voltage increases by 5kV, the current increases by 5mA, and the power of the next level is calculated to ensure that it does not exceed 1800W, and the anode temperature increases by no more than 5°C per level; after each level is loaded, the X-ray intensity is monitored in real time by the photodiode on the light source module, and the intensity fluctuation coefficient is calculated , where and They are the maximum and minimum values of the X-ray intensity detected by the photodiode during the monitoring period. If the fluctuation coefficient exceeds the allowable range, , then the power is immediately backed off by two levels and reloaded. It can be understood that this gradual power increase method, combined with real-time monitoring and feedback control of the anode temperature gradient and X-ray intensity, effectively avoids the instability of the light source module due to rapid power changes, ensures that the light source stably outputs high-quality X-ray beams, and provides a stable ray source for subsequent image acquisition. Based on the above technical concept, since the ripple noise of the light tube power supply will significantly affect the ray intensity and image quality, and in order to ensure the stability of the light source, it is also necessary to perform frequency domain analysis on the light tube power supply: set multiple acquisition points (1000 points), and collect the light tube power supply voltage data V(t) at each acquisition point, calculate its power spectral density PSD, and focus on obtaining the PSD integral value in the 10Hz-1kHz frequency band. When the integral value When the power supply is stable, the uniformity of the X-ray intensity is further ensured.

[0040] In one embodiment of the present invention, due to the presence of various random noise interferences in the operating environment of the scattering device, such as motor micro-vibration and detector dark current fluctuations, these noises can degrade image quality. Therefore, to suppress such noise, a median-mean hybrid filtering technique is used on the processor to process the acquired image signals to extract high-quality, high-contrast, low-noise, and clear-featured image data. The following steps are performed: First, a 3×3 median filter is applied to K=5 consecutive frames of images representing the X-ray beam spot characteristics to effectively remove salt and pepper noise;

[0041] Next, set the weight function The filtered images are weighted averaged to ensure that, among the consecutive K frames representing the X-ray beam spot characteristics, the center frame has the highest weight (0.45), with weights of subsequent frames decreasing in descending order. To further reduce the impact of random noise, ROI pre-screening automatically excludes regions with energy values below 1 / 3 of the global mean, reducing the amount of invalid data and improving data processing efficiency. The processed images significantly improve quality and usability, facilitating more accurate extraction of beam spot characteristics.

[0042] It is understandable that background noise will mask the beam spot signal and affect the accuracy of subsequent analysis. Therefore, background subtraction needs to be continued. In this embodiment, the watershed algorithm is preferably used to dynamically divide the background area. The specific operations are as follows: first, Gaussian blur is performed on the averaged image (in this embodiment, the standard deviation of the Gaussian blur is set to σ = 5 pixels) to reduce the influence of image noise; second, the marked detector edge area is used as the background seed point, and the background mask is obtained by watershed algorithm transformation. , introduce spatial autocorrelation function to calculate background value : , where is a 500×500 pixel neighborhood centered at (x,y), which is used to define the range of the area involved in background calculation. d(i,j) is the distance, which is used to suppress the abnormal influence of distant pixels. is the background mask, which represents the value at position (i, j), used to identify whether the pixel in the image belongs to the background area (usually a binary matrix, 1 represents background and 0 represents non-background). is the average image intensity, which represents the value at position (i, j), and is used to provide the basic signal strength at that position. is an exponential decay factor used to weight distance so that the contribution of distant pixels decreases rapidly with increasing distance. It can be understood that the spatial autocorrelation function can quantify the correlation between pixel values and the values of its neighboring pixels, thereby effectively characterizing the uniformity and consistency of the detector's edge area. Therefore, in this step, by introducing the spatial autocorrelation function, the spatial relationship between pixels is fully considered, and the background value within a 500×500 pixel neighborhood centered on each pixel is calculated. Again, the influence of distant pixel anomalies is suppressed by the distance decay factor. Finally, a logarithmic transformation is performed to enhance image contrast. The specific process of performing a logarithmic transformation to enhance image contrast is as follows: , where is the corrected image intensity, representing the value at position (x, y), reflecting the signal intensity after contrast enhancement. In is the natural logarithm function, used for logarithmic transformation, mapping the signal intensity to a new intensity range to enhance contrast. 65535 is the maximum digital count value of the 16-bit ADC, representing the maximum grayscale value of the 16-bit image, and is used to normalize the logarithmic transformation result to ensure that the output value is within the valid range. Finally, data windowing is performed to effectively suppress background noise and enhance the beam spot signal. The specific process is as follows: regularized least squares (ridge regression) is used to suppress overfitting, ensure the first-order derivative of the fitting curve is smooth, and match the signal change rate corresponding to the maximum stage acceleration (50 mm / s²) (≤200 grayscale values / ms). Extreme point detection is used to screen local minima of the fitted (beam spot signal) signal curve. Non-maximum suppression is performed to ensure that the interval between adjacent trough points in the signal curve is at least 10 seconds (corresponding to a 2 mm sample stage movement) to avoid window overlap. It can be understood that data windowing is the process of dividing the scattered data sequence (the scattered data sequence is a sequence that characterizes the characteristics of the beam spot signal) into multiple representative windows to achieve the purpose of accurately analyzing the stability characteristics of the beam spot signal. The beam spot signal characteristics mainly include: intensity distribution, noise level, contrast and stability, as shown in Table 1 below:

[0043] Table 1:

[0044]

[0045] In one embodiment of the present invention, when optimizing the pinhole combination based on the collimation module simulation, the specific process of setting the ROI area on the detector surface is as follows:

[0046] Based on the improved Chan-Vese active contour model, an energy function is constructed to achieve accurate extraction of the ROI area: = , where v is the length penalty term, which is used to control the impact of contour length on the energy function, prevent contour overfitting and maintain contour smoothness. It is an energy function used to measure the quality of the segmentation results. The segmentation goal is to find the beam spot profile that minimizes the energy function. c1 is the grayscale mean of the inner area (inside the profile), reflecting the grayscale characteristics of the inner area. c2 is the grayscale mean of the outer area (outside the profile), reflecting the grayscale characteristics of the outer area. is the level set function, whose zero level set corresponds to the segmentation contour, is the Heaviside function parameter, which is used to convert the level set function into a piecewise constant function, whose value is 1 inside the contour and 0 outside. is the weight coefficient of the inner region, which is used to balance the contribution of the grayscale difference of the inner region to the energy function. is the weight coefficient of the outer region, which is used to balance the contribution of the grayscale difference in the outer region to the energy function. is the length of the beam spot contour, which is calculated by the level set function and is used to measure the smoothness of the contour. I is the grayscale value of each pixel position in the ROI area contour (the above grayscale values are used to jointly describe the shape and intensity distribution of the beam spot). It can be understood that by introducing the mean value c of the inner and outer regions, 1, c2, level set function Φ and Heaviside function parameters , which can adaptively capture the beam spot profile and obtain the accurate beam spot profile through the variational method.

[0047] Based on the above technical concept, after obtaining the beam spot profile, the ROI region is expanded by 300 pixels to ensure that all scattered light halo information is included. This process aims to focus on the specific area on the detector related to scattered signal detection during the simulation, thereby more accurately counting the number of signal photons and noise photons received in this area. This effectively evaluates the signal-to-noise ratio performance of different pinhole combinations while reducing the computational effort and improving simulation efficiency. This helps to quickly screen pinhole combinations that provide purer and stronger signals in specific areas during the optimization process, thereby improving the detection accuracy of the final scattered image signal.

[0048] In one embodiment of the present invention, in order to clearly separate the beam spot area and the background area in the image, the process of binarization of the image signal based on the processor is as follows: the formed ROI area is divided into blocks using a threshold algorithm based on local entropy, and the block size is preferably 8×8. In each block, the Shannon entropy is calculated. , to measure the complexity or uncertainty of the image gray level in the ROI area, , where is the probability density of gray level i, and the adaptive threshold is determined according to Shannon entropy. , k=0.8, thus realizing the binarization processing of the image, where, is a dynamic threshold, the threshold at position (x, y) is determined by the local mean and information entropy difference, and is used for image segmentation. is the local information entropy at position (x, y), reflecting the texture complexity of the area, is the local mean at position (x, y), reflecting the average grayscale value of the area, is the maximum information entropy, usually the maximum entropy value of all possible gray levels in the image. It is understandable that in order to deal with the discontinuity problem of block boundaries, it is also necessary to use bicubic interpolation to smooth the threshold map and add a hysteresis threshold to the final binarization function to deal with the discontinuity problem of block boundaries: .

[0049] Based on the above technical concept, the existence of "8-neighborhood 255 pixels" means that among the 8 adjacent pixels of the pixel point in the current ROI area (i.e., pixels in the top, bottom, left, right, and four diagonal directions), at least one pixel has a value of 255. A pixel value of 255 usually indicates that the pixel belongs to the white or highlighted area in the image, which is often used to represent the foreground or area of interest in binary images. At this point, the adaptive binarization processing method can effectively deal with the uneven grayscale distribution in the image and accurately separate the beam spot area from the background.

[0050] Example: If the corrected image intensity If the background value B(x,y) at that location is greater than or equal to the dynamic threshold th(x,y), the background value B(x,y) at that location is set to 255 (white), indicating that the location belongs to the foreground. If the value of the pixel at th(x,y)-10 is between th(x,y)-10 and th(x,y), and at least one of the eight adjacent pixels at that position has a value of 255, the background value B(x,y) at that position is also set to 255. Otherwise, the background value B(x,y) at that position is set to 0 (black), indicating that the position belongs to the background. By combining image intensity and neighborhood information, the foreground area can be identified more accurately while reducing the influence of isolated pixels.

[0051] Based on the above technical concept, when analyzing the binarized image, multi-level morphological operations are required to optimize the beam spot profile in the image. The operation sequence is as follows: first, an m×n cross kernel is used to perform an erosion operation to remove isolated points in the image; then, an n×p diamond kernel is used to perform an expansion operation to connect the possible broken beam spot profiles; and then 10 opening and / or closing operation cycles are performed. In this case, the structural elements in the cross kernel and diamond kernel are set to dynamically adjust their shapes according to the local gradient direction to ensure isotropic smoothness. The morphological operation expression is: , where ε is the corrosion operator, is the dilation operator, and the structural element is rotated by an angle of , which is used to ensure isotropic smoothness. It can be understood that through a series of morphological operations, the integrity and smoothness of the beam spot profile are significantly improved.

[0052] In one embodiment of the present invention, considering that the scattered signal exhibits a non-Gaussian distribution characteristic, after ensuring the isotropic smoothness of the image signal, it is also necessary to output the beam spot morphological feature data through cluster analysis. The process is as follows: the ISODATA cluster analysis method based on kernel density estimation (KDE) is used to classify and analyze the beam spot features.

[0053] First, the initial cluster center is determined by finding the local maximum of the KDE curve: , where is the kernel density estimate at position S, which is used to reflect the density of the data point at position S. is the value of the i-th data point, n is the total number of data points, and σ is the bandwidth or standard deviation, which controls the width of the kernel function and affects the degree of smoothing. Compared with traditional random initialization methods, this method speeds up clustering convergence by 40%. Secondly, the autocorrelation coefficient of the time series is introduced into the standardized Euclidean distance metric for weighting to enhance the influence of time correlation in cluster analysis: , where is the autocorrelation value of the signal at time a and b, which is used to enhance the impact of time correlation on clustering. is the distance metric between sample a and sample b, used to measure their similarity. and are the signal strength or characteristic value of sample a and sample b respectively, and are the maximum and minimum values of all sample signal intensities, respectively, and are used to normalize the distance. It can be understood that the use of ISODATA cluster analysis can effectively classify and analyze the characteristics of the beam spot. In this embodiment, the sample refers to the measurement data point of the beam spot signal at different time points or different positions. The sample contains the characteristic information of the beam spot, such as signal intensity, time series changes or spatial distribution characteristics. By analyzing these samples, the quality and stability of the beam spot can be comprehensively evaluated. Again, perform iterative optimization of the cluster analysis. The specific process is: according to the standard deviation within the class and the current class mean proportion Dynamically adjust the splitting rules to adapt to the clustering needs of different signal strengths; Measuring the similarity between classes and dynamically adjusting the merging rules: , where is the distance between category c1 (grayscale mean of inner region (inside the contour)) and c2 (grayscale mean of outer region (outside the contour)). The smaller the distance value, the more similar the two categories are. is the probability density of category c1 on the kth feature dimension, is the probability density of category c2 on the kth feature dimension, L is the number of dimensions in the feature space; when the distance between classes Less than the set threshold of 0.5, and the amount of data within the class meets When the conditions are met, the merging operation between classes is triggered. So far, through the above iterative optimization process, ISODATA cluster analysis can more accurately classify and analyze the beam spot characteristics. is the number of data points in the jth cluster, reflecting the size or number of members of the cluster. Finally, feature calculation is performed on each cluster obtained from the ISODATA cluster analysis to extract the geometric features (such as area, perimeter, major axis, minor axis, etc.) and statistical features (such as grayscale mean and standard deviation, etc.) of the beam spot. These features are integrated to form the beam spot morphological feature data. After normalization processing and unification of the data scale and eliminating dimensionality effects, the feature data is organized into a structured data format for output.

[0054] In one embodiment of the present invention, in order to quickly locate a position with relatively good beam spot quality, the process of implementing coarse adjustment based on the processor is as follows:

[0055] The signal-to-noise ratio (SN) and the main axis direction (angle θ with the reference direction) in the beam spot morphological characteristic data are used as core indicators to construct the beam spot quality factor Q, and the spiral search algorithm is used to quickly locate the high-quality beam spot area in a large range. The specific process is as follows:

[0056] With the current position (the current position of the sample stage / detector in the XY plane) as the center, 8 search points are generated in the XY plane with a set step size of 500μm. For each search point, the beam quality factor Q of each point is calculated based on the beam spot morphological feature data. , where SN is the signal-to-noise ratio, which directly reflects the purity of the beam spot signal; θ is the angle between the main axis of the beam spot and the reference direction, which characterizes the spatial orientation of the beam spot. By comparing the Q values of each search point, the direction with the largest Q value is selected as the next moving direction. If the Q value shows a downward trend in three consecutive searches, the random search mode is switched to avoid falling into the local optimal solution.

[0057] It can be understood that this coarse adjustment strategy can efficiently search for a position with better beam spot quality within a larger range, provide a good initial position for the subsequent fine adjustment stage, effectively reduce the search time, and improve the adjustment efficiency. In this embodiment, the current position specifically refers to the current position of the sample stage or detector on the XY plane during the beam spot calibration process. This position is the starting point of the beam spot calibration algorithm. With this point as the center, a new search point will be generated according to the set step size and rules to evaluate the beam spot quality factor Q, thereby determining the next moving direction. Specifically, the current position is the position of the sample stage or detector that is currently being evaluated or adjusted during the calibration process.

[0058] Based on the above technical concept, based on the initial position determined in the coarse adjustment stage and combined with the dynamic changes in the real-time morphological characteristics of the beam spot (such as position offset, size fluctuation, and energy concentration), the processor enters the fine adjustment stage to achieve more accurate beam spot calibration. The process is as follows:

[0059] First, the feedforward compensation mechanism is introduced by using the adaptive PID controller, and a prediction model is constructed based on the Kalman filter algorithm. , predict the defocus amount at the next moment , and calculate the feedforward coefficient F (set to 0.5) based on this, where is the output control signal of the controller at time t, which is used to adjust the system to achieve the desired state. is the proportional gain, which is the coefficient of the proportional control part, is the current error, which is usually defined as the difference between the expected value and the current actual value of the system. In beam spot calibration, it is the difference between the expected beam spot position and the actual detected beam spot position. is the integral gain, which is the coefficient of the integral control part. It affects the response of the system to the past accumulated error and is used to eliminate the static error of the system and improve the control accuracy. is the error integral term, which represents the accumulation of all errors from the start of the system to the current time t, and is used to eliminate the deviation in the system. is the differential gain, which is the coefficient of the differential control part. It determines the response of the system to the error change rate and is used to improve the stability and response speed of the system and reduce overshoot. is the rate of change of the error, that is, the rate at which the error changes over time. The differential term can predict the trend of the error change and thus adjust the control signal in advance.

[0060] Secondly, by dynamically adjusting the control cycle, when the beam spot position error When the control cycle is shortened from 20ms to 5ms, the system's response sensitivity is improved. It can be understood that the adaptive PID control strategy combining the above-mentioned feedforward compensation with feedback control can more accurately control the movement of the sample stage or light source, so that the beam spot is more accurately aligned with the focal plane. At the same time, the collimation module parameters are further optimized in the fine-tuning stage, and the energy concentration (grayscale ratio of the ROI area) and geometric divergence angle (output through Monte Carlo simulation of the pinhole combination) in the beam spot morphology characteristics are simultaneously fine-tuned. The Ni filter thickness and pinhole combination are thus further improved through the synergistic effect of spectral purification and spatial collimation. The purpose of reducing the interference of scattered signals and improving the clarity and resolution of the image can be achieved, providing a higher-quality beam for subsequent sample image acquisition and analysis, and ensuring that the stability and sensitivity of the system are at their best.

[0061] After completing the above series of calibration operations, in order to ensure that the entire calibration process achieves the expected results and avoid misjudging the calibration completion status due to the achievement of a single indicator, in this embodiment, a multi-indicator statistical test method is introduced for comprehensive judgment. The specific indicators include the dimensional stability, position repeatability, shape consistency and energy concentration of the beam spot.

[0062] In specific implementation, the stability of the beam spot size is evaluated by calculating the coefficient of variation after 5 measurements. , where CV is the coefficient of variation, a dimensionless quantity that represents the standard deviation and mean The ratio of CV to the average value is used to measure the relative dispersion of the data. It is understood that in beam spot calibration, CV is used to evaluate the stability of the beam spot size. A CV < 2% indicates that the coefficient of variation of the beam spot size should be less than 2%, that is, the fluctuation of the beam spot size should be very small relative to its average value, thereby ensuring that the stability of the beam spot meets the requirements of high-precision experiments.

[0063] For position repeatability, calculate whether the 95% confidence interval radius of its centroid coordinates is less than 0.2 pixels. It can be understood that the centroid coordinates are calculated based on the beam spot image through the geometric features in the beam spot feature extraction process. The centroid calculation needs to consider the spatial distribution weight of the pixel grayscale and introduce the distance weighted centroid: Specifically, the distance d(x,y) from the pixel to the center of the ROI area is used as the weight factor to gradually attenuate the weight of the edge pixels, thereby highlighting the contribution of the pixels in the central area. is the characteristic length, which controls the distance weighted attenuation rate. Pixel, x is the coordinate vector of the pixel point, indicating the position of the current pixel in the image, is the corrected image intensity, is the distance weighting factor, which is used to weight the gray value of the pixel. is the distance from the pixel point (x, y) to the center of the ROI area, which is used to measure the position of the pixel point relative to the center. At this point, the centroid position calculated can more accurately reflect the center position of the beam spot.

[0064] Shape consistency is determined based on the statistical properties of ellipse parameters. It's understood that these parameters are also derived during the beam spot feature extraction process using the least squares ellipse fitting method. The specific calculation process is as follows: Based on the binarized and morphologically enhanced beam spot image, the least squares ellipse fitting algorithm is used to determine the geometric parameters of the ellipse. In this embodiment, the best-fitting ellipse is found by minimizing the sum of the squared distances from the contour points to the ellipse. This allows for the precise calculation of parameters such as the major axis length, minor axis length, and major axis angle to describe the beam spot shape.

[0065] Energy concentration is determined by calculating whether the ratio of the sum of the grayscale values within the ROI to the sum of the grayscale values of the entire image is greater than 95%. The calibration process is considered complete only when all of the above indicators meet the corresponding conditions. This comprehensive determination method can comprehensively and accurately evaluate the quality and position of the beam spot, ensuring that it meets the requirements of high-precision beam spot analysis, thereby ensuring the measurement accuracy and reliability of the equipment during long-term operation.

[0066] In one embodiment of the present invention, in order to achieve efficient and reliable communication between modules in the system, the data synchronization unit preferably uses the TCP / IP communication protocol to transmit data with the modules.

[0067] In one embodiment of the present invention, based on the above collimation module, in actual use, the parameters of the collimation module can be flexibly adjusted according to the test requirements of the target sample. The following is a preferred collimation module parameter simulation design scheme:

[0068] like Figure 2 As shown, first, simulation software is used to construct an optical path model of the small-angle scatterer, including a light source, a collimator, a pinhole, and a detector. By adjusting the components, positions, and parameters, a complete optical path system is formed.

[0069] Secondly, based on the Monte Carlo principle, the light source energy of the light tube is set to 8048eV and 8905eV, and the relative ratio of the two intensities (I1:I2) is 6:1. At the same time, according to the absorption limit theory of X-rays, a nickel sheet is selected as the energy monochromator, and the different absorption coefficients μ1 and μ2 of the Ni sheet for the two energies are set. The thickness of the Ni sheet is d: ;

[0070] Again, given several simulation reference values of d: 2μm, 4μm, 6μm, 8μm, 10μm, 12μm and 14μm, three Ni sheets with thicknesses of 8μm, 10μm and 12μm were selected for experimental testing according to the simulation results, as shown in the figure. Figure 3 As shown ( Figure 3 The left part is the test result of the sample without adding Ni sheet. Figure 3 The right part shows the test results of the sample with 10μm Ni sheet added). The test results show that the 10μm thick Ni sheet has the best effect;

[0071] Next, according to the optical path geometry principle and probability statistics, as well as the size limit of the overall system, different collimator lengths (40mm, 60mm, 80mm, 100mm, 120mm) and pinhole sizes (0.1mm, 0.2mm, 0.3mm, 0.4mm, 0.5mm) are set to simulate the beam divergence angle, spot size and luminous flux ratio under different parameter configurations. At the same time, considering the requirements of the actual small-angle scattering test on the quality of the beam, the simulation results are used as a reference for the actual configuration parameters; Figure 4 As shown ( Figure 4 The left part shows the test results of a 40mm collimator and a 0.2mm pinhole sample. Figure 4 The right panel shows the test results for a 60mm collimator and a 0.2mm pinhole. Based on simulation results, collimator lengths of 40mm and 60mm were selected, and pinhole sizes of 0.2mm and 0.3mm were chosen. Experimental tests randomly combined these collimators and pinholes. The results show that the 60mm collimator with 0.2mm pinholes in front and behind, and with a 0.3mm pinhole, achieved higher resolution and signal-to-noise ratio for the scattered signal, significantly outperforming other experimental results.

[0072] Finally, through repeated simulations combined with experimental test data, a 60mm long collimator and a 0.2mm pinhole were finally selected, and a 0.3mm pinhole was added after the second pinhole to remove large divergence angle beams and fluorescence.

[0073] The technical scope of the present invention is not limited to the contents of the above description. Those skilled in the art can make various deformations and modifications to the above embodiments without departing from the technical idea of the present invention, and these deformations and modifications should all fall within the protection scope of the present invention.

Claims

1. An adaptive beam spot calibration method based on a small-angle X-ray scattering device, characterized by: Acquire a ray light source, and use the ray light source to illuminate the detector, extract the detector response characteristics, and complete the initial calibration operation of the detector; Output a stable light source to illuminate the sample, and use the detector to collect image signals that characterize the scattering characteristics of the sample; The image signal is binarized, and the ROI area of the image is divided into blocks using a threshold algorithm based on local entropy. The Shannon entropy is calculated in each block, and an adaptive threshold is determined based on the Shannon entropy to convert the image into a binary beam spot image to achieve foreground and background separation. Secondly, morphological enhancement processing is performed. First, a cross kernel is used to erode the binary beam spot image to remove isolated points and noise. Then a diamond kernel is used to dilate the image to connect the possible broken beam spot contours. Subsequently, an opening and closing operation cycle is performed. During the operation, the shapes of the structural elements in the cross kernel and the diamond kernel are dynamically adjusted according to the local gradient direction to ensure isotropic smoothness, and the beam spot morphological feature data is output. Finally, the spiral search algorithm is used to locate the beam spot quality position in the coarse adjustment stage, and then an adaptive PID controller is used to make adjustments in the fine adjustment stage to iteratively optimize the collimation parameters and light source power. The calibration is determined to be complete through multi-indicator statistical tests.

2. The adaptive beam spot calibration method based on a small-angle X-ray scattering device according to claim 1, characterized in that: The acquisition process of the ray light source is: using the Monte Carlo principle to calculate the transmittance of Ni filters of different thicknesses to optimize the energy spectrum of the ray light source and enhance its spectral purity. The steps include: First, based on this principle, random sampling is used to simulate the behavior of X-ray photons in the filter to statistically calculate the transmittance at different thicknesses: , where μ(λ) is the mass absorption coefficient, ρ is the density of the Ni filter, and d is the thickness of the Ni filter. Secondly, the X-ray photons are initially set: for each simulated photon, its position and initial direction on the incident surface of the Ni filter are randomly generated. When the photon propagates in the Ni filter, the mass absorption coefficient corresponding to its energy is used to determine whether the photon is absorbed by a random number: let the generated random number be r, if , then the photon is determined to be absorbed, otherwise, the photon continues to propagate, where, is the thickness of the filter that the photon passes through in this propagation step; again, perform N simulations and count the number of photons passing through the Ni filter n, and the transmittance estimate at this thickness is ; From this, for different Ni filter thickness d, the estimated values of X-ray Cu-Kα and Cu-Kβ transmittance are calculated respectively and , and then construct the optimization objective function Finally, the preset thickness range is traversed, the objective function F value at each thickness is calculated, and the thickness that maximizes F is selected as the optimal Ni filter thickness.

3. The adaptive beam spot calibration method based on a small-angle X-ray scattering device according to claim 2, characterized in that: On the basis of determining the optimal Ni filter thickness, it is also necessary to optimize the pinhole combination to improve the spatial collimation of the X-ray light source, so as to finally obtain the optimized X-ray light source. The process is as follows: First, simulate the pinhole geometric divergence angle: For a single pinhole, based on Monte Carlo simulation, when a large number of randomly generated photons originating from the light source propagate to the pinhole, whether they pass through is determined based on the pinhole size. The distribution of the landing points of the photons passing through the pinhole on the detector is counted, and the actual geometric divergence angle is estimated by calculating the standard deviation of the landing point distribution. For the double pinhole method: also based on Monte Carlo simulation, when a large number of randomly generated photons are transmitted from the light source to the pinhole, their propagation paths are tracked, the distribution of the photons' landing points on the detector after passing through the double pinhole is counted, and the actual geometric divergence angle is calculated; Secondly, based on the ROI area set on the detector surface, the number of photons received in the area is counted through Monte Carlo simulation to calculate the estimated value of the signal intensity. At the same time, the number of equivalent photons generated by noise in the area is counted, and the estimated value of the noise intensity is calculated to obtain the estimated value of the signal-to-noise ratio. Finally, the geometric divergence angles and signal-to-noise ratio simulation results under different pinhole combinations are compared, and the pinhole combination with lower geometric divergence angle and higher signal-to-noise ratio is selected as the optimal solution.

4. The adaptive beam spot calibration method based on a small-angle X-ray scattering device according to claim 1, characterized in that: After ensuring the isotropic smoothness of the image signal, it is necessary to output the beam spot morphological feature data through cluster analysis. The process is as follows: First, the initial cluster center is determined by finding the local maximum value of the KDE curve; Secondly, the autocorrelation coefficient of time series is introduced into the standardized Euclidean distance metric for weighting to enhance the influence of time correlation in cluster analysis; Again, the splitting rule is dynamically adjusted according to the ratio of the standard deviation within the class to the current class mean to adapt to the clustering needs of different signal strengths, and the distance D is used to adjust the splitting rule. B Measure the similarity between classes and dynamically adjust the merging rules. When the distance D between classes is B When the value is less than the set threshold and the amount of data within a class meets the preset conditions, the merging operation between classes is triggered; Finally, feature calculation is performed on each cluster obtained, and the geometric and statistical features of the beam spot image are extracted to form beam spot morphological feature data. After standardization, the feature data is organized into a structured data format for output.

5. The adaptive beam spot calibration method based on a small-angle X-ray scattering device according to claim 1, characterized in that: The process of the coarse adjustment stage is: The beam quality factor Q is constructed using the signal-to-noise ratio and principal axis direction in the beam spot morphological feature data. With the current position as the center, several search points are generated in the XY plane according to the set step size. For each search point, the beam quality factor Q is calculated. By comparing the Q values of each search point, the direction with the largest Q value is selected as the next movement direction. If the Q value shows a downward trend in three consecutive searches, the random search mode is switched to avoid falling into the local optimal solution. The process of the fine-tuning stage is as follows: first, a feedforward compensation mechanism is introduced using an adaptive PID controller, and a prediction model is constructed based on the Kalman filter algorithm to adjust the control signal in advance; second, the system response sensitivity is improved by dynamically adjusting the control period.

6. The adaptive beam spot calibration method based on a small-angle X-ray scattering device according to claim 1 or 4, characterized in that: After collecting the image signal and before performing isotropic smoothing on the image signal, the image signal needs to be preprocessed to extract image data with clear features. The process is as follows: First, the sample is illuminated by this stable light source, and median filtering is performed on the acquired K consecutive frames of images. Secondly, a weight function is set to perform weighted averaging on the filtered image, ensuring that among the consecutive K frames, the middle frame has the largest weight, and the weights of the preceding and following frames decrease in sequence. Thirdly, Gaussian blur is performed on the averaged image to reduce the influence of image noise; From this, the edge area of the marked detector is used as the background seed point, the background mask is obtained by watershed algorithm transformation, and the spatial autocorrelation function is introduced to calculate the background value , the distance attenuation factor is used to suppress the influence of long-distance pixel anomalies, and the logarithmic transformation is performed to enhance the image contrast: , where is the corrected image intensity, and 65535 is the maximum digital count value of the 16-bit ADC; Finally, the regularized least squares method is used to suppress overfitting, ensure the smoothness of the first-order derivative of the fitting curve, and match the image signal change rate corresponding to the maximum acceleration of the sample stage. The fitted signal is screened for local minima through extreme point detection, and non-maximum suppression calculation is performed to ensure that adjacent valley points of the image signal are spaced apart to avoid window overlap.

7. The adaptive beam spot calibration method based on a small-angle X-ray scattering device according to claim 1, characterized in that: By collecting the flat-field images F of the detector at different positions in multiple frames flat (x, y), and use non-negative matrix decomposition to extract the detector response characteristics, calculate the flat field response rate R(x, y) of the detector, and complete the initial calibration operation of the detector. The calculation formula of the flat field response rate R(x, y) is: , where is the response attenuation coefficient of the detector edge area, μ flat is the average value of the flat-field image, I d (x,y) is the dark current of the detector module.

8. The adaptive beam spot calibration method based on a small-angle X-ray scattering device according to claim 1, characterized in that: The multiple indices include dimensional stability, position repeatability, shape consistency and energy concentration of the beam spot image.

9. An adaptive beam spot calibration system based on a small-angle X-ray scattering device, characterized by: include: Memory; processor; and a light source module, a collimation module, a sample stage module, and a detector module electrically connected to the processor respectively; The memory includes an adaptive beam spot calibration program, and when the adaptive beam spot calibration program is executed by the processor, the adaptive beam spot calibration method based on the small-angle X-ray scattering device according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • ROI selection in image registration

    US20060002631A1

  • Radiographic system, radiographic method and computer readable medium

    US20110243305A1