A MATLAB project to assist the Borghesi-1022 experiment by finding the least warped section of each foil in each Borghesi microtarget array.
Example result plotThe foils are individually scanned using a white light interferometer normal to the surface of the foil. The resulting height map is then saved in the .OPD file format and uploaded to the Characterisation Data directory of this repository. Information about the foil such as its corresponding data file's name is given by the user to the main.m script, which then uses an algorithm (explained below) to determine location of its least warped section. A plot of the foil's 3D surface that includes the relevant result annotations can then be plotted.
Either:
- Clone this repository into a local directory
or
- Download the .zip file and open it locally
- Run the
main.m
script - Edit the following variables to fit the current data
filePath
fileName
reference_bounds
, the x locations (in data rows) of the inner left and right edges of the L-shaped foil mountapprox_beam_width_um
The filePath
should not depend on where you store the repository - it should be a local path, e.g. 'Characterisation Data\Array3\'
. The reference_bounds
have to be found and entered manually as these positions change between scans and can be subjective. It is recommended to run main.m
with arbitrary reference_bounds
values and use the 3D plot to determine them before restarting the script.
The image below shows the naming convention used for filenames in the Array Target Characterisation.xlsx spreadsheet.
Naming convention of foil data filesVarious metrics such as dimensions, material, and surface roughness can also be found in Array Target Characterisation.xlsx. Each row corresponds to a different target.
The algorithm tries to find the least warped section of the foil. It looks only at the middle third of the section between the reference bounds. These 'middle third bounds' are displayed with blue dashed lines, and the reference bounds are shown in black.
Example Result PlotThe algorithm's output is the location of the centre of a certain section of the foil that is beam_width_um
μm wide. The bounds of this section are marked with the red dotted lines. The beam_width_um
is converted to a width of n
data point readings.
This 'certain section' of foil was chosen as it either maximises or minimises the chosen warp indicator(s), measured for each data column / array slice in the section and averaged.
The warp indicator now used on the main
branch of this repository is described below.
Recently, it was observed that the angle of the target wheel is able to be adjusted, so we can search for relative flatness, as opposed to absolute angle flatness (e.g.
This relative flatness can be approximated by the coefficient of determination (
The only issue with this approach is that the algorithm will not take into account any flat twist (like any section of a Möbius strip). If the approx beam width is not thin, (n > 1
) this flat twist will be problematic and should be minimised.
An indicator of the flat twist of the foil in a certain section is the standard deviation or variance of the array slices in that section.
It was decided not to calculate this 'flat twist indicator' as finding the right weighted sum would have been difficult. Instead, only the coefficient of determination is used and the user is presented with a 3D surface plot or sequential 2D slice plots of the result section to check it for flat twist. These plots are made available with the included but commented lines 58 and 59 in [+Utils\]LeastWarpedSection.m
, which make use of the PlotSlices
and PlotSlices3D
functions.
A bug involving scaling problems for height data between Vision64 and MATLAB has recently been fixed. Originally, the height data MATLAB loaded from the .OPD files was both differently scaled and vertically translated. This issue has been fixed so the data is now correctly scaled automatically. The vertical scale in MATLAB is in microns.
Vision64 scan | MATLAB surface |
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.