Automatic workflow setup for data acquisition in the FIB-SEM (Multisite). (a) Flow diagram of the algorithm used before each target cell is acquired. The boxed part (dotted line) indicates instructions belonging to the coincidence point (CP) calculation. “WD” refers to Working Distance (distance to the focused object on the z-axis). “Grab” refers to commanding the microscope to acquire an image of the surface of the sample. (x, y) indicates that the action takes place in respective stage coordinates in the x, y-axis. “dz” is the difference in z position, SEM x, SEM y—stage position coordinates x and y using the SEM detector. FIB x, FIB y stage position coordinates x and y using the FIB detector. In both cases, pixel coordinates from the image are translated to stage position coordinates given by the center position of the image. Upon completion, when a stored map of landmarks is present (there are surrounding grid bar crossings to the cell target), the closest 8 landmarks are used to compute a local transformation that will re-estimate the cell position with higher accuracy. (b) Flow diagram of the algorithm used for Milling & Trench Detection. Numbers (1), (2), and (3) correspond with images (1), (2), and (3) in Fig. 3 b. After the trench is milled, a quick routine examines if the B&C (brightness and contrast) is good enough to differentiate the trench from the background. If not, the user is prompted to adjust the B&C until the trench is visible. Since simple thresholding is usually not enough, the detection of the trench is repeated on the new image using a three-level thresholding algorithm after a slight blur. This algorithm is fast and identifies and groups pixels as belonging to three categories. The darkest category is usually the trench. The thresholded object is then identified if its geometry has a trapezoidal shape, to differentiate it from other confounding objects. If several trapezoids are present (from previous acquisitions), the closest to the center is taken as a reference. In the trapezoid, the top center position can be used as a reference to focus the FOV (field of view). (c) Flowchart of the routine used for setting the conditions before the acquisition, after (b). In the automation routine, the user must decide the brightness and contrast (B&C) of the sample only for the first cell acquired (n = 1). Values of B&C will be stored for future acquisitions. After choosing an optimal B&C, the goal is to start with a crisp image with a good focus and stigmatism set of values. The core AFAS routine is provided by ZEISS Atlas 5 software and is triggered in a reduced window from the full field of view (FOV) at different magnifications, from lower to higher. At each magnification, high complexity regions are found to be the center of the window where the AFAS is applied. If this routine fails to find a good focus before starting to acquire, which could happen in exceptionally damaged samples, the user is prompted to focus manually and the values of focus are taken as reference for the next acquisition.