{'fraction_non_alphanumeric': 0.02206312098188194, 'fraction_numerical': 0.002630040911747516, 'mean_word_length': 5.251141552511416, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Software for imaging phase-shift interference microscope

In recent years absolute interference microscope was created at National Metrology Institute of Brazil (INMETRO). The instrument by principle of operation is imaging phase-shifting interferometer (PSI) equipped with two stabilized lasers of different colour as traceable reference wavelength sources. We report here some progress in development of the software for this instrument. The status of undergoing internal validation and verification of the software is also reported. In contrast with standard PSI method, different methodology of phase evaluation is applied. Therefore, instrument specific procedures for software validation and verification are adapted and discussed.


Introduction
The automated measurement systems with computerized processing have virtually revolutionized physical metrology in recent years. Adequate software (SW) often provides significant improvement in usability and accuracy of the instrument. However this process immediately raises important issues about validation and verification of the software as an integral part of metrology systems. We present here our ongoing work on development and validation/verification of the software for automated interference microscope (IM) that was recently upgraded with some new hardware (HW) [1]

General system description
Our IM is based on phase-shifting (PSI) technique combined with interference pattern digital imaging. In standard PSI methods [2] 3-5 fixed step interferograms are used for phase extraction. In our algorithm we use multiple phase-stepped interferograms (image stack) to calculate the height from waveforms that carry all necessary phase information. Each pixel of the interferometric image stack produces one waveform corresponding to one surface point ( Figure 1). The disadvantage of this approach is multiple interferograms processing (significant amount of data). The advantage of this method is the possibility of the phase step self-calibration. Indeed, if the whole waveform of fringe signal is available, the phase step information is simply deducted from such waveform. As more advantages or this method we should mention: less sensitivity to mechanical errors in step-shifting and higher resolution in phase determination. Specifically for this interferometric microscope we have developed dedicated custom software package that includes data acquisition, data processing and visualization. In figure 1 we demonstrate details of the phase-shifting algorithm.

Software specifications and structure
From management point of view validation of the software starts with correct specifications. In our case specifying software is easy because physical part of the measurement process is clear. The general requirement is that the software must provide automated measurement with adequate calculation for obtaining meaningful result in comprehensible SI unit quantified form. The software suitable to operate automated PSI imaging instrument requires minimum 3 main functionalities as most important: (i) automation and data acquisition, (ii) data processing (phase extraction) (iii) Error control/ reporting. We will concentrate on those in next sections. From coding point of view the implementation of above scenario it is more or less straight forward programming task. However, making the software foolproof and suitable for so called "stress tests" is a much more demanding process. We have analyzed most critical parts of the software from verification point of view. Following practice of PTB and NPL [3][4] we have defined the list of most important testable requirements with suitable test criteria for each item. We will follow the list in following sections and sub-sections.

Automation and data acquisition
The automation of the SW requires synchronized and robust input-output data flow control. This requirement was validated by both static analysis and white-box testing. As a first step of static program analysis the data communication code was checked in order to provide predictable code execution with any data input. This includes trapping values outside the expected range, interception of sudden jumps in values as well as flat (not changing) data input detection. The most conservative action to correct situation was adapted as a full reset of the measurement cycle in case of problem detection.
The data readout was also verified by dynamic white-box testing in which we executed the SW code together with background monitoring of the whole communication input-output calls between the SW and HW. As an auxiliary step we could trace the exact code execution with inserted check points and detailed log files. This feature was specifically implemented to ensure confidence in white-box testing. Those tests were performed in both normal operational mode and simulated problematic situations (such as low light level on CCD, saturated illumination, malfunction of phase-shifter unit, etc.)

Data processing / computation
The data received from the hardware is subject of further processing. Correct computation is required for each step of the processing. This requirement is subdivided in several topics due to complexity of the process.

Algorithm numerical stability
The data processing is based on numerical fit as the most critical part of the calculation methodology. Therefore, the fitting algorithm is the most important part of the processing to be verified. We should start with the curve fit criterion that is in our case the most obvious minimum least square difference between measured and fit points. Any fitting algorithm works with certain trade-off between calculation speed and numerical stability of the output. Our fastest two-pass iteration algorithm described in [1] unfortunately was found to be insufficiently stable for some test cases (specifically cases of 2 or more local minima in multi-parameter space). Thus, the fitting procedure has been modified to avoid instability at expense of processing speed decrease. We have added one more preliminary phase of the search in which presence of several minima is verified. A resulting approximate solution is fed to same two-pass iterations as before. Final SW performance is about 0.5 ms per fit on 3.5 GHz processor.  [5]. Numerical stability was tested with our test cases. The whole data filtering procedure has been verified in conjunction with fitting as described in the next section.

Back-to-back testing
The filtering and fitting part of the software was compared to corresponding parts of our previous SW package developed for the gauge block interferometer [6]. This instrument with its automation SW has participated at an international comparison and it can be considered as "end-to-end" tested unit [7]. No significant differences were detected during this testing.