LLNL-TR-2023876 Development and Validation of a Python Workflow for ZYGO Double- Sided Thickness Measurement_Final2026 S Ravandi, G Woo Sep 2026 This document was prepared as an account of work sponsored by an agency of the United States government. Neither the United States government nor Lawrence Livermore National Security, LLC, nor any of their employees makes any warranty, expressed or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately owned rights. Reference herein to any specific commercial product, process, or service by trade name, trademark, manufacturer, or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States government or Lawrence Livermore National Security, LLC. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States government or Lawrence Livermore National Security, LLC, and shall not be used for advertising or product endorsement purposes. This work performed under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory under Contract DE-AC52-07NA27344. Development and Validation of a Python Workflow for ZYGO Double-Sided Thickness Measurement Gillian Woo LLNL SULI Summer Internship 2026 ABSTRACT Target fabrication at the National Ignition Facility (NIF) in Lawrence Livermore National Laboratory depends on accurate, high-resolution metrology of extremely small, thin, and sensitive films. Precise measurements of film thickness, surface flatness, and part geometry are essential for producing targets that meet the quality standards required for NIF experiments. During my SULI internship, I developed an open-source Python-based analysis tool to modernize the existing ZYGO double-sided white light interferometry MATLAB analysis workflow used for thickness calculations and mapping. The software processes ZYGO surface-height data to calculate film thickness, flatness and parallelism; store information about planar components; and perform statistical analysis of components with varied geometries. The tool is intended to reduce reliance on legacy MATLAB software, lower long-term maintenance costs, and provide for future improvements and applications. Currently, the Python software is designed for EOS and Tardis substrates, with plans to expand its capabilities all substrates that use ZYGO surface-height data that use ZYGO surface-height data. In this project, I used LivChat AI to write sections of the code that processed data and to debug when necessary. This work contributes to the Department of Energy’s mission by supporting NIF target fabrication and the broader national effort in high-energy-density physics, fusion research, and national security science. It also demonstrates how modern data-analysis software can improve experimental workflows and help researchers use complex measurement data more efficiently. Through this project, I gained experience in scientific software development in basic Python, metrology data analysis, and software workflow modernization. The internship strengthened my ability to connect experimental science with software development and provided valuable insight into research at a national laboratory compared with research in private industry. Overall, the SULI experience expanded my technical and writing skills, improved my confidence as an engineer, and helped me better understand how collaborative engineering and scientific work support LLNL’s mission. INTRODUCTION The National Ignition Facility’s Target Fabrication relies on consistent, high-quality metrology to produce specialized targets for high-energy-density physics experiments. Metrologists use the ZYGO white light interferometer to perform high precision, rapid, noncontact measurements of surface flatness, step height, roughness, and thickness for various geometries. White-light interferometry measures the surface by directing light toward a part and analyzing the constructive or destructive interference produced when the reflected light combines with the one pointing directly down. The system identifies the position at which interference is strongest for each location. These measurements are combined to generate a surface-height map, which can then be processed and analyzed to calculate different metrology measurements. Some other metrology methods are confocal microscopy, ultrasonic, capacitor measurements, and ionizing electromagnetic beams [4 and 5]. Although the ZYGO interferometer provides accurate measurements for many components, its capabilities are limited by material’s geometry and properties. Rough or matte surfaces may not produce sufficiently strong or consistent reflections for precise measurements. Steep slopes, sharp edges, and discontinuities can also produce incomplete or distorted surface height maps that do not accurately represent the part’s true geometry. In addition, the interferometer requires a direct optical line of sight and therefore cannot measure internal features or enclosed geometries. MATLAB and Python are widely used programming languages for scientific computing and data analysis. for scientific computing and data analysis. Both support various mathematical operations, data visualization, interactive plotting, and large data-set processing. The original analysis workflow, developed and used by LLNL, was written in MATLAB. Python was selected for modernization due to its open-source nature, broad support, and ease of modification and maintenance without requiring a commercial software license. Python also provides access to extensive documentation, tutorials, user forums, and debugging resources, which can reduce barriers for future users and developers. In addition, its broad ecosystem of libraries supports data analysis, visualization, automation, and scientific computing. These characteristics make Python well suited for modernizing the project’s data-analysis and management workflows. The objective of this project was to modernize the existing MATLAB-based ZYGO metrology workflow by developing an open-source Python tool for analyzing substrate thickness, surface flatness, and parallelism. Some MATLAB functions in the legacy script were difficult or impossible to use, as the original code had not been updated for newer MATLAB versions. Python implementation avoided these compatibility issues by providing updated implementations of the required analysis functions in a current, open-source environment. The project involved converting and validating 35 MATLAB scripts and functions, developing additional analysis capabilities, and creating user and developer documentation to support future users and developers. RESULTS AND DISCUSSION This project involved reviewing and understanding the existing MATLAB files that were used in the original ZYGO thickness-analysis workflow. I was assigned 35 MATLAB files related to thickness calculations for conversion to Python. Before starting the conversion of MATLAB files to Python, I used LLNL’s AI (LivChat) to help examine each file to understand its purpose, inputs, outputs, and relation to the overall analysis process. I organized the files in an Excel spreadsheet according to shared functions, outputs, and purposes. This organization made the conversion process easier to visualize and allowed me to address related files as groups rather than individually. Although MATLAB and Python have similar functionality, some MATLAB functions do not have direct Python equivalents. Via using AI, I translated the relevant calculations and data-processing steps while preserving the functionality and accuracy of the original scripts. I used LLNL’s AI chat to help me write sections of the thickness, flatness, and parallelism scripts, and to debug. In some cases, I developed Python-specific functions to reproduce the behavior of MATLAB operations. I worked with the Target Fabrication metrology team to show the parts of the MATLAB code that still worked and noted down important functions that they needed based on their initial scope of the project. This process helped ensure that the Python software functioned independently while remaining consistent with the original MATLAB workflow. After establishing equivalence between the original MATLAB workflow and the Python implementation, I expanded the software to support additional metrology calculations. These extensions included flatness, and parallelism analyses. With using AI, I developed three Python functions to replicate the functionality of the original MATLAB script: file import for multiple data formats, a region-of-interest (ROI) selection tool, and a fiducial alignment tool. An important feature of the thickness workflow is its ability to accept .datx, .xyz, and .asc files and extract only the ZYGO surface data from the selected top and bottom scans [1]. The program searches the file metadata for the internal file path beginning with data/surface and extracts the corresponding height data, while converting all height values to micrometers. Each scan contains three fiducial markers used to align the top and bottom surfaces. I used AI to help me create the section of lines where the bottom scan automatically rotates and translates itself so that its fiducial markers align with those on the top scan. The software automatically rotates and translates the bottom scan so that its fiducial markers align with the fiducial markers on the top scan. This alignment can be viewed in both the program window and the processed height data (figure 1). The same transformation is then applied to the user-selected ROI. After the user selects a ROI on the top scan, the software creates a corresponding ROI at the same physical location on the bottom scan. In this section, I used AI to help develop a process that allows the user to draw a polygon on the selected image to create the ROI. In automating this process, the program can improve consistency and accuracy by reducing the possibility of selecting mismatched regions on the two surfaces. Figure 1: Verify the fiducials alignment (three fiducials shown as white circles in the figure). These three Python scripts were enough to wire the essentials of the thickness workflow. The thickness workflow was the primary component of the project, as it formed the basis of the original MATLAB analysis. The thickness script is the main analysis workflow that provides a complete thickness and analysis workflow. It loads top and bottom surface files (.datx, .xyz, and .asc), flips the bottom scan, lets the user select the diving board region, removes surface tilt, and aligns the top and bottom scans using fiducial points. It calculates full, substrate, ROI, and diving board thickness maps using the diving board thickness correction and computes average and standard deviation statistics. The script, then, saves the thickness data into a csv file with the data in micrometers and maps, plots, and histogram/Gaussian fit results in a JPG (figure 2). For the histogram section, I used AI to help me understand how to create a histogram and process the thickness measurements into bins, create the histogram layout, and calculate the Gaussian fit outputs. Figure 2: Thickness histograms using ZYGO surface data. ROI histogram is the calculated thickness of the user-selected ROI. DB histogram is the calculated thickness of the diving board. Full histogram is the calculated thickness of the full sample and the diving board. This flatness script functions independently from the primary thickness-analysis workflow. It removes invalid and extreme values, removes tilt and curvature, and then calculates GD&T peak-to-valley flatness [3] for the top and bottom surface matrices. It displays these values in a heat map style plot and in a CSV. In the flatness and parallelism scripts, I used the GD&T articles [2 and 3] to help me understand how to calculate flatness and AI to help apply the base code I wrote to use the ZYGO surface data I had. A future task is to combine thickness and flatness scripts so the same ROI and flattened surface scans An important display feature of the flatness tool is its heat-map visualization. The heat map provides a visual representation of height variations across the surface, allowing users to identify areas with variations in elevations (figure 3). It can also serve as a quality- control check by highlighting potential surface imperfections, which appear as color differences relative to the surrounding material. In this process, I used AI to help me with the GUI to display the heat maps and save them to the selected results folder. I incorporated a similar visualization into the thickness workflow to help display thickness variations in samples with nonuniform surface heights. Figure 3: ZYGO flatness ROI heat map. In addition to the thickness and flatness tools, I developed a separate script for evaluating substrate parallelism. In this parallelism script, I used AI to help me understand the math and connect the base code I wrote to fit the ZYGO surface data that I had. It automatically fits a minimum-zone reference plane to the measured height data in the surface maps. It uses the GD&T definition of parallelism, where the script calculates the residual height of each point in the surface height map point from the minimum zone reference plane, then minimizes the difference between the maximum and minimum residuals [2]. Parallelism values are reported in micrometers for both the selected ROI and the full substrate on the top and bottom scans. Unlike the flatness and thickness workflows, this does not remove tilt as this calculates true parallelism. The Python tools also provide a more user-friendly workflow. Users can complete the analysis through a simplified sequence of steps and use fewer program windows than in the original workflow. However, the user can be stuck on the processing page for up to five minutes (figure 4) due to the data processing time increases as the ROI becomes larger as it must filter through more surface data. The software must process more data for alignment, filtering, calculations, and visualization, which can increase the time required to generate results. This tradeoff allows users to select larger regions for more comprehensive analysis while recognizing the associated increase in processing time. Figure 4: Processing status window. The Python measurements showed comparable trends to the MATLAB results, but a full one-to-one comparison was not completed within this scope due to the Python and MATLAB different ROI selection methods. As a result, small differences in ROI placement can significantly affect the final measurements, which limits the direct comparability between the two outputs. For future work, implementing functionality to save and reload ROI data would help standardize ROI definitions across MATLAB and Python, improving consistency and reproducibility of MATLAB-to-Python comparisons. Future improvements could extend the ROI-selection and fiducial-alignment tools to accommodate substrates with different shapes, sizes, fiducial locations, and numbers of fiducials. A modular configuration system could store the geometry, image dimensions, pixel size, and fiducial information associated with each substrate type. These improvements would increase the tool’s adaptability, reduce manual editing, improve measurement consistency, and support broader use in NIF target fabrication. In addition to developing and testing the Python analysis tools, I created several types of documentation and presentation materials to communicate the project’s purpose, functionality, and results. These materials included a presentation for interns and Target Fabrication management, a research poster, and a user help document. The presentation summarized the project and its challenges, while the poster provided a concise visual overview of the Python-based workflows and results. The ZYGO Python help document was designed for both users and future developers. It included descriptions of each function, along with a step-by-step tutorial supported by detailed figures. CONCLUSION In this project, with assistance from LivChat, I developed open-source Python data analysis software to replace the existing MATLAB based approach for ZYGO substrate metrology measurements. The scripts can process surface scans to determine thickness, flatness, and parallelism, while supporting multiple file formats and fiducial-based scan alignment. Users can define different ROI shapes and review the resulting measurements through the software’s visualization tools. Although the Python tool successfully provides an initial implementation of the existing metrology software, additional validation must occur before it can fully replace the MATLAB process. Python measurements are a useful baseline, but the Python and MATLAB outputs were not fully verified as consistent within this project due to differences in selected ROI influencing final measurements. The Python tools produced here should be considered a strong starting point. The next step is to complete a systematic MATLAB-to-Python comparison using consistent ROI definitions across both workflows. Future development could include functions to save and reload ROI data to improve consistency and reproducibility. It could also extend the ROI-selection and fiducial-alignment tools to handle substrates with different shapes, sizes, fiducial locations, or different numbers of fiducials. A modular configuration system could store substrate geometry, image dimensions, pixel size, and fiducial information by substrate type, reducing manual edits and improving measurement consistency. In addition to developing and testing the Python analysis tools, I created documentation and presentation materials to communicate the project’s purpose, functionality, and results. These included an intern/Target Fabrication presentation, a research poster, and a help document. This work demonstrated how Python data analysis can improve the accessibility, consistency, and long-term maintainability of metrology workflows. It also provided experience in software development, experimental data analysis, documentation, and target fabrication processes in support of the laboratory’s mission.