Piers Larkman*ab,
Sebastiano Vascona,
Martin Šala
c,
Nicolas Stoll
ad,
Carlo Barbante
ae and
Pascal Bohleberabf
aDepartment of Environmental Sciences, Informatics and Statistics, Ca'Foscari University of Venice, Venice, Italy. E-mail: piersmichael.larkman@unive.it
bDepartment of Geosciences, Alfred Wegener Institute Helmholtz Centre for Polar and Marine Research, Bremerhaven, Germany
cDepartment of Analytical Chemistry, National Institute of Chemistry, Ljubljana, Slovenia
dDepartment of Earth and Space Science, University of Washington, Seattle, USA
eInstitute of Polar Sciences, National Research Council (CNR-ISP), Venice Mestre, Italy
fGoethe University Frankfurt am Main, Frankfurt am Main, Germany
First published on 19th June 2025
Recent advances in high-repetition-rate lasers and fast aerosol transfer facilitate laser ablation inductively coupled plasma mass spectrometry (LA-ICP-MS) mapping rates of up to megapixels per hour, however, practical limits in time and resources still hamper mapping the chemistry of square centimetre or larger areas of target samples at high resolutions. This is especially relevant for the analysis of deep sections of polar ice cores, motivating exploration of approaches to improve the efficiency of LA-ICP-MS data collection for large-area mapping. Assisted by computer vision, and demonstrated on glass and ice samples, we show how an informed experimental design coupled with computational post processing can contribute to large reductions in measurement times and lead to associated increases in measurement areas. Using various inpainting techniques, we demonstrate how the collection of data can be reduced by up to two thirds while still capturing spatial variability. Although motivated by ice core analysis, these approaches are generalisable to other target matrices and represent a new approach to large-area LA-ICP-MS mapping.
Applied to approximate missing data in several fields, inpainting approaches that fill in damaged or missing parts of an image,7,8 represent a potential approach to facilitate large area measurements using LA-ICP-MS. There are many inpainting techniques, with both traditional9 and deep learning10 approaches implemented and refined. Viewing LA-ICP-MS spectral data as an elemental or chemical image motivates experiments that collect sparse data using LA-ICP-MS and subsequent approximation of missing regions using inpainting techniques. Such experimental design removes the requirement to fully measure an area, thus facilitating faster mapping of larger areas, but is yet to be tested.
A practical application that can benefit from increased measurement efficiency using such approaches is the mapping of ice core samples using LA-ICP-MS. Current ice core drilling efforts target the acquisition of old ice samples, of approximately 1.5 million years old, from the bottom of the Antarctic ice sheet.11 The deepest samples, amounting to hundreds of metres of ice with more than 10000 years of climate history contained per vertical metre,12 will require high-resolution spatial analysis for thorough interpretation of climate information.13 Application of LA-ICP-MS to measure elemental impurities in polar ice core samples has returned spatial information at to-date unmatched micrometre resolutions.13–15 Such resolutions will be crucial for collecting and interpreting the wealth of paleoclimate data16 contained in deep ice samples, particularly as 2D mapping, over collection of 1D parallel lines along the down-core axis, is vital for properly interpreting preserved signals.17–20 Therefore, LA-ICP-MS measurements on ice must be routinely sped up to gather and manage the large volume of high-resolution data needed to interpret climate signals from deep ice samples best.
The utility of computer vision techniques for analysis of chemical and optical data collected on ice core samples has been previously demonstrated.21,22 Interpolation of chemical LA-ICP-MS data has been carried out to fill in gaps in data collected at resolutions of hundreds-of-microns23 and the ice grain boundary (GB) network has been automatically masked from optical data.22 To demonstrate a further application of computer vision techniques to ice core data, and to aid LA-ICP-MS analysis, modern inpainting techniques can be applied as a postprocessing step. Given that GBs are visible in optical images and the dominant localisation of soluble chemistry at GBs, optical data can be a further useful reference for such analysis.
Here we demonstrate how carefully designed experimental LA-ICP-MS data collection, collecting sparse spectral data instead of full maps, can reduce measurement times, without compromising the extent of the surface area mapped, or the mapping resolution. Data is deliberately under-sampled during measurement and both traditional and machine learning inpainting approaches are applied to approximate the missing data. We utilise a murrina glass sample (Murano, Italy), which are often used to demonstrate developments to LA-ICP-MS measurement procedures due to regions showing well-understood variation in elemental concentrations,24,25 as a proof of concept application. Building on this demonstrative case, this novel approach of sparse measurement and subsequent inpainting is applied to ice core samples to show an example of practical use. We first validate the performance of the inpainting approaches before presenting data collected and processed using this novel approach. The utility of optical data, which can be rapidly collected and often shows variability which correlates with regions of variable chemistry, to guide inpainting reconstructions is also demonstrated.
We apply four inpainting approaches to approximate missing data in chemical maps. Two inpainting approaches, one channel Telea (1C Telea) and one channel neural network (1C NN), operate solely on the spectral data, and are referred to as one-channel approaches. Where available, additional data can be used to guide inpainting. To demonstrate this approach, two more inpainters are presented that use an additional optical data channel to give the inpainting algorithms additional context. These two-channel approaches, two channel mean replacement (2C MR) and two channel neural network (2C NN), exploit the harmony between optical and spectral data by conditioning the inpainting on a binary mask separating regions based on optical data. Two methods, 1C Telea and 2C MR, utilise traditional inpainting methods, while the other two, 1C NN and 2C NN, use a simple neural network architecture trained on an experimentally acquired dataset. While demonstrated on glass and ice core samples, these approaches can be extended to other matrices measured using LA-ICP-MS.
![]() | (1) |
TT = TM + TR, | (2) |
TR = Tr(N − 1). | (3) |
Using the expression for TR from eqn (3) and TM from eqn (1) in eqn (2) gives the expression:
![]() | (4) |
To reduce this measurement time, rows can be left out of the traditional sampling pattern, as illustrated in Fig. 2(b), reducing the information density (ID) of the measured area. An ID of 1 represents a fully mapped area, while an ID 0 represents a wholly unmeasured area. In the limit where the number of measured rows remains large (where ), the total measurement time can be approximated as:
![]() | (5) |
Glass data were collected on two separate days. Multiple 2D impurity maps, with full chemical maps with an ID of 1, and sparse maps with IDs of less than 1, of mm-sized areas on the sample's surface collected with a laser spot size of 10 μm. We used a firing rate of 500 Hz, dosage of 10, and a fluence of 4 J cm−2. Optical mosaics of each measured area were taken using the integrated optical camera, which is co-axial with the laser system.
The system at UNIVE consists of an Analyte Excite ArF excimer 193 nm laser (Teledyne CETAC Photon Machines) connected via an ARIS rapid aerosol transfer line to an iCAP-RQ ICP-MS (Thermo Scientific). Samples were hosted in a HelEx II two-volume ablation chamber on a cryo-stage capable of maintaining the solid state of samples during analysis. This setup required samples to be prepared with approximately 1 cm thickness, with varying widths of 2 cm and below, and length not exceeding 9 cm.
Measured 2D impurity maps of square millimetre size were acquired with a spot size of 20 or 40 μm, firing rates of between 200 and 300 Hz, dosages of 9 or 10 (adjusted to synchronise material sampling with the ICP-MS measurement cycle), and fluences of between 3 and 4.5 J cm−2. As some spectral measurements on ice samples were collected with a 20 μm laser spot and others with a 40 μm laser spot, the higher resolution data were downsampled to 40 μm. Given its archetype as a soluble-in-ice elemental species we primarily focus on Na (m/z 23) in this study, although other elements were also recorded.
In contrast to most ice measurements being carried out using the UNIVE system, an exemplary application dataset was collected using the system at AWI, with a spot size of 40 μm. Cryo components were integrated into this system26 to ensure the sample remained frozen during measurement. This data set comprises a full chemical map, with adjacent regions collected with IDs of less than 1.
The murrina sample has visible variability in the optical data allowing a binary mask separating adjacent regions to be hand-traced. Similarly, ice sample optical data show dark lines identified as GBs, which are hand-traced to produce a binary mask isolating the GB network from the grain interiors. These segmentations are downsampled to the same resolution as the chemcial maps, 10 μm for glass, and 40 μm for ice. Joining the chemistry channel and downsampled optical segmentation gives a combined two-channelled image.
The second applied inpainting method, 2C MR, is a custom-implemented approach based on the Telea algorithm that also incorporates optical data alongside spectral data. The added mask channel allows the classification of pixels into two distinct regions. In the case of the murrina samples, adjacent optically distinct regions are classified separately, while for ice samples regions are classified as either GB or grain interior. During inpainting, a target pixel is replaced by the mean of neighbourhood pixels with the same categorisation as itself. Unlike the 1C Telea approach, no iterative operation from outside the region inwards is implemented. To manage situations where no pixels of the same category are adjacent to a target pixel, the neighbourhood size increases with decreasing ID.
During application, data with ID of less than one, either experimentally acquired or artificially masked from full chemical maps, are inpainted in patches of 64 by 64 pixels. These patches are re-arranged to the original full maps to form the final output. To avoid artifacts at the edge of patches after reconstruction, patches are generated with small overlaps and reconstructed intensities in edge regions are averaged. Analogue to the processing applied to empirically collected data, the output of the NN has pixels with values less than zero set to zero. The NNs output an inpainted image with an ID of 1, with every row in the image approximated by the network. This image subsequently has the input data (ID < 1) overlaid to form the final output of the NN approaches, a hybrid of the measured and approximated rows.
Two NNs, one for 1C NN and one for 2C NN, are separately trained a train in data set, with four networks trained in total, two on glass reference data and two on ice reference data. This learning uses supervised training. To produce a training dataset, chemical maps were masked to generate data with IDs between 0.2, representing the case where every 5th row is measured, and 0.8, representing data where every 5th row is omitted from measurement. The masked chemical maps and their corresponding optical masks are split into 64 by 64-pixel square patches and fed in batches of 32 as reference examples to the NNs during training. These patches cover the entire measured area and have some overlap to allow a larger training set to be produced.
To quantify a network's performance, the difference between the output chemical map generated by the NN and the ground truth chemical map is considered. The difference between the images is calculated as their pixel-wise mean squared error (MSE) across the whole image area, which is used as the reconstruction loss function the network attempts to minimise. Network weights are iteratively adjusted based on this loss, and, therefore, the network learns to minimise the pixel-by-pixel variance between the ground truth patches and its output patches.
To demonstrate an application of inpainting, experimental datasets comprised of full optical data and sparse chemical maps are collected. These chemical maps are then inpainted using all four described inpainting methods. Given the nature of these data as true applications of the method, there is no ground truth chemical map to assess their performance against.
For ice core samples, the dataset isolated for validation is a full optical image and chemical map collected from an EDC ice sample from 1096.7 m depth, and is shown in Fig. 4. All ice sample data had grain boundary masks, such as that shown in Fig. 4(f), traced by hand using a digital tablet and image editing software to produce a binary mask, taking approximately 1 minute for a square millimetre. The ice application dataset was collected from an ice sample which originated from a depth of 1096.7 m in the EDC core.
Similarly, the inpainting techniques were applied to the validation ice data, a spatial subset of which is shown in Fig. 4(d), as illustrated in Fig. 6. There are visual differences between the outputs. Comparison between Fig. 4(d) and Fig. 6 shows the input and output are visually more similar for data inpainted with higher ID for all approaches. The large bright spots are good performance indicators, with less well-performing cases showing these regions smudged into their surroundings. The high intensity of grain boundaries bleeds into the grain interiors for the 1C Telea approach at all input densities. This effect is constrained by the added optical information provided to 2C MR. Both NN approaches produce visually smoother outputs than traditional approaches, with fewer missing intensity regions.
![]() | ||
Fig. 6 Illustration of the validation of inpainting performance on the ice core sample from the EDC core, depth 1096.7 m. The masked chemical data, taken from an expanded area of the plot shown in Fig. 4(d), for three different IDs is shown in the top row. Subsequent rows show the inpainted outputs for each of the four implemented inpainting algorithms. The scale bar in the top left applies to all panels. |
For both glass and ice samples, the performance of each inpainting approach is quantified in Fig. 7 with the MSE between the inpainted regions and corresponding regions in the ground truth chemical map plotted for each approach. This plot contains the cases shown in Fig. 5 and 6, alongside results for other un-visualised IDs. The different absolute MSE values are not comparable between applications to glass and ice, as different elemental concentrations, and therefore instrumental intensities, are expected between the materials.
![]() | ||
Fig. 7 Plot of the performance validation of (a) glass and (b) ice for all inpainting techniques showing the MSE against input ID. The assessment is carried out by inpainting masked data generated from the chemcial maps in Fig. 4(a) for glass, and (d) for ice. Input data and inpainting outputs for IDs of 0.2, 0.5, and 0.8 are shown in Fig. 5 and 6. The difference in y-axis scale between the panels arises from different numbers of counts in measured maps arising from differences in sample properties. |
The general trend in Fig. 7 is that MSE values increase with decreasing ID, showing less faithful reconstructions of the ground truth. Small deviations from this trend are seen in cases where critical information is missing from obscured maps. When applied to glass, the traditional approaches perform the best above an ID of 0.6, below which the neural networks perform the best. The two channel approaches generally perfom similarly to their respective traditional/NN counterparts for all input IDs.
For ice, the neural network inpainters perform consistently well, with better performances than the traditional approaches across the entire range of information densities. 2C MR generally out performs its one channel counterpart, 1C Telea across all IDs while there is a similar performance for the neural network inpainters.
![]() | ||
Fig. 8 Chemical maps superimposed on top of optical data collected from the murrina sample. Spectral data is measured at a range of IDs (a), and the 2C NN used to restore the regions to approximated full images (b). Results for the 1C NN, 2C MR, and 1C Telea inpainting methods are contained in the ESI.† The ID for each rectangular region is indicated in the upper left of the region, the region collected with ID = 1 is shown for reference and is not inpainted. The spatial scale bar is applicable across both panels. |
The example data for the ice sample is shown in Fig. 9, with sparse data shown in (a) and the output of the inpainting approach 2C MR shown in (b) and 2C NN in (c). The inpainting results from the 0.5 ID input is, visually, significantly better than for the 0.33 ID input, with boundary intensities much more continuously populated. The 2C MR approach appears to reproduce intensities along horizontal boundaries better than vertical boundaries, with 2C NN showing the opposite trend.
![]() | ||
Fig. 9 Chemical maps superimposed on top of optical data collected from an ice sample collected from EDC at a depth of 1096.7 m (a). Spectral data is measured at IDs of 1, 0.5, and 0.33 (a), and the 2C MR (b) and 2C NN (c) methods used to restore the regions to approximated full images. Results for the 1C NN and 1C Telea inpainting methods are contained in the ESI.† The ID for each rectangular region is indicated in the upper left of the region, the region collected with ID = 1 is shown for reference and is not inpainted. The chemical plot in the ID 1 region in (a) is transparent to allow some visibility of optical data behind. The spatial scale bar in the top left is applicable across the whole figure. |
For both glass and ice samples, the chemical maps collected have approximately hundreds of pixels in each dimension, making patch sizes of 64 by 64 suitable for use in the NNs. The suggested data collection scheme of leaving out evenly spaced rows during measurements is easily implemented on both LA-ICP-MS systems used, with examples of the output of such experiments shown in the application datasets in Fig. 8 and 9(a).
Deeper learning architectures, including those using layers to reduce image size, u-net-like cross connections, and implementations of bottlenecks, were tested but resulted in worse network performance. This is likely due to the relatively small training dataset these models are trained on, and the small size of patches the network operates on. Small training datasets can lead to overfitting of complex NN architectures, leading to good performance on training data but bad generalisation to application data. As the training dataset is very small for the glass NNs the network will likely generalise worse than the ice NNs. As only one murrina with a relatively simple chemical distribution was measured for this study generalisation is less important than for the application to ice. In the case of ice, the networks were trained on data collected from a relatively large number of samples. This dataset can be added to in the future, furthering the generalised performance of such networks. Increasing training dataset size could allow more complex networks to be trained, for example those using skip connections in a u-net like architecture allow features to be preserved between network layers. Such architectures may also benefit from increasing the patch size to larger than 64 by 64 pixels to include more contextual information in each patch. The option to utilise more complex network architectures in the future motivates collection of larger datasets, with both an increased number of example maps and of the dimensions of each map.
The NNs’ training curves (shown in the ESI†) for the networks trained on ice data, show suitable training behaviour with an expected decrease in loss, followed by a convergence to stable performance. The flattening of the curves and reduction in oscillation after epoch 20 can be explained by the corresponding reduction in learning rate.
All approaches show good performance for IDs above 0.5 on glass and 0.33 on ice, as quantified in Fig. 7. This suggests that in cases where only small amounts of data require inpainting, for example, where small regions are corrupted or otherwise missing, all approaches can be used. As both 1C Telea and 2C MR do not need a training dataset they can be applied to data immediately they are well positioned for such reconstructions. These approaches can be applied in cases where detector saturation or other instrumental factors (such as temporary loss of instrument connection, stage tripping, or lack of focus) lead to small missing areas of data, which can be quickly and reliably approximated using traditional inpainting approaches.
For IDs below 0.5, the NNs perform best on glass, while they perform consistently the best on ice across all information densities. This places these approaches well for experiments where data is deliberately under-sampled and subsequently reconstructed. Collecting data at an ID of 0.5 represents an immediate saving of 50% of the laser shots used to fully map an area, with very little extra post-processing burden or reduction in output quality. The nature of these approaches as interpolations must be considered when interpreting inpainted maps. At the micro-scale, these approaches can not precisely insert features in unmeasured regions but do provide suitable impressions of larger-scale variability.
Added optical information can improve the performance of inpainters, with the 2C MR approach generally performing better than 1C Telea on ice. Visual inspection of inpainted outputs shows that 2C MR is sensitive to offsets in registration between the mask and chemical map. These offsets are often unavoidable due to differences between the optical and chemical data. For example, the ice GB mask can be slightly spatially offset from the spectral data, and the chemical width of grain boundaries is not identical to their optical or physical width. Therefore, two-channel methods resilient to offsets between the spectral data and GB masks, such as 2C NN which does not show such rigidity, are practical.
Exploration of further performance metrics reveal similar trends. A metric that considers structural, intensity, and contrast differences between images is the structural similarity index (SSIM).34 Previously explored when optimising 2D maps collected using LA-ICP-MS,35 this metric varies between −1 and 1, where two images with a SSIM of near to 1 are similar. Plots equivalent to those in Fig. 7 but showing SSIM are contained in the ESI,† and reveal similar strong performance of the NN approaches on ice samples. This metric also places 2C MR consistently higher performing than 1C Telea on ice across all IDs when tested on the ice validation sample.
Where better performances, as quantified by either MSE or SSIM are required, or different matrices that do not train well with this network structure are analysed, other approaches to inpainting may prove suitable. For example, generative approaches can be used to provide an adversarial loss alongside the reconstruction loss31 while masked autoencoders36 and diffusion models37 are also used for similar tasks. Where possible, using larger training datasets, potentially utilising transfer learning to fine-tune pre-trained networks, and/or using larger patch sizes may also return better generalisation.
Where computational power is important, after initial training of the NN approaches, the time taken for all algorithms except the 2C MR to run at is comparably fast. On a standard laptop computer, the ice validation data shown in Fig. 6 takes on the order of 0.1 seconds to inpaint using the 1C Telea, 1C NN, and 2C MR approaches. At low IDs, the 2C MR takes a significantly longer time to run (on the order of 1 second) due to crudely implemented requirements to increase the neighbourhood size to find nearby classified pixels drastically. This time-based performance motivates the use of the NN approaches and 1C Telea. The speed of 2C MR could be improved by developing a new method to utilise a Telea-like algorithm, incorporating fast inpainting while considering the boundary and interior regions separately.
The potential for enhanced performance for inpainting approaches using optical data demonstrates the utility of such for studies of soluble chemistry in ice core research. Thus, it should be exploited where possible. Since optical data are already used for localisation studies via LA-ICP-MS,38 implementing an approach to collecting higher-quality, and therefore easily machine-segmentable, optical images co-axial with LA-ICP-MS data is of interest. Indicative early experiments, briefly described in the ESI,† on higher-quality optical data which shows GB and grain interior regions at higher contrast a high likelihood that automatic segmentation can be applied to such data using a purpose-trained segmentation u-net.
In the case of ice, there is a demand to analyse centimetre-square ice samples to investigate the paleoclimate. Such analyses require the collection of representative chemical data from hundreds of metres of ice. Achieving such an objective requires industrial-style high-throughput rates of measurement of ice samples if LA-ICP-MS is to be applied. The results shown in Fig. 9 motivates a hybrid approach to such measurements, using full-area mapping for both localisation studies and provide a training dataset for inpainting NN, coupled with sparse data collection and subsequent inpainting to cover large areas. This approach can be useful for applications covering large scales where further data processing will take place, such as paleoclimate signal acquisition through combination of parallel profiles.20 Averaging inpainted areas may produce more accurate palaeoclimate reconstructions than non-inpainted data, but this process is yet to be verified.
An example case to demonstrate how TT in eqn (5) changes based on variations in spot size and ID can be established by considering measurements over a square-shaped surface of 1 cm2. For a typical uni-directional area scan, Tr can be estimated by setting up measurements in the software used to design laser ablation scans and recording the projected measurement time. For the setup at AWI the software gives a Tr of approximately 3.5 s for each profile in this target geometry. Considering a typical dosage of n = 10 and a repetition rate of 500 Hz, eqn (5) can be used to calculate TT under different experimental conditions, the results of which are shown in Fig. 10.
![]() | ||
Fig. 10 Visualisation of the time taken to measure a square-shaped area under different experimental conditions. Measurement time is calculated using eqn (5), with A, n, RR, and Tr set to constant values of, 1 cm2, 10, 500 Hz, and 3.5 s, respectively. ID and BS are varied, and N is set to the number of profiles required to cover the area based on the spot size. Note the time axis is on a logarithmic scale, with the colour map and z axis representing the same information. |
The surface plotted in Fig. 10 can be used to identify the spot size and ID required to achieve a target analysis time. Exploring such a parameter space allows an optimisation between measurement time, resolution, and ID to be determined. However, the plotted parameter space represents a simplification of the relationships established in eqn (5). This equation can be further explored to understand how measurement times can be reduced. For example, RR is often changed based on BS, while Tr is dependent on the geometry of the measured area and can be considered negligible in the case of a bi-directional raster scan. Experiments are best designed while considering this entire parameter space, and the addition of ID as a parameter is intended to add a further consideration to experimental design decisions.
Interpolation approaches such as image inpainting are applied across scale and dimension. Inpainting is not restricted to the choice of spot size discussed in this analysis, with 10 μm chosen for glass and 40 μm for ice samples to match the specific application of LA-ICP-MS to these samples. These spatial scales can be adjusted based on the specific target application and matrix. Furthermore, given that the 3D manifestation of chemistry is important to understanding material composition and behaviour, such approaches could also be extended to facilitate 3D analysis. LA-ICP-MS has already proved a suitable method for collecting planes of spectral data from a 3D object.39 Gaps between adjacent layers collected during such analysis could be filled using similar inpainting techniques.
The range of analysed spectral channels can be extended and inpainting applied to calibrated data. The ESI† for this manuscript shows the results of training and applying the 2C NN inpainter to the m/z = 146 (Nd) and m/z = 23 (Na) channels measured on the murrina glass sample. In such cases where multiple chemistry channels are analysed, NN architecture could be adjusted to simultaneously inpaint all spectral channels simultaneously, with the extra information potentially aiding inpainting performance. Dimensionality reduction on groups of ICP-MS mass channel outputs could allow discussions of multiple channels at once. In the case of ice core analysis, a representative boundary localised channel could be isolated and discussed, rather than discussing channels individually. Although elements dispersed away from grain boundaries in ice samples shows less obvious spatial distributions, similar discussions are likely extendable to consider these components.
General image analysis toolsets can be shared and enhanced by considering different matrices and analytical techniques. Studies on biological samples, which can share similar structures to ice, are analysed using dedicated image analysis approaches which can be applied to other matrices.40 Furthermore, the chemistry of samples is often closely linked to patterns in other measured data, with optical and backscattered electron images having been used as reference points for LA-ICP-MS.38,41 Correlations between these data types can be exploited to propagate information about the chemistry into unmeasured regions, similarly to how the two channel inpainting approaches presented in this study utilise optical data to guide their inpainting.
Footnote |
† Electronic supplementary information (ESI) available. See DOI: https://doi.org/10.1039/d5an00325c |
This journal is © The Royal Society of Chemistry 2025 |