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
281 stars 185 forks source link

loadEBSD_ang.m header has too few lines as a limit #2186

Open nicolasmroberts opened 1 month ago

nicolasmroberts commented 1 month ago

What do you want to do? I have a .ang file that has a header that is 2099 lines long. MTEX was throwing an error when I tried to load it, and I finally figured out that on line 31 of loadEBSD_ang.m it reads in the header by reading the first 2000 lines of code.

% read file header hl = file2cell(fname,2000);

Changing it to 3000 in the code worked.

This should really be extended to 5000 or more (or do something smart like read to the line past the last '#' in the file, because if you have a lot of phases with high hkl family numbers, you can surpass 2000.