WorksPhysics and Astronomy
Automated CR-39 pit detection for energy and angular characterization of laser-driven ion beams
Abstract
Accurate characterization of ion beams from sub-MeV to multi-MeV energies is essential for diagnostics in laser-driven ion acceleration and fusion research. CR-39 detectors are widely used to measure absolute ion yields, while ion energy and incidence angle can be inferred from etched-pit geometries. In this study, we present an automated CR-39 pit detection method that enables reliable extraction of pit geometries from two-dimensional optical micrographs, with improved discrimination of overlapping pits under high-flux conditions. This capability enables reliable analysis in high-density regimes where conventional methods are limited by significant track overlap. By integrating the detected pit shapes with a pit-formation model based on Monte Carlo simulations of restricted energy loss, energy and angular characterization of laser-driven proton beams is achieved with enhanced precision and computational efficiency. The proposed framework provides a robust and scalable approach for automated CR-39 analysis and is applicable to a broad range of ion-beam diagnostics and spectroscopy.
Introduction
Columbia Resin-39 (CR-39) is a widely used solid-state nuclear track detector that records ion tracks through localized scission of polymer chains induced by energetic ions[1]. These latent tracks are subsequently revealed by chemical etching, a process governed by both the etching conditions and the interaction between incident ions and the polymer chains. Owing to its chain-like molecular structure, CR-39 exhibits high sensitivity to light ions and has been widely applied in nuclear and particle physics[2, 3], radiation therapy and dosimetry[4, 5], laser-driven ion acceleration[6, 7], and laser-assisted fusion studies[8, 9].
The formation of latent tracks and their subsequent development into etch pits during chemical etching are determined by the initial characteristics of the incident ions, commonly modeled using the restricted energy loss (REL) criterion[10, 11]. This dependence manifests in the track etch rate, as demonstrated experimentally by Somogyi[12]. The resulting pit geometry is described by track-etching models originally developed by Fleischer and Price[13] and later generalized by Somogyi and Szalay[14].
Despite the capability of CR-39 detectors to provide detailed information on individual ions, their application in high-flux environments is often limited by the labor-intensive and time-consuming nature of pit identification and measurement. In laser-driven experiments, where large numbers of tracks are produced, efficient extraction of ion information from etched CR-39 samples requires automated and robust image-analysis methods. Conventional perimeter-tracking methods, such as the dynamic edge detection implemented by Fews[15], identify overlapping tracks by searching for reentrant corners along the contour. This approach facilitates precise morphological extraction for isolated pits; however, it is susceptible to failure in high-flux regions where severe geometric merging or image noise obscures these critical reentrant features. More recently, Seimetz et al. utilized the ROOT framework for automated track identification within predefined diameter ranges[16]. This method accelerates the processing of large datasets; however, its assumption of circular pit openings fundamentally discards the incidence-angle information encoded in elliptical tracks.
Three-dimensional confocal microscopy enables full reconstruction of pit morphology, but at the cost of substantially increased data acquisition and processing complexity[17]. Furthermore, the CR-39 response depends not only on etching conditions but also on manufacturing variations[18], necessitating careful calibration when relating pit geometry to ion parameters. Under high-flux conditions, commonly encountered in laser-driven ion acceleration and fusion experiments, the ability to resolve overlapping pits and to perform computationally efficient analysis is therefore essential.
In this study, we develop an automated detection algorithm for etched pits in two-dimensional optical micrographs of alkaline-etched CR-39, enabling accurate determination of pit size and particle number. The computational framework combines a global detection scheme, optimized for resolving overlapping pits, with local least-squares ellipse fitting to extract pit geometries with high precision. In contrast to conventional perimeter-tracking approaches that rely on reentrant-corner identification, the proposed framework remains effective in high-flux regions where severe pit overlap can obscure contour features. Furthermore, unlike circular-track-based identification methods, the ellipse-fitting procedure preserves the incidence-angle information encoded in the pit geometry, enabling simultaneous reconstruction of particle energy and trajectory. The implementation supports efficient GPU acceleration and maintains robustness under high-yield conditions with substantial pit overlap. To establish the relationship between pit geometry and ion parameters, calibration experiments were performed using laser-driven multi-MeV proton beams generated via the target normal sheath acceleration (TNSA) mechanism at the 100-TW laser facility at National Central University. The extracted pit dimensions are compared with a theoretical pit-formation model based on Monte Carlo simulations of restricted energy loss, enabling reconstruction of ion energy and incidence angle from the measured major and minor axes of the fitted ellipses.
Experimental Setup
The experiment was performed using a 100-TW Ti:sapphire laser system based on chirped-pulse amplification at National Central University[19]. The schematic of the experimental setup is shown in Figure 1. An 800-nm, -polarized laser pulse is focused onto the target using an f/6 off-axis parabolic mirror (OAP), producing a focal spot with a full width at half maximum (FWHM) diameter of 6.4 m and 81.6% energy enclosed within a Gaussian-fit profile. The laser pulse duration is 43 fs (FWHM), with a temporal contrast ratio of at 250 ps before the main pulse. The corresponding peak intensity is W/cm. A polyethylene (PE) foil with a thickness of 11 m is used as the target and positioned at the focal plane.

Figure 1. Experimental setup for validation of the pit-detection algorithm and ion-parameter reconstruction. Inset: focal spot image and corresponding intensity profile. The PE foil target is mounted on a holder capable of withstanding laser shots. The downstream Thomson parabola spectrometer collects ions within a divergence angle of mrad and energies above 0.3 MeV. The red and green arrows indicate the directions of the electric and magnetic fields of the TPS, respectively.
Ion beams generated via the TNSA mechanism were characterized using a Thomson parabola spectrometer (TPS) aligned with the target normal. The customized TPS consists of a collimator positioned 30 cm from the target, followed by an electric dipole and a magnetic dipole with field strengths of 200 kV/m and 0.31 T, respectively, enabling charge-to-mass-dependent deflection of ions. Downstream CR-39 detectors record the deflected ion traces, from which the energy spectra are reconstructed. The ion energies measured by the TPS also serve as inputs for subsequent pit-formation modeling (Sec. IV).
Chemical etching of CR-39 samples was performed in a 7.25 M NaOH solution at °C for 30 min under continuous stirring to ensure uniform etching conditions. Based on the restricted energy loss model and the resulting pit-size distributions (Sec. IV), an etching duration of 0.5 h is identified as optimal for maximizing the diagnostic dynamic range. At this duration, shallow tracks generated by high-energy protons exceed the optical diffraction limit, while severe pit overlap from low-energy protons in high-flux regions is largely avoided. Optical micrographs of the etched samples were acquired using a TASLImage microscope system[20].
Pit Detection Algorithm on Etched CR-39 for Ion Spectral Analysis
Fundamentals of Numerical Modeling
Pit formation in etched CR-39 results from the difference between the etch rate along the ion-damaged track, , and that of the undisturbed bulk material, , as schematically illustrated in Figure 2. For a homogeneous substrate, is constant, whereas varies along the ion track coordinate , governed by the local damage density characterized by the restricted energy loss (REL). Previous studies[12] have shown that the etch-rate ratio, defined as , can be expressed as

Figure 2. Schematic of pit formation during chemical etching. The coordinate denotes the track axis along the ion trajectory. After a surface removal depth , the pit walls expand laterally at the bulk etch rate and advance along the track at the track etch rate until reaching the terminal point.
where and are fitting parameters that depend on the polymer composition, fabrication process, and etching conditions.
The geometrical model of pit formation, originally developed by Somogyi and Szalay[14], describes the evolution of the pit walls as a function of the etch-rate ratio , the surface removal depth , and the ion incidence angle , where denotes the etching time. As illustrated in Figure 2, an arbitrary surface point can be traced back to a source point along the ion trajectory. The etching time can be expressed as
where (see the supplementary material, Sec. I.A), and the trajectory satisfies from geometrical considerations.
Defining , the pit-wall profile can be parameterized as
The pit opening is determined by the edge points and , which satisfy
where and denote the source points associated with and , respectively. While remains nearly constant over the distance , the pit opening can be approximated by an ellipse (see the supplementary material, Sec. I.B), with major and minor axes given by
The evolution of pit geometry for a given ion characteristics is obtained by fitting Eqs. (5a) and (5b) to the measured major and minor axes, and , for different ion energies at a known incidence angle. The required REL data for each ion species are calculated using the Geant4 Monte Carlo framework.
Procedures for pit detection
Given the relation between pit openings and ion parameters, precise measurement of pit opening shape allows for the retrieval of spectrometric information for different ion species. To that end, 8-bit grayscale images of the proton-irradiated CR-39 surface are acquired using the TASLImage™ microscope system[20], as shown in Figure 3. The image processing framework is divided into two stages: global peak detection and local shape identification. This modular structure ensures both high detection accuracy and computational efficiency.

Figure 3. Micrograph of a CR-39 detector following laser-driven proton irradiation and a 0.5-h etching period, illustrating multiple overlapping etch pits.
Global peak detection
In the stage of global peak detection, cone tips of ion tracks are identified through analysis of grayscale intensity gradients, as illustrated in Figure 4(a). Edge points are extracted using Otsu’s adaptive thresholding method[21], and employed to construct straight-line segments through a GPU-accelerated implementation of Bresenham’s algorithm[22]. A Hough-transform-based voting scheme[23] is subsequently applied to determine candidate pit centers from the spatial density of line intersections, as shown in Figure 4(b). The peak position is defined as the location of maximal line accumulation in the parameter space.

Figure 4. Peak-identification for CR-39 images. (a) Edge mask from Otsu global thresholding applied to the gray-level gradient. (b) Accumulator space produced by Hough-transform voting. (c) Initial peak-detection with candidate peaks marked with yellow dots. (d) Final candidate pits after Gaussian smoothing and maximum filtering.
As illustrated in Figure 4(c), this peak-detection approach is susceptible to contamination from background noise and diffraction patterns arising from the pit boundaries. To mitigate these effects, a maximum filter is applied to the smoothed parameter space, with the kernel size chosen according to a user-specified minimum spacing between adjacent pits. The refinement, shown in Figure 4(d), enhances robustness to variability in edge-point detection and effectively suppresses unwanted features arising from surface scratches and particulate contamination.
Local ellipse detection
The major and minor axes of the elliptical pit openings are obtained via localized fitting of individual pits. For each detected peak, multiple analysis windows centered on the peak are evaluated. The direct least-squares ellipse fit of Fitzgibbon et al.[24] (details in the supplementary material, Sec. II) is computed in parallel on GPUs. A conic section is represented in matrix form with the parameter vector ( is the matrix transpose operation), and the data matrix has the th row . To ensure the fitted conic strictly represents an ellipse rather than a hyperbola or parabola, an equality constraint is introduced to guarantee a unique elliptical solution. The ellipse constraint is represented by a matrix , where , , and all other entries are zero. A Lagrangian formulation reduces the constrained least-squares problem to a generalized eigenvalue problem by setting the corresponding derivatives to zero
where and is the Lagrangian multiplier. The solution vector leads to the expression for the ellipse center , given by
The precise determination of the major and minor axes relies on reducing numerical instability. To this end, the coordinate system is centered using and , and the ellipse equation is reformulated into the form
where , , and are the normalized coefficients after eliminating the linear terms through centering. The eigenvalues of the corresponding matrix representation of the quadratic form are determined by
which allows the measured major and minor axes, and , to be computed from the relations
The inclination of the ellipse, which gives the information of incident angle, is determined by .
The determination of fitting points is based on the gradient similarity to a reference pit, characterized by a unit vector field (Figure 5(a))

Figure 5. Ellipse-fitting and overlap-separation procedure for CR-39 pits. (a) Pit micrograph with the unit radial vector field from Eq. (14) overlaid. (b) Dot product map between the grayscale gradient and the unit radial field. (c) Separation of overlapping pits to minimize mutual interference between adjacent detections.
The dot product between the grayscale gradient and provides a scalar score at each point, as shown in Figure 5(b). A subsequent Otsu thresholding is then applied to select pixels with both large gradient magnitudes and strong directional agreement, thereby systematically decoupling the pit contours from optical diffraction fringes and surface defects.
In regions of high track density, overlapping pits produce merged elliptical profiles with indistinct boundaries, complicating the discrimination of individual openings. To address this issue, a separation line is placed in the middle between each pair of overlapping pit peaks to separate the detection areas (Figure 5(c)). A user-defined exclusion region around each separation line is omitted from the detection process, which breaks the coupling between intersecting tracks and prevents bias from geometrical fitting. While the exclusion-region width must be chosen with care, the procedure remains robust and can reliably fit ellipses using only partial segments when pit overlap occurs.
Results
With appropriate parameter settings, the detection algorithm reliably extracts the pit positions and the corresponding major and minor axes, as shown in Figure 6(a). These data enable statistical analyses of pit-size distributions, divergence-angle distributions, and spatial profiles of the ion number density.

Figure 6. Pit detection results. (a) Detected pits are outlined by green ellipses, with centers indicated by red dots. (b) Distributions of the major axes and (c) minor axes of the detected pits, comparing results obtained from the automated algorithm (gray histogram, solid-line fit) and manual measurements (red histogram, dashed-line fit). The comparison reveals a systematic geometric offset resulting from differences in boundary definition, with manual measurements relying on subjective visual identification of the pit edge and the automated algorithm defining the boundary at the location of the maximum grayscale gradient.
To evaluate the algorithm’s performance, the major and minor axes of the same pit dataset were independently measured by manual tracing. A comparison between the automated and manual results, shown in Figure 6(b) and Figure 6(c), reveals a systematic difference of in the mean pit size. This discrepancy originates from the different definitions of the pit boundary. In manual tracing, the boundary is visually assigned to the outermost optical diffraction fringe, whereas the algorithm objectively defines it at the location of the maximum grayscale gradient. Because the pit-formation model is subsequently calibrated empirically, this geometric offset is fully incorporated into the calibration procedure and therefore does not affect the final energy reconstruction.
To further assess the uncertainty associated with manual measurements, the pits were independently analyzed by three researchers. The resulting mean pit sizes exhibited standard deviations of up to 9.4%, primarily due to subjective differences in boundary identification, particularly in regions containing overlapping pits.
In contrast, the automated algorithm is fully reproducible and eliminates the random variability inherent in manual measurements. Its high computational efficiency further enables rapid processing of large datasets, providing consistent and objective results without operator-dependent bias.
Subsequent analysis of ion characteristics is based on the pit-formation model with parameters in Eq. (1). These parameters are obtained by fitting the experimentally measured pit axes , described in Sec. III B, at different ion energies for a fixed angle of incidence. As a demon-
stration, a normally incident proton beam with energies from 0.3 to 7.4 MeV was characterized using CR-39 as detectors in the Thomson parabola spectrometer (Sec. II). Etching was performed for h with a bulk etch rate of m/h. The value of was determined from the mass loss of blank CR-39 samples etched for different durations and converted to an equivalent thickness removal using the detector surface area and material density. The REL along ion trajectories in CR-39 is simulated using the Geant4 Monte Carlo framework[25], as shown in Figure 7(a). The measured pit sizes are fitted using Eqs. (1)–(5), as shown in Figure 7(b), where the shaded regions represent measurement uncertainty. Data points above MeV are excluded from the fitting because the corresponding pit dimensions approach the diffraction limit of the optical microscopy system, resulting in systematic deviations in both the major and minor axes. These deviations can be mitigated by extending the etching time if necessary. The resulting fitted parameters, , have relative uncertainties below 0.2% and show good agreement between the pit-formation model and the measured pit openings. These parameters are independent of the etching duration, which can therefore be varied across different regions of interest while maintaining consistent calibration.

Figure 7. Calibration of the pit-formation model. (a) Restricted energy loss (REL) of protons with energies up to 8 MeV obtained from Geant4 simulations. (b) Fitting the relationship between the major and minor axes and the proton energy at a fixed incident angle. Data points corresponding to energies above 2 MeV are excluded from the fitting procedure due to diffraction effects at high energies, which introduce significant deviations in the measured pit openings.
With the etch-rate ratio derived from the REL data using Eq. (1), any initial ion property can be mapped to a corresponding pit structure under specified etching conditions. Figure 8 shows the relationship between ion energy, incidence angle, and the resulting major and minor pit axes. For an arbitrary measured pit shape , inverse mapping to the precomputed dataset yields candidate values that minimize the axis-length error within a user-defined tolerance. Ambiguities arise when multiple ion characteristics produce similar pit openings, which can occur in measurements involving multiple ion species or low-energy ions. These ambiguities result from dimensionality reduction and are inherent to two-dimensional imaging analyses. To mitigate this limitation, additional constraints based on the experimental configuration, such as placing filters in front of the CR-39 detectors, can be introduced to restrict the solution space. Alternatively, extended etching can be used to further separate pit features, provided that a precise scanning and positioning system is integrated with the optical microscope and the detection algorithm.

Figure 8. Proton energy and incident angle are reconstructed from the major and minor axes of the pit openings. This dataset can be extended to four dimensions by incorporating different etching durations, enabling an inverse mapping to retrieve the energy and angular distributions of the proton beam.
Conclusion
In summary, we have developed and validated an automated framework for CR-39 pit detection and ion spectral reconstruction using laser-driven ion acceleration experiments. The method combines a Hough-transform-based detection scheme with vectorized least-squares ellipse fitting to achieve precise measurements of the major and minor axes of individual pit openings from two-dimensional micrographs. The implementation supports efficient GPU acceleration and maintains robustness under high-yield conditions with substantial pit overlap. By coupling the extracted geometries with a pit-formation model based on Monte Carlo simulations of restricted energy loss, the ion energy and incidence angle are reconstructed directly from the measured data. Calibration using multi-MeV proton beams generated via the target-normal sheath acceleration mechanism establishes a quantitative mapping between pit geometry and reconstructed ion parameters. The proposed framework provides an efficient and scalable approach for high-precision ion-beam diagnostics, particularly in high-flux regimes where conventional analysis methods become unreliable. Future work will focus on extending the framework to multi-species discrimination, integrating automated microscopy with motorized stages for high-throughput analysis, and mitigating background artifacts from dust and surface defects through machine-learning-based techniques. The methodology can be extended to other solid-state track detectors and high-density particle imaging applications, offering a pathway toward automated, high-throughput diagnostics in laser-plasma experiments.
Supplementary Material
The detailed mathematical derivations of the pit-formation model and the ellipse-fitting framework are provided in the supplementary material.
Acknowledgments
This study was supported by the National Science and Technology Council in Taiwan (Grant Nos. NSTC 114-2119-M-008-007 and 113-2112-M-008-030-MY2).
Author Declarations
Conflict of Interest
The authors have no conflicts to disclose.
Author Contributions
Wei Lin: Conceptualization (equal); Data curation (equal); Formal analysis (equal); Methodology (equal); Project administration (equal); Software (equal); Writing – original draft (equal); Writing – review & editing (equal). Tzu-Yao Huang: Conceptualization (equal); Data curation (equal); Formal analysis (equal); Methodology (equal); Project administration (equal); Validation (equal). Shih-Fan Yang: Data curation (supporting); Formal analysis (supporting); Methodology (supporting); Project administration (supporting). Shih-Wei Wang: Data curation (supporting); Formal analysis (supporting); Project administration (supporting); Validation (supporting). Wu-Cheng Chiang: Data curation (supporting); Methodology (supporting); Project administration (supporting); Software (supporting). Kuo-Yu Hsiao: Data curation (supporting); Project administration (supporting). Chun-Han Chen: Data curation (supporting); Formal analysis (supporting); Methodology (supporting). Yan-Syu Liu: Data curation (supporting); Project administration (supporting). JunYi Chen: Data curation (supporting); Project administration (supporting). Ya-Po Yang: Investigation (supporting); Project administration (supporting); Resources (supporting). Chen-Kang Huang: Conceptualization (supporting); Investigation (supporting); Project administration (supporting); Validation (supporting); Writing – original draft (supporting). Hsu-hsin Chu: Conceptualization (supporting); Funding acquisition (supporting); Methodology (supporting); Project administration (supporting); Resources (supporting); Supervision (supporting). Chih-Hao Pai: Conceptualization (equal); Formal analysis (equal); Funding acquisition (equal); Investigation (equal); Methodology (equal); Project administration (equal); Resources (equal); Software (equal); Supervision (equal); Validation (equal); Visualization (equal); Writing – original draft (equal); Writing – review & editing (equal).
DATA AVAILABILITY
The data that support the findings of this study are available from the corresponding author upon reasonable request.
References
- [1]B. G. Cartwright, E. Shirk, and P. Price, Nuclear Instruments and Methods 153, 457 (1978).
- [2]R. L. Fleischer, P. B. Price, and R. M. Walker, Nuclear tracks in solids: principles and applications (Univ of California Press, 2022).
- [3]S. A. Durrani and R. K. Bull, Solid state nuclear track detection: principles, methods and applications, Vol. 111 (Elsevier, 2013).
- [4]S. Kodaira, H. Kitamura, M. Kurano, H. Kawashima, and E. R. Benton, Scientific Reports 9, 3708 (2019).
- [5]F. Castillo, G. Espinosa, J. Golzarri, D. Osorio, J. Rangel, P. Reyes, and J. Herrera, Radiation Measurements 50, 71 (2013).
- [6]P. K. Singh, P. Varmazyar, B. Nagy, J.-G. Son, S. Ter-Avetisyan, and K. Osway, Scientific Reports 12, 8100 (2022).
- [7]Y. Shou, X. Wu, K. H. Pae, G.-E. Ahn, S. Y. Kim, S. H. Kim, J. W. Yoon, J. H. Sung, S. K. Lee, Z. Gong, et al., Nature Communications 16, 1487 (2025).
- [8]L. Giuffrida, F. Belloni, D. Margarone, G. Petringa, G. Milluzzo, V. Scuderi, A. Velyhan, M. Rosinski, A. Picciotto, M. Kucharik, et al., Physical Review E 101, 013204 (2020).
- [9]J. Bonvalet, P. Nicolai, D. Raffestin, E. D’humieres, D. Batani, V. Tikhonchuk, V. Kantarelov, L. Giuffrida, M. Tosca, G. Korn, et al., Physical Review E 103, 053202 (2021).
- [10]R. Fleischer, P. Price, R. Walker, and E. Hubbard, Physical Review 156, 353 (1967).
- [11]E. Benton, Radiation Effects 2, 273 (1970).
- [12]G. Somogyi, Nuclear Instruments and Methods 173, 21 (1980).
- [13]R. L. Fleischer and P. Price, Journal of Geophysical Research 69, 331 (1964).
- [14]G. Somogyi and S. Szalay, Nuclear Instruments and Methods 109, 211 (1973).
- [15]A. Fews, Nuclear Instruments and Methods in Physics Research Section B: Beam Interactions with Materials and Atoms 71, 465 (1992).
- [16]M. Seimetz, P. Bellido, P. García, P. Mur, A. Iborra, A. Soriano, T. Hülber, J. García López, M. d. C. Jiménez-Ramos, R. Lera, et al., Review of Scientific Instruments 89 (2018).
- [17]F. Vaginay, M. Fromm, D. Pusset, G. Meesen, A. Chambaudet, and A. Pof-fijn, Radiation measurements 34, 123 (2001).
- [18]B. Lahmann, M. Gatu Johnson, J. Frenje, Y. Y. Glebov, H. Rinderknecht, F. Séguin, G. Sutcliffe, and R. Petrasso, Review of Scientific Instruments 91 (2020).
- [19]T.-S. Hung, C.-H. Yang, J. Wang, S. yuan Chen, J.-Y. Lin, and H. hsin Chu, Appl. Phys. B 117, 1189 (2014).
- [20]T. A. S. Ltd, “Tasl image™ systems,” https://www.tasl.co.uk/tasl-image-php, accessed: 2025-04-29.
- [21]N. Otsu, Automatica 11, 23 (1975).
- [22]J. E. Bresenham, in Seminal graphics: pioneering efforts that shaped the field (1998) pp. 1–6.
- [23]P. V. Hough, “Method and means for recognizing complex patterns,” (1962), US Patent 3,069,654.
- [24]A. Fitzgibbon, M. Pilu, and R. B. Fisher, IEEE Transactions on pattern analysis and machine intelligence 21, 476 (1999).
- [25]S. Agostinelli, J. Allison, K. a. Amako, J. Apostolakis, H. Araujo, P. Arce, M. Asai, D. Axen, S. Banerjee, G. Barrand, et al., Nuclear instruments and methods in physics research section A: Accelerators, Spectrometers, and Associated Equipment 506, 250 (2003).
AI tools statement
No AI-use declaration is available for this version in Valency.
The available record does not establish whether AI systems or models contributed to this work.