2.3.4. Holder Recipe

In the Holder recipe the size and shape of both the sample holder and of the individual stubs can be defined and adjusted. First the size and shape of holder are defined (holder set-up), afterward the size and shapes of the individual stubs (stub setup). The recipe lists a number of standard sample holders, but own holders can be defined as well (Figure S2). In the stub details part of the menu, the geometrical parameters for the analysis of each particle can be defined: Z-coordinate of the stage, magnification during the analysis, step size for the mapping of the sample, and the area or areas in the sample that are analysed (Figure S2).

## 2.3.5. Calibration Recipe

Both the BSE brightness and the EDS peak position can be monitored and corrected during larger mapping sessions. The BSE brightness is regulated using a standard with a bright- and a dark phase next to each other, e.g., a copper–aluminium stub. The brightness of the BSE image is set such that the bright phase in the standard (e.g., copper) has grey-values in the upper grey-level segment, but is not completely white, while the dark phase (e.g., aluminium) has grey values in the dark-grey segment. The interval for monitoring can be selected, e.g., every hour and for every new sample. At each monitoring event, the SEM resets the brightness and contrast values of the SEM to match the predefined values for the bright and dark phase in the standard (Figure S3).

The EDS peak position can be monitored by regularly measuring suitable EDS peak, typically Cu K α, for the beam energy settings chosen for the analysis.

#### 2.3.6. Image Processing Recipe

Mineralogic analyses are typically performed overlying a BSE image, but other types of images based on electron microscope detector input, like secondary electrons or cathodoluminescence (CL) signal can be applied too, where required. The image can be thresholded to only include certain grey levels for the forthcoming Mineralogic analysis, e.g., with the aim only to investigate the brightest phases in the sample, or to exclude epoxy and porosity from the analysis. The quality of the image can be improved with a large number of image processing techniques like arithmetic functions (e.g., addition, substraction, inversion), logical operations (e.g., image AND image, image OR constant), convolution and filters (e.g., median filter, sharpening, edge detection), histogram and threshold operations, morphological operations (e.g., dilation, opening, hole fill, skeletonize), segmentation and region based operations (e.g., watershed) or geometric and linear transformations (e.g., downsize with a power of two).

The image processing recipe tap can also be applied on pre-set functions like the search for bright phases in the sample (Figure S4), which can be applied to find suitable zircon or monazite minerals for isotope dating or certain ore minerals). Here, the BSE signal is thresholded to only find the brightest particles in a large sample and to store their chemistry and coordinates.
