mtex-toolbox / mtex

MTEX is a free Matlab toolbox for quantitative texture analysis. Homepage:
http://mtex-toolbox.github.io/
GNU General Public License v2.0
287 stars 185 forks source link

Map spacing issue due to rounding error on .ctf import #697

Open jhiscocks opened 3 years ago

jhiscocks commented 3 years ago

For .ctf files generated by our ebsd system, the x step and y step listed in the header goes to 9 decimal places, while the x and y coordinates associated with the individual points only go to four decimals. This periodically seems to cause a rounding error that shows up on maps as a white line. Two images of this are shown below.

MapLine1 MapLine2

Ideally, I'd like a function that looks at the map for lines with no data that extend vertically or horizontally across the entire map and renumbers the xy positions to eliminate these by shifting the x and y data fractionally. Otherwise you have to do the renumbering by editing the CTF text file which is highly inconvenient. A dataset with this issue is attached as a .txt file, which can be converted back to .ctf by changing the extension.

SiScan.txt

AzdiarGazder commented 1 year ago

Hi @jhiscocks,

I was browsing through the MTEX issues page today when I came across your problem. I can confirm that I've faced the same problems too with OI files.

It's been a while since you've posted this issue and you may have a working solution by now. But just in case, I thought of pointing you to a script I wrote that helps mitigate it. It is located at the following weblink: https://github.com/AzdiarGazder/mtexTools/tree/main/calcStepSize

Warm regards, Azdi