EMsoft-org / EMsoft

Public EMsoft repository
Other
61 stars 94 forks source link

EMEBSDDI OxfordHDF #111

Closed mardilos closed 4 years ago

mardilos commented 4 years ago

I just tried to do an EMEBSDDI run. The EBSD system we use is: OXFORD Instruments Nanoanalysis Symmetry and the software used to generate the files is Aztec.

When using the .h5oina files and setting the inputtype to OxfordHDF, the EMEBSDDI stops with the following error message: ----> Fatal error in routine openExpPatternFile: OxfordHDF input format not yet implemented

Do i have to implement the OxfordHDF format first? If yes how can I do this?

Or is there another possibility to run the indexing with the stored unprocessed pattern?

EMEBSDDI-Si.zip EMsoft

marcdegraef commented 4 years ago

Hi,

the Oxford HDF format still needs to be implemented.  If you can provide me with a small example file that contains patterns, then I can implement it and make this format available.  I was not aware that one can now store patterns in the Oxford HDF file (I've been waiting for years for them to implement that option...)

Regards, Marc.

On 5/19/20 4:56 AM, mardilos wrote:

I just tried to do an EMEBSDDI run. The EBSD system we use is: OXFORD Instruments Nanoanalysis Symmetry and the software used to generate the files is Aztec.

When using the .h5oina files and setting the inputtype to OxfordHDF, the EMEBSDDI stops with the following error message: ----> Fatal error in routine openExpPatternFile: OxfordHDF input format not yet implemented

Do i have to implement the OxfordHDF format first? If yes how can I do this?

Or is there another possibility to run the indexing with the stored unprocessed pattern?

EMEBSDDI-Si.zip https://github.com/EMsoft-org/EMsoft/files/4649256/EMEBSDDI-Si.zip EMsoft https://user-images.githubusercontent.com/65020763/82306377-46920780-99bf-11ea-90d6-9791ff25d985.png

You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/EMsoft-org/EMsoft/issues/111, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB26VWF62Y5O7AKUUG2LFJLRSJCSLANCNFSM4NEZUY7A.

-- Marc De Graef Professor Department of Materials Science and Engineering 130 Roberts Engineering Hall Carnegie Mellon University 5000 Forbes Avenue Pittsburgh, PA 15213-3890 USA

Ph: (412) 268-8527 Fx: (412) 268-7596 email: degraef@cmu.edu web: http://materials.cmu.edu/degraef

Admin. Asst.: Marygrace Antkowski Phone: (412) 268-7240

hakonanes commented 4 years ago

BTW, @ppinard have published the h5oina specification here: https://github.com/oinanoanalysis/h5oina.

marcdegraef commented 4 years ago

Thanks!

reading this page, it appears to me that the actual EBSD patterns are still not stored in the HDF5 file, correct?

Marc.

On 5/19/20 5:03 AM, Håkon Wiik Ånes wrote:

BTW, @ppinard https://github.com/ppinard have published the h5oina specification here: https://github.com/oinanoanalysis/h5oina https://github.com/oinanoanalysis/h5oina.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/EMsoft-org/EMsoft/issues/111#issuecomment-630688988, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB26VWGGM4XVH7P2S4IRLKDRSJDPJANCNFSM4NEZUY7A.

-- Marc De Graef Professor Department of Materials Science and Engineering 130 Roberts Engineering Hall Carnegie Mellon University 5000 Forbes Avenue Pittsburgh, PA 15213-3890 USA

Ph: (412) 268-8527 Fx: (412) 268-7596 email: degraef@cmu.edu web: http://materials.cmu.edu/degraef

Admin. Asst.: Marygrace Antkowski Phone: (412) 268-7240

mardilos commented 4 years ago

No it seems that the pattern are not stored in this file.

I have a seperate folder with the unprocessed patterns (tiff). Is it possible to generate a file with these pattern which i can use in the EMEBSDDI run?

marcdegraef commented 4 years ago

Hi,

you have two choices.

Best option, though, is to always use the uncompressed .ebsp format when you save the data during an acquisition run.  Dealing with hundreds of thousands of .tiff files is a royal pain...

Hope that helps. Marc.

On 5/19/20 5:58 AM, mardilos wrote:

No it seems that the pattern are not stored in this file.

I have a seperate folder with the unprocessed patterns (tiff). Is it possible to generate a file with these pattern which i can use in the EMEBSDDI run?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/EMsoft-org/EMsoft/issues/111#issuecomment-630717949, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB26VWDFDBC4W6XSMXB6FZDRSJJ4FANCNFSM4NEZUY7A.

-- Marc De Graef Professor Department of Materials Science and Engineering 130 Roberts Engineering Hall Carnegie Mellon University 5000 Forbes Avenue Pittsburgh, PA 15213-3890 USA

Ph: (412) 268-8527 Fx: (412) 268-7596 email: degraef@cmu.edu web: http://materials.cmu.edu/degraef

Admin. Asst.: Marygrace Antkowski Phone: (412) 268-7240

clear all; clc;

% split the typical pattern file name into three parts; if the pattern file is % of the type 'prefix0001.tiff', then str1 is 'prefix' and str2 = '.tiff' str1 = 'prefix_'; str2 = '.tiff';

% remember to put the individual pattern dimensions in reverse order!!! % npx is the number of rows. % npy is the number of columns npx = 1024; npy = 1344;

% let's put the binning factor at 4, so the final patterns will have size 336x256 binning = 4;

% how many patterns in the field of view along x and y nx = 175; ny = 125;

% open the output file with whatever filename you want fid = fopen('output.data','w');

% here we loop over all the patterns startx = 1; starty = 1; for iy = starty:starty+ny-1 disp(strcat(' starting row ',num2str(iy))) for ix = startx:startx+nx-1

    % uncomment one of the two following lines; 
    % if the first pattern is 'prefix_0000.tiff'
    % nimg = (iy-1)*nx+ix-1;
    % if the first pattern is 'prefix_0001.tiff'
    nimg = (iy-1)*nx+ix;

    % read image; note that the 4.4d may need to be replaced if the number of digits in the filename is not 4
    fname = strcat(str1,num2str(nimg,'%04.4d'),str3);
    im = imread(fname);
    % turn the image into a floating point array and flip it upside down
    im = single(im);
    im = flipud(im);

    % bin it down to the desired size; this is the slow part of the loop and can
    % probably be replaced by a matlab function...
    for k = 0:binning:npx-binning
        for l = 0:binning:npy-binning
            im_bin(k/binning+1,l/binning+1) = sum(sum(im(k+1:k+binning,l+1:l+binning)))/binning^2;
        end
    end

    % make a 1D vector of image
    for k = 1:npx/binning
        for l = 1:npy/binning
            p((k-1)*npy/binning+l) = im_bin(k,l);
        end
    end

    % and add it to the binary output file
    fwrite(fid,p,'float32');
end

end fclose(fid);

ppinard commented 4 years ago

@marcdegraef and @hakonanes You are both correct, the EBSPs are not saved in the H5OINA format. It is work in progress at the moment. As Marc mentioned I would also recommend using the .ebsp file, which is always created when you decide to store the patterns in AZtec. The H5OINA might still be useful if you need to know some metadata about the acquisition.

mardilos commented 4 years ago

Thank you all a lot for your helpful comments