## 3 Software and Experiment
### Implemented Features for Automated Measurement and Analysis
#### 3.4.2 Load and Convert Data Function  
The function separates and converts measured data files (* mpa) into structured files (* dat) and moves them into the project's folder, where the created subdirectory contains * btc file and the * dat files. Measured spectra files may be analyzed separately and the researcher can set a region of interest (ROI). Figure 13 displays a single measurement from the experiment with particular parameter settings including axis positions or dose limits listed in the Table 2. In our case the ROI was determined by researchers between channels 280 and 360 for the experiment. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameter** & **Value** & **Description** \\ \hline StepNr & \(11\) & Step identifier \\ PhiPos & 0.00 & Sample holder rotation \\ ThetaPos & \(-2.20\) & Horizontal axe \\ TiltPos & \(-4.00\) & Vertical axe \\ LiftPos & 0.00 & Sample holder vertical shift \\ FoilPos & 1 & Foil identifier (for detector R2) \\ ConfigFile & \(\ldots\) /config.mpa & Configuration file for a multichannel analyzer \\ MaxTime & 0 & Time limit & A measurement stops if one \\ Dose & 0.20 & Dose limit (\(\upmu\)C) & of these values is reached. \\ RoiCounts & 0 & Integral limit & Zero is ignored. \\ RoiDetector & 1 & Detector identifier \\ OutputFile & \(\ldots\)/data\(\_11\).mpa & A file, where measured spectrum is saved. \\ Convert\_Det1 & Fixed RBS & \\ Convert\_Det2 & None & Define, which detector is used to measure a spectrum \\ Convert\_Det3 & None & under the specific Det. \\ Convert\_Det4 & None & \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Step #11 parameters. Figure 13: RBS measured spectrum of Si (100), dose 0.5 \(\upmu\)C.  
3.4.3. Analysis Features and Evaluation Tools Demonstrated in Experiment: \({}^{4}\)He+ Beam Directed on a Si (100)  
The application was examined on our Tandetron setup reflecting stepping modes of the goniometer in each of the four quadrants (resulting from Figure 12). First, in coarse mode, the researcher can display processed and fitted data of all four quadrants (Figure 14) together with automatic identification of minima localization per each quadrant. Standard MATLAB function was used to fit the model to the data by spline interpolation as a selected fit type model. In our experiment the minimal value of the spline is taken as the minimum, but there is an option to choose measured values as well as the input for further processing and intersections calculation. Another implemented feature is a 3D rotating view showing all the processed quadrants data in a complex plot with calculated local minima values (Figure 15). It gives the researcher better possibilities to reorient and analyze the fitted values or to set a ROI. The 3D plot may show local minima values to help determine planes. Figure 14: Local minima in each of fourth quadrants with the yield given by the sum over the ROI. Subsequent to localizing the minima, the projection of the planar axes is being realized (Figure 16). The tool allows to choose measured points to work with, thus create/update planar axes or to adjust the parameters for a fine measuring. Each planar axis can be visualized in a different color and a line style. Based on this, the script finds the planar axes rotation and the major axis offset position. Then, another batch file can be created. Figure 16: Visualization of measured planes and the main axes of crystal. Figure 15: Coarse measurement results. Outcome of the fine data evaluation can be shown in 2D plot using gathered or fitted data (Figure 17). The researcher can choose a reference level and based on that a normalized (Yield values are divided by referenced Yield) angular plot will be shown with the calculated output parameters \(\chi_{\text{min}}\) marked as Yield\({}_{\text{min}}\) (presents a minimum decrease value) and angular width.