Visualization and analysis software system for in-situ diffraction data

By designing a visualization and analysis software system for in-situ diffraction data, the shortcomings of existing software in data format support, spectrum conversion, and information parsing are solved. It enables rapid import and automatic parsing of multi-format data, improves experimental efficiency and result accuracy, supports intuitive display of multi-dimensional data and high-quality image generation, and has good scalability and cross-platform adaptability.

CN121387155APending Publication Date: 2026-01-23INST OF HIGH ENERGY PHYSICS CHINESE ACAD OF SCI +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511514979.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-22
Publication Date
2026-01-23

AI Technical Summary

Technical Problem

Existing scientific drawing and analysis software suffers from problems such as insufficient data format support, difficulty in spectrum conversion, inadequate analysis of experimental information, and insufficient complex drawing and analysis functions when processing in-situ diffraction experimental data, resulting in low experimental efficiency and delayed data processing.

Method used

A visualization and analysis software system for in-situ diffraction data was designed, including an entry control module, a user interface module, a data import and verification module, a plotting and visualization module, a toolbar interaction module, and a resource and extension module. It supports the import of multi-format data, automatic parsing of environmental parameters, provides multi-dimensional visualization and interactive analysis functions, and has built-in fast conversion algorithms and single-peak fitting analysis.

Benefits of technology

It enables rapid import and automatic parsing of multi-format data, reduces manual processing time, improves the real-time guidance and scientific decision-making capabilities of experiments, ensures the accuracy and efficiency of experimental results, supports intuitive display of multi-dimensional data and high-quality image generation, reduces manual intervention, and has good scalability and cross-platform adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121387155A_ABST
    Figure CN121387155A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of scientific data processing and visualization software, in particular to a visualization and analysis software system for in-situ diffraction data. The system comprises an entrance control module, a user interface module, a data import and verification module and the like, breaks through the traditional limitation, supports quick import and automatic analysis of multi-format data, and can identify in-situ experimental environment parameters; a built-in algorithm is used for realizing quick mutual conversion of spectrograms; three complementary drawing modes are designed, and interactive editing is supported; a plurality of smoothing and fitting algorithms are provided, and results can be exported in a unified manner; the image and a fitting result reach an academic publication standard; the batch and automatic processing capability is realized; the software architecture can be expanded and opened and is adaptive to various spectrometer requirements, an expansion interface is reserved, and a one-stop workflow can be constructed.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of scientific data processing and visualization software, in particular to a kind of visualization and analysis software system for in-situ diffraction data. BACKGROUND

[0002] With the rapid development of large scientific devices, the amount of data generated by in-situ neutron diffraction experiments has increased dramatically, and real-time visualization and rapid analysis of data have become more urgent needs. Experimental personnel need to process and analyze data in real time on the spot to adjust experimental parameters and strategies in a timely manner. However, existing scientific plotting and analysis software (such as Origin, IgorPro, etc.) was not designed for the special needs of in-situ diffraction experiments, and has many limitations in actual application, as follows: First, in terms of data format support, these software have insufficient support for diffraction data files in different formats (such as chi, gsa, etc.), and researchers need to go through complex and tedious manual preprocessing to import and plot experimental data, consuming a lot of time and effort.

[0003] Second, spectrum conversion is difficult; the conversion between time-of-flight (TOF) spectrum and d-spacing spectrum of in-situ neutron diffraction relies on manual calculation and operation, which not only consumes time, but also easily accumulates errors due to human factors, affecting the accuracy of experimental judgment.

[0004] Third, experimental information analysis is insufficient; existing software cannot automatically analyze and utilize a large number of environmental parameters collected simultaneously in in-situ experiments, such as temperature, stress, experimental ID, detector ID, etc., making it difficult to form a unified correlation between experimental data and environmental conditions, and reducing the overall understanding of the experimental evolution process.

[0005] Fourth, there is a lack of complex plotting and analysis functions; in terms of two-dimensional and three-dimensional visualization and single-peak fitting, the functions of general software have obvious shortcomings, and cannot provide users with interactive and multi-dimensional intuitive analysis means. These problems lead researchers to face low efficiency, data processing lag and limited analysis means in in-situ diffraction experiments, affecting the real-time guidance value of the experiment and to some extent restricting the scientific output of experimental data. SUMMARY

[0006] To solve the above problems, the present application aims to provide a data visualization and analysis software specifically for in-situ diffraction experiments, especially suitable for fast two-dimensional and three-dimensional interactive visualization and fast single-peak fitting analysis of in-situ diffraction data of neutron diffraction spectrometer.

[0007] The technical solution adopted by the present application is: a kind of visualization and analysis software system for in-situ diffraction data, comprising: The entry control module is used to load the graphical interface framework when the system starts, set up a unified exception handling mechanism, provide a lightweight startup window for users to select experimental modes or instrument types, and establish corresponding working environments and functional modules according to user selections. The user interface module adopts a partitioned layout design, with the left area used for file selection and control operations, and the right area using a multi-tab design to display different visualization modes. The data import and verification module supports batch import of multiple files, automatically parses file naming rules and embedded metadata information, and transforms them into standardized data structures. The drawing and visualization module provides 2D line graph mode, 2D contour graph mode and 3D surface graph mode, and supports interactive editing and multi-mode linkage; The toolbar interactive module expands the functions of mode switching, normalization method selection, peak shape analysis, style management, etc., and provides high-resolution image export options; The resource and extension modules provide a unified resource management mechanism and support the adaptation of new data formats and analysis modes through inheritance and extension.

[0008] The data import and verification module specifically includes: a multi-file batch import unit that supports multiple neutron diffraction spectrometer data formats, including dat, chi, gsa, and histogramIgor; and an automatic parsing unit that automatically identifies and parses environmental parameter information synchronously recorded in the in-situ experiment during the import process, such as temperature, stress, module number, and operation number.

[0009] The two-dimensional line graph mode in the drawing and visualization module specifically includes: a single curve or multi-curve display unit that supports switching between different experimental files via buttons or drop-down menus; and an interactive ruler, horizontal reference line, and quick legend editing unit to facilitate quantitative analysis and result comparison for users.

[0010] The two-dimensional contour plot mode in the drawing and visualization module specifically includes: a two-dimensional intensity distribution rendering unit, where the coordinate axes can be quickly switched to different experimental metadata; an intensity range adjustment unit, which adjusts the intensity range via a slider and updates the contour plot and the corresponding two-dimensional curve plot in conjunction with it; and multiple normalization methods and color mapping selection units, which facilitate the intuitive display of the overall evolution trend.

[0011] The 3D surface plot mode in the plotting and visualization module specifically includes: a 3D surface drawing unit that combines multiple sets of experimental data into a 3D surface, supporting interactive operations such as rotation and scaling; a data normalization unit that ensures the 3D surface is smooth and comparable; and a fixed camera viewpoint and parallel projection function unit that generates high-quality images that meet publication standards.

[0012] The visualization and analysis software system for in-situ diffraction data also includes a fast conversion module for neutron time-of-flight (TOF) spectra and interplanar spacing (d-spacing) spectra. It has a built-in dedicated conversion algorithm to achieve rapid conversion between TOF spectra and d-spacing spectra. Users can easily switch between the two through the operation interface.

[0013] The visualization and analysis software system for in-situ diffraction data also includes a single-peak fitting analysis module, which specifically includes: a smoothing unit that provides two smoothing methods, Savitzky-Golay and Gaussian; a fitting function model unit that has built-in three fitting function models, namely Pseudo-Voigt, Gaussian, and Lorentzian; and a batch processing and result export unit that supports the one-time completion of peak shape fitting for multiple sets of experimental data and exports the results to an Excel file, and uses a clustering algorithm to automatically classify the results of the same peak position.

[0014] The toolbar interaction module also includes a dual slider control, which is used to quickly adjust the intensity range and link with other views in the two-dimensional contour map mode.

[0015] The system is implemented in Python, uses PyQt5 to build a graphical user interface, and uses Matplotlib and Mayavi as two-dimensional and three-dimensional plotting engines. It is open source and customizable.

[0016] The system is fully compatible with the data processing requirements of the engineering materials diffraction spectrometer, general powder diffraction spectrometer, and energy high-resolution imaging spectrometer of the China Spallation Neutron Source. It also has reserved expansion interfaces and can be applied to various experimental platforms such as synchrotron radiation diffraction and laboratory in-situ X-ray diffraction.

[0017] Compared with existing technologies, this invention has the following significant advantages: It overcomes the limitations of traditional software, supporting rapid import and automatic parsing of multi-format data. It can directly import various common neutron diffraction spectrometer data formats, including dat, chi, gsa, and histogramIgor, and automatically identify and parse environmental parameter information synchronously recorded in in-situ experiments, such as temperature, stress, module number, and operation number. This saves a significant amount of manual data processing and entry time, ensuring a close correspondence between experimental data and experimental conditions, laying a complete and reliable data foundation for subsequent analysis. Researchers no longer need to perform tedious data cleaning and conversion during experiments; they can directly obtain visualized results, improving real-time guidance and scientific decision-making capabilities, and increasing experimental efficiency.

[0018] The system of the present invention incorporates a dedicated conversion algorithm to achieve rapid mutual conversion between the time-of-flight spectrum (TOF spectrum) and the crystal plane spacing spectrum (d-spacing spectrum). Users only need to input specific parameters on the operation interface to complete the conversion, without the need for cumbersome manual calculations or script processing, greatly improving the efficiency of spectrum processing, effectively reducing manual calculation errors, and ensuring the scientific accuracy of experimental results.

[0019] The present invention designs three complementary plotting modes: the two-dimensional line graph mode (LineMode), the two-dimensional contour graph mode (ContourMode), and the three-dimensional surface graph mode (SurfaceMode). They respectively correspond to the observation of the intensity distribution of a single file, the overall comparison of the experimental results of multiple files, and the intuitive spatial display of multi-dimensional data. Users can freely switch between different modes and are provided with interactive editing tools to directly adjust parameters such as the title, coordinate axes, color scheme, scale, and resolution, generating high-quality images that can be directly used for academic publication. The Line mode and the Contour mode also support linkage to enhance the flexibility of data analysis.

[0020] The present invention supports a variety of smoothing and fitting algorithms, providing two smoothing methods, Savitzky-Golay and Gaussian, and three fitting function models, Pseudo-Voigt, Gaussian, and Lorentzian, for single-peak fitting operations. Users can fit individual experimental data or, through the batch processing function, complete the peak shape fitting of multiple groups of experimental data at one time and export the results as an Excel file in a unified manner. During the export process, a clustering algorithm is used to automatically classify the results of the same peak position, facilitating users to compare the evolution of the same diffraction peak under different experimental conditions and more efficiently analyze the structural change law of materials in the in-situ environment.

[0021] The images and fitting results generated by the present invention can meet the quality standards for academic publication. They have been rigorously optimized in terms of image resolution, color control, coordinate accuracy, and the accuracy of curve fitting, ensuring that the results are not only beautiful and intuitive but also have a high scientific credibility. Through comparative tests, it is found that the present invention can achieve the same accuracy in peak position fitting as the traditional Origin software, and even shows higher consistency and stability in some batch processing scenarios, greatly reducing the burden on researchers during the data mapping and paper preparation processes.

[0022] This invention possesses excellent batch processing and automation capabilities, effectively reducing reliance on manual intervention in experimental data analysis. Utilizing built-in automatic fitting and clustering algorithms, it can complete the analysis and organization of large amounts of experimental data in a short time, requiring only minor parameter settings to obtain batch results. Compared to traditional manual operations, it significantly shortens the data processing cycle, reduces the probability of operational errors, and improves the reliability and consistency of results.

[0023] This invention's software architecture boasts excellent scalability and openness. Implemented in Python, it utilizes PyQt5 for a graphical user interface and employs Matplotlib and Mayavi as its 2D and 3D plotting engines. The entire system is open-source and customizable. It is fully compatible with the data processing requirements of the Engineering Materials Diffraction Spectrometer (EMD), General Powder Diffraction Spectrometer (GPPD), and Energy-Resolved Imaging Spectrometer (ERNI) at the China Spallation Neutron Source, while also reserving expansion interfaces for further application to various experimental platforms such as synchrotron radiation diffraction and laboratory X-ray diffraction. In the future, it can also interface with the spectrometer's experimental control system and data analysis platform to build a one-stop data processing and analysis workflow, providing a solid technical foundation for the software's long-term application and interdisciplinary promotion. Attached Figure Description

[0024] Figure 1 This is a schematic diagram of the overall architecture of the Vind software in this invention; Figure 2 This is a schematic diagram of the TOF-d fast conversion interface in this invention, where Figure (a) is the TOF2d editing window before conversion; Figure (b) is the window after conversion. Figure 3 These are schematic diagrams of the three drawing modes in this invention, where Figure (a) is the LineMode line drawing mode; Figure (b) is the ContourMode contour line drawing mode; and Figure (c) is the SurfaceMode 3D surface drawing mode. Figure 4 These are examples of the single-peak fitting and cluster analysis results in this invention. Figure (a) shows the single-peak fitting, with the red dashed line representing the fitting curve and the blue circle representing the fitted peak position. Figure (b) shows the single-peak fitting window. Figure (c) shows the result saved as an Excel file, with the same diffraction peak from different in-situ diffraction experiments in one table. Figure (d) shows the single-peak fitting results, including peak position, peak height, half-width, and peak area.

[0025] Figure 5 This is a comparison chart of specific application cases of the present invention (comparison of Vind result (b) and Origin result (b)). Detailed Implementation

[0026] The following detailed description, in conjunction with the accompanying drawings, illustrates the specific implementation of the visualization and analysis software system for in-situ diffraction data of the present invention.

[0027] like Figures 1-5 As shown, this invention presents a software system for visualization and analysis of in-situ diffraction experimental data from large-scale scientific installations. The software system adopts a modular architecture design, comprising an entry control module, a user interface module, a data import and verification module, a plotting and visualization module, a toolbar interaction module, a resource and extension module, a rapid conversion module between time-of-flight spectra and interplanar spacing spectra, and a single-peak fitting analysis module. Information exchange between the modules is achieved through standardized interfaces, ensuring system stability and providing excellent support for functional expansion.

[0028] in Figure 1 This diagram illustrates the overall architecture of the Vind software in this invention. It showcases the modular architecture of the software system, including an entry control module, a user interface module, a data import and verification module, a plotting and visualization module, a toolbar interaction module, a resource and extension module, a rapid conversion module between time-of-flight spectra and interplanar spacing spectra, and a single-peak fitting analysis module. Arrows indicate the direction of information interaction between modules, clearly presenting the overall structure of the software system and the relationships between its modules. Figure 2 This is a schematic diagram of the TOF-d fast conversion interface in this invention. (a) Before conversion, the TOF2d editing window shows the TOF spectrum editing window interface before conversion. The window displays relevant data and graphics of the TOF spectrum, allowing users to perform basic operations such as viewing data points and adjusting the display range. (b) After conversion, the interface shows the d-spacing spectrum obtained after processing by the conversion algorithm. Compared to the TOF spectrum interface before conversion, the data and graphics have changed accordingly, demonstrating the successful conversion from TOF spectrum to d-spacing spectrum. Users can intuitively observe the characteristics of the d-spacing spectrum through this interface.

[0029] Figure 3The following are schematic diagrams of the interfaces for the three plotting modes in this invention: (a) LineMode: This demonstrates the interface for a two-dimensional line graph. The interface displays the peak shape and intensity variation curves of single or multiple experimental data. Users can perform operations such as ruler measurement, adding reference lines, and editing legends through interactive tools, facilitating quantitative analysis. (b) ContourMode: This demonstrates the interface for a two-dimensional contour plot. The interface presents a two-dimensional intensity distribution map formed by multiple sets of experimental data. The coordinate axes can be switched to different experimental data according to user needs. Users can adjust the intensity range using sliders to observe changes in the contour plot and perform linked analysis with the corresponding two-dimensional curve plot. (c) SurfaceMode: This demonstrates the interface for a three-dimensional surface plot. The interface combines multiple sets of experimental data into a three-dimensional surface. Users can observe the data structure from different angles through interactive operations such as rotation and scaling. Simultaneously, the interface provides fixed camera viewpoint and parallel projection functions, facilitating the generation of high-quality images.

[0030] Figure 4 Examples of single-peak fitting and cluster analysis results in this invention are shown below: (a) Single-peak fitting: The red dashed line represents the fitting curve, and the blue circle indicates the fitted peak position. This diagram illustrates the results of single-peak fitting, with the red dashed line representing the fitting curve and the blue circle marking the fitted peak position. Users can visually observe the fitting effect and peak position information through this diagram. (b) Single-peak fitting window: This diagram shows the operation window for single-peak fitting, where users can select parameters such as smoothing mode and fitting function model to perform single-peak fitting operations. (c) Save as an Excel file: The same diffraction peak from different in-situ diffraction experiments is presented in one table: This diagram shows an example of saving the single-peak fitting results as an Excel file. The fitting results of the same diffraction peak in different in-situ diffraction experiments are categorized in one table, facilitating comparative analysis by users. (d) Viewing single-peak fitting results: Peak position, peak height, half-width, and peak area: This diagram shows the interface for viewing the single-peak fitting results. Users can view the fitted peak position, peak height, half-width, peak area, and other parameter information in this interface, providing data support for further analysis of material structure. Figure 5 This is a comparison chart of application examples of the present invention (Vind result (a) vs. Origin result (b)). The chart demonstrates the advantages of the software of the present invention by comparing the results of Vind and Origin software in terms of peak position fitting accuracy, etc. As can be seen from the chart, the Vind software achieves peak position fitting accuracy comparable to the traditional Origin software, and even exhibits higher consistency and stability in some batch processing scenarios, reflecting the superiority of the software of the present invention in in-situ diffraction experimental data processing. The following specific examples illustrate this: P1 Entry Control Module In this embodiment, when the system starts, the entry control module loads the graphical interface framework and sets up a unified exception handling mechanism. This mechanism can capture runtime errors, such as file read errors and data processing exceptions, and provide error information to the user in a user-friendly manner, making it easy for the user to understand the problem and take appropriate action.

[0031] In this embodiment, the system first provides the user with a lightweight startup window where the user can select the desired experimental mode (such as neutron diffraction experiment, synchrotron radiation diffraction experiment, etc.) or instrument type (such as the Engineering Materials Diffraction (EMD) spectrometer at the China Spallation Neutron Source, the General Purpose Powder Diffraction (GPPD) spectrometer, etc.). The software establishes the corresponding working environment and functional modules based on the user's selection. For example, if the user selects the EMD instrument type, the system will load the data processing parameters and visualization settings related to EMD.

[0032] P2 User Interface Module In this embodiment, the software adopts a partitioned layout design. The left area is mainly used for file selection and control operations. Users can browse the local file system in this area, select the in-situ diffraction data file to be imported, and perform some basic control operations, such as starting data processing and pausing processing.

[0033] The right-hand area employs a multi-tab design to display different visualization modes, including 2D line graphs, 2D contour plots, and 3D surface plots. Each tab dynamically loads the corresponding drawing components as needed. For example, the system only loads the components required for 2D line drawing when the user clicks the 2D line graph tab, ensuring the efficiency and flexibility of the interface.

[0034] P3 Data Import and Verification Module The multi-file batch import unit supports various neutron diffraction spectrometer data formats, including .dat, .chi, .gsa, and histogramIgor. Users can select multiple data files that meet the format requirements for import at once using the batch import button on the interface. For example, if a user has multiple experimental data files in .dat format stored in a folder, the batch import function can quickly import these files into the software for subsequent processing.

[0035] The automatic parsing unit, during the import process, can automatically identify and parse environmental parameter information synchronously recorded in in-situ experiments, such as temperature, stress, module number, and operation number. The software extracts these environmental parameters by analyzing metadata or specific data structures in the file and stores them in association with the experimental data. For example, a CHI format file may contain temperature data from the experiment; the automatic parsing unit can accurately identify and extract this temperature value, providing more comprehensive information for subsequent data analysis.

[0036] P4 Plotting and Visualization Module Two-dimensional line graph mode (LinePlot), single-curve or multi-curve display unit: It supports switching different experimental files through buttons or dropdown menus. Users can choose to display the peak shape and intensity changes of a single experimental data, or display multiple experimental data for comparison at the same time. For example, users can display the experimental data curves at different temperatures in the same graph to visually observe the effect of temperature on diffraction peaks.

[0037] Interactive ruler, horizontal reference line and legend quick editing unit: Users can add rulers through interactive operations to accurately measure the coordinate values of points on the curve; add horizontal reference lines to facilitate the comparison of intensity values of different curves; quickly edit legends to modify information such as the style and position of legends, which is convenient for quantitative analysis and result comparison.

[0038] Two-dimensional contour plot mode (ContourPlot), two-dimensional intensity distribution rendering unit: This unit is used to render the two-dimensional intensity distribution map formed by multiple groups of experimental data. The coordinate axes can be quickly switched to different experimental metadata, such as run number or temperature. For example, users can set the ordinate to in-situ environmental parameters such as run number, temperature, stress, etc., to observe the change of the diffraction spectrum during in-situ experiments with respect to the in-situ environment.

[0039] Intensity range adjustment unit: Adjust the intensity range through a slider, and the system will simultaneously update the contour plot and the corresponding two-dimensional line graph to achieve linkage between different views. For example, when users adjust the slider to change the intensity range, the display area of the contour plot and the display range of the corresponding two-dimensional line graph will change accordingly, which is convenient for users to observe data from different intensity levels.

[0040] Multiple normalization methods and color mapping selection unit: It provides multiple normalization methods, such as linear normalization, logarithmic normalization, etc., and multiple color mapping schemes, such as heat map color mapping, rainbow color mapping, etc., which are convenient for intuitively showing the overall evolution trend. Users can choose appropriate normalization methods and color mappings according to the characteristics of the data and the observation requirements.

[0041] Three-dimensional surface graph mode (SurfacePlot), three-dimensional surface drawing unit: Combine multiple groups of experimental data into a three-dimensional surface, and users can observe the data structure from different angles through interactive methods such as rotation and scaling. For example, users can rotate the three-dimensional surface graph to observe the distribution of diffraction peaks in three-dimensional space from different perspectives.

[0042] The data normalization unit normalizes different experimental data when plotting 3D surfaces to ensure that the 3D surfaces are smooth and comparable. For example, it normalizes the intensity values ​​of different experimental data to the same range to avoid inaccurate 3D surface display due to different data units.

[0043] The fixed camera viewpoint and parallel projection function units provide a fixed camera viewpoint function, allowing users to set a specific observation viewpoint for easy comparative analysis; the parallel projection function can generate high-quality images that meet publication standards, making 3D surface plots more professional in academic publications.

[0044] P5 Time-of-Flight Spectrum to Interplanar Spacing Spectrum Fast Conversion Module This module incorporates a dedicated conversion algorithm, enabling rapid conversion between TOF and d-spacing spectra. Users can easily switch between TOF and d-spacing spectra simply by clicking a conversion button in the user interface, eliminating the need for tedious manual calculations or script processing. For instance, when studying the crystal structure of materials, it may be necessary to convert TOF spectra to d-spacing spectra for more intuitive analysis of interplanar spacing information; this module allows for rapid conversion, improving research efficiency.

[0045] P6 Single-peak Fitting Analysis Module The smoothing unit offers two smoothing methods: Savitzky-Golay and Gaussian. Users can choose the appropriate smoothing method based on the characteristics of the data. For example, for noisy data, Savitzky-Golay smoothing can be selected to effectively remove noise while preserving the data's features.

[0046] The fitting function model unit includes three built-in fitting function models: Pseudo-Voigt, Gaussian, and Lorentzian, for single-peak fitting operations. Users can select the appropriate fitting function model based on the shape of the diffraction peak. For example, for diffraction peaks with an approximately Gaussian distribution, the Gaussian fitting function model can be selected.

[0047] The batch processing and result export unit supports peak shape fitting of multiple sets of experimental data at once. Users only need to select the multiple data files to be fitted, set the fitting parameters, and the software can automatically complete the batch fitting. After fitting, the results are exported to an Excel file for easy data processing and analysis. Simultaneously, clustering algorithms are used to automatically categorize results for the same peak position. For example, fitting results for the same diffraction peak under different experimental conditions are grouped together, making it easier for users to compare the evolution of diffraction peaks under different experimental conditions.

[0048] P7 Toolbar Interactive Module Building upon the standard drawing toolbar, this version expands upon it with features such as mode switching, normalization method selection, peak analysis, and style management. User actions directly drive updates to the drawing components via interactive signals, providing real-time visual feedback. For example, users can quickly switch between different visualization modes using the mode switching button on the toolbar.

[0049] For 2D contour plots, the toolbar integrates a dual-slider control for quickly adjusting the intensity range and linking it to other views. Users can drag the dual sliders to simultaneously adjust the intensity display range of the contour plot and the corresponding 2D curve plot, improving the efficiency of data analysis.

[0050] The toolbar also provides functions such as high-resolution image export and font style adjustment to ensure that the generated images meet the needs of scientific publication. For example, users can export the visualization results as high-resolution PNG or TIFF images, and adjust the font style, size, etc. in the image to make the image more beautiful and professional.

[0051] P8 Resources and Extension Modules The system provides a unified resource management mechanism for loading style files, icons, and themes, ensuring consistency of the interface across different operating environments. For example, the interface style remains consistent regardless of whether the software runs on Windows or Linux systems.

[0052] Meanwhile, the system architecture supports flexible expansion. For example, it can adapt to new experimental instrument data formats by inheriting the file selection module, and it can implement new normalization methods or analysis modes by adding new toolbar controls. For instance, when a new neutron diffractometer is put into use, only the file selection module needs to be inherited and modified accordingly to support the data format generated by that instrument; when a new normalization method needs to be added, only the corresponding control needs to be added to the toolbar interaction module.

[0053] In summary, the software architecture of this invention, through the organic integration of various modules, realizes a complete process of in-situ diffraction experimental data from import and processing to multi-mode visualization and interactive analysis. It has the advantages of simple operation, stable operation, rich functions and strong scalability, providing solid technical support for the efficient processing and scientific analysis of in-situ experimental data.

Claims

1. A visualization and analysis software system for in-situ diffraction data, characterized in that, include: The entry control module is used to load the graphical interface framework when the system starts, set up a unified exception handling mechanism, provide a lightweight startup window for users to select experimental modes or instrument types, and establish corresponding working environments and functional modules according to user selections. The user interface module adopts a partitioned layout design, with the left area used for file selection and control operations, and the right area using a multi-tab design to display different visualization modes. The data import and verification module supports batch import of multiple files, automatically parses file naming rules and embedded metadata information, and transforms them into standardized data structures. The drawing and visualization module provides 2D line graph mode, 2D contour graph mode and 3D surface graph mode, and supports interactive editing and multi-mode linkage; The toolbar interactive module expands the functions of mode switching, normalization method selection, peak shape analysis, style management, etc., and provides high-resolution image export options; The resource and extension modules provide a unified resource management mechanism and support the adaptation of new data formats and analysis modes through inheritance and extension.

2. The visualization and analysis software system for in-situ diffraction data according to claim 1, characterized in that, The data import and verification module specifically includes: The multi-file batch import unit supports multiple neutron diffraction spectrometer data formats, including dat, chi, gsa, and histogramIgor. The automatic analysis unit is used to automatically identify and analyze environmental parameter information recorded synchronously in the in-situ experiment during the import process, such as temperature, stress, module number, and operation number.

3. The visualization and analysis software system for in-situ diffraction data according to claim 1, characterized in that, The two-dimensional line graph mode in the drawing and visualization module specifically includes: The display unit can display single or multiple curves and supports switching between different experimental files via buttons or drop-down menus; the interactive ruler, horizontal reference line and legend quick editing unit facilitate users to perform quantitative analysis and result comparison.

4. The visualization and analysis software system for in-situ diffraction data according to claim 1, characterized in that, The two-dimensional contour map mode in the drawing and visualization module specifically includes: Two-dimensional intensity distribution rendering unit, the coordinate axis can be quickly switched to different experimental metadata; The intensity range adjustment unit allows users to adjust the intensity range using a slider and simultaneously update the contour map and the corresponding two-dimensional curve map. Multiple normalization methods and color mapping selection units make it easy to intuitively display the overall evolution trend.

5. The visualization and analysis software system for in-situ diffraction data according to claim 1, characterized in that, The 3D surface plot mode in the drawing and visualization module specifically includes: The 3D surface rendering unit combines multiple sets of experimental data into a 3D surface, supporting interactive operations such as rotation and scaling. Data normalization units ensure smooth and comparable 3D surfaces; A fixed camera viewpoint and parallel projection function unit generate high-quality images that meet publication standards.

6. The visualization and analysis software system for in-situ diffraction data according to claim 1, characterized in that, It also includes a module for rapid conversion between neutron time-of-flight (TOF) spectrum and interplanar spacing (d-spacing) spectrum, with a built-in dedicated conversion algorithm to achieve rapid conversion between TOF spectrum and d-spacing spectrum. Users can easily switch between the two through the user interface.

7. The visualization and analysis software system for in-situ diffraction data according to claim 1, characterized in that, It also includes a single-peak fitting analysis module, specifically including: The smoothing unit offers two smoothing modes: Savitzky-Golay and Gaussian. The fitting function model unit has three built-in fitting function models: Pseudo-Voigt, Gaussian, and Lorentzian. The batch processing and result export unit supports the completion of peak shape fitting for multiple sets of experimental data at one time, and exports the results to an Excel file. It also uses a clustering algorithm to automatically classify the results of the same peak position.

8. The visualization and analysis software system for in-situ diffraction data according to claim 1, characterized in that, The toolbar interaction module also includes a dual slider control, which is used to quickly adjust the intensity range and link with other views in the two-dimensional contour map mode.

9. The visualization and analysis software system for in-situ diffraction data according to claim 1, characterized in that, The system is implemented in Python, uses PyQt5 to build a graphical user interface, and uses Matplotlib and Mayavi as two-dimensional and three-dimensional plotting engines. It is open source and customizable.

10. The visualization and analysis software system for in-situ diffraction data according to any one of claims 1 to 9, characterized in that, The system is fully compatible with the data processing requirements of the engineering materials diffraction spectrometer, general powder diffraction spectrometer, and energy high-resolution imaging spectrometer of the China Spallation Neutron Source. It also has reserved expansion interfaces and can be applied to various experimental platforms such as synchrotron radiation diffraction and laboratory in-situ X-ray diffraction.

Citation Information

Patent Citations

  • Three-dimensional calibrating measurement device for neutron diffraction stress analysis

    CN106770402A

  • X-ray diffraction data analysis system

    CN109725013A

  • Intelligent equipment management and control system

    CN119596768A

  • In-situ solidification observation experiment and analysis method for nickel-based superalloy

    CN120490038A

  • System and method for generating user interfaces for different instrument types

    US20040032430A1