Author Topic: Simple Sample Coordinate Converter  (Read 343 times)

Radek_MM

  • Graduate
  • **
  • Posts: 8
Simple Sample Coordinate Converter
« on: July 25, 2023, 03:54:34 AM »
Hi everyone,

ATTENTION! All those of you who received an earlier version of my coordinate-converter, please disregard it, there was a minor mistake (formula did not find the column with the smallest error for the shifting vectors)!! Please use this one instead (Version 2).

Microanalysis is often performed with more than just one instrument on the same sample. At times it can be difficult to find the same grain or spot when transferring the sample from one instrument to another. A useful technique is to mark the sample with at least two coordinates that are referred to as reference coordinates. These can be either copper grids or etched marks such as crosses, X’es or circles. The easiest way is to find easy recognizable grains and use them or their corner as a reference point.

Some instrument software has an in-build coordinate converter (i.e. some LA-ICP-MS software) but often this type of converter is lacking for the EPMA or SEM. I made a simple excel spreadsheet that is aiming at helping to convert coordinates, when the instrument does not support such a feature.

This excel file is a simple spot coordinate converter based on two reference points, made for EPMA, SEM, Microscopy, LA-ICP-MS or other instruments with an orthonormal coordinate stage between -40 to +40 mm in x and y direction for up to 6 samples (actually it can go further than ±40mm).

This excel file has no macros, all is done with formulas. It can be expanded to a Euclidean space by adding the z value to the vectors and matrix calculations – feel free to do so and share it.

The sheet is made for 500 spots, but you can unlock the sheet (password: 0000) and drag and drop the needed columns until your desired row number. I locked the sheet for your convenience so as not to accidentally delete anything important (i.e., the formula for displaying the new calculated coordinates in the START-sheet).

The values are in millimeters, but if you need it in micrometers, you can unlock the sheet and format the cells to show no decimal values and simply use it with your micrometer values.

How it works:
If you want to keep the color and border formatting (for convenience of better visualizing the data), please use mouse right-click and ‘insert values only’ when copying old coordinates into the START-sheet. Type the new reference coordinates into the corresponding orange fields. The calculation finds first the rotation of the sample between the two coordinate systems based on the old and new reference vectors, then it finds the shifting vectors. Due to excel not being able to calculate with simple formulas a 360degree rotation, I had to implement 180-degree steps clockwise and counter-clockwise, hence four column groups for six samples each in the “calculation-sheet” (but angles on top of the matrix are still in clockwise degrees, i.e. value in cell AZ15 in the calculation-sheet). The columns where both reference shifting vectors are as identical as possible, are then displayed for the corresponding sample name in the “START-sheet”. Optimally the shifting vectors are identical, but there is room for rounding errors or simply not precise reading of the reference coordinates. This error can be set in the yellow field in the “calculation-sheet” (currently set to 5 rel%). The sheet then displays the spots in a diagram in the “START-sheet” just as an additional visual aid and to see that all is fine. The graph should update automatically based on the entry for the points and sample name, with blue and grey points for the old coordinates and orange and yellow for the new coordinates. The calculated values for the points in the START-sheet can then be copy/pasted into a text/scv file or directly in the software for stage movement.

Known mistakes (based on experience) are either forgetting the minus sign for the reference or spot coordinates, or mistakenly swap reference 1 coordinates with reference 2. Or the error is larger than the set error in the sheet. For some instruments the reference coordinate might be outside the movement range of the stage (i.e. our thin sections in the CAMECA SX100), then you need to either estimate the reference point coordinate or use one of the points/grains as a reference point for old and new reference coordinates. Do not cut and paste rows in the START-sheet, this will mess up the formula. Be aware of these possible mistakes and try to prepare your coordinate files as carefully as possible!

Hope this tool can make the life of the one or another user/researcher a bit easier! Do not hesitate to contact me if you have questions.
Enjoy!  :)

-Radek
radoslaw.michallik@gtk.fi