Improvement of the efficient referencing and sample positioning system for micro focused synchrotron X-ray techniques

An efficient referencing and sample positioning system is a basic tool for a micro focus beamline at a synchrotron. The seven years ago introduced command line based system was upgraded at SUL-X beamline at ANKA [1]. A new combination of current server client techniques offers direct control and facilitates unexperienced users the handling of this frequently used tool.


Motivation
Experiments performed using a micro focus beamline at synchrotrons offer a set of methods to investigate small sized regions on samples. The beam sizes are normally much less than a square millimeter. But mounting conditions, multiple samples on a single mounting device or limited options for the sample preparation lead to much larger sample areas on which the region of interest (ROI) for micro focus experiments must be located. Typically the ROI represents a region much smaller in size (2-3 orders on magnitude) compared to the entire sample.
The localization on large samples becomes crucial for saving preparation-and experiment time. It becomes essential if the same sample is investigated with different experimental setups or methods and each method should be applied on the same ROI.
Furthermore the experimental setup of sample, detectors, supporting equipment, remote access, and synchrotron radiation limits the applicable options for aligning the sample.

Current solution
At ANKA's SUL-X beamline a sample positioning system has been implemented that turned out as an essential tool for setting up the experiments. The transportable sample mount, shown in figure 1, was designed with an extension of about 90mm x 60mm and offers approximately 6 orders larger sample area than a typical beam size (~100 to 30µm) of a micro focus experiment at this experimental station. An offline localization of ROIs with a wide zoom optical microscope (Zeiss Axio Imager.Z1m) is used as a first orientation on the sample. Four reference marks on the outermost edges of a sample mount are always included into the set of coordinates. 1 To whom any correspondence should be addressed. The prepared sample mount is inserted to the experimental stage and the reference marks are localized. Based on these data the ROIs are transformed into the experiment coordinate system. This was done solely by a command line (CL) interface and a standalone image visualization. The solution is stable and saves experiment time. Crucial to that CL based method were the training curve of unexperienced users and the finding of the right focus position.

User and focus problematic
The experimental setup forces the user to deal with a Windows based proprietary software for the offline characterization and a CL interface for aligning the sample at the experimental station. Despite the reduced and partially automated options of the SPEC [2] CL interface it still introduces a high threshold for unexperienced users.
An optical microscope with cross hair is used for the offline sample preparation as well as for the experiment position control (custom product, IEEE1394 camera with 1392x1032 pixel). In two dimensions a position is marked reliably in a range of a micron (see figure 2). The third dimension is indicated by the focus position. The focus indicators are the observed image and the evaluation of the image sharpness influenced by not quantifiable factors such as illumination or region selection. An estimation is around ±10µm correctness for that dimension for a flat sample. If the sample roughness is increased the uncertainty for that dimension increases, especially for unexperienced users. In figure 2 the problematic is illustrated with a test sample. The normally used 45° geometry between beam and sample surface leads to a mismatch of the optically selected region (crosshair) and the by X-rays investigated region. Figure 3 shows this in a sketch. The focus distance mismatch is in this geometry equal to the location mismatch of the X-ray exposed sample region. In case of a micro focus experiment and the assumed uncertainty the two regions might not overlap at all.

Improvements
Mainly an automatic focus search algorithm and the user interface were revised. The focus search makes use of the fact that the image memory size for JPEG or PNG depends on the number of details in it. A maximum size might be expected for the sharpest state. As shown in figure 4 the idea is correct for flat samples. A rough structured surface broads and distorts the peak while flat and weak textured surface let the peak disappear. The manual adjustment remains important in these cases.
The second improvement was focused on the user interface (figure 5). WEB techniques based applications are platform independent for the user and appropriate for remote support. Therefore the central point of the development was to adopt the position control into a WEB service with respect of the introduced Tango [3] environment.
The interface offers now a direct distance control for all three axis and additionally a direct position selection for points of interest which are already visible in the microscope image. Any position can be memorized and recalled by its given name. This can be done either by scripting in SPEC or by selecting it in the interface.
Camera shutter time, light control for the microscope and a snapshot option complete the improved user interface based on a combination of a few Tango servers.
Tango is a network based environment which mainly focuses onto the connection of different devices and organizing a fluent data exchange. The visualization of data is normally realized by external client applications. The developed approach overcomes the strict division and implements an interface to WEB servers as an additional cooperation option into the Tango server itself. This method offers an essential change in the human interaction with Tango servers.

The HTTP interface
A WEB server provided common gateway interface (CGI) is used to link the HTTP based WEB interface temporarily to a Tango server. The protocol overhead is limited to 3 additional Tango commands without an impact to other Tango provided functions.  The developed solution maps incoming HTTP requests by a combined Perl and C++ CGI software into a sequence of Tango commands. The Tango server provided response is transferred back to the HTTP server. The developed CGI software retrieves the information about the chosen Tango server from the URL parameters and from a currently config-file maintained address database. The service might be extended for an unlimited number of cooperating Tango servers.
Though the processing is not limited to a fixed programed response, e.g. a camera image, the Tango server can also be used to process scripts.
The presented solution is constructed as a demonstrator for further implementations. Anything was programed up to the limit where a real script interpreter would be involved into to the process. The assumed macro functions are simulated by fixed programed C++ code.
Technically the approach is similar a server side include (SSI) scripting known for HTML processing of HTTP servers.

Summary
A semi automatically software assisted focus determination was implemented. The portable scheme requires mostly an easy and fast image capturing without an autofocusing camera and fixed capture time and a reliable remote control of the focus distance.
Surfaces with e.g. weak contrast, or granular surfaces result in uncertainty for the right focal distance. A manual intervention is strictly advised in these cases.
The presented software relies on HTTP/Tango and a custom camera driver and auxiliary Tango servers (light, motion system). But the presented focus scheme is highly portable and does not depend on a special environment.
Due to the WEB technology an assistance from the beamline scientists can be realized by remote control.