Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reading of master patterns generated with EDAX #662

Open
hakonanes opened this issue Nov 8, 2023 · 4 comments
Open

Reading of master patterns generated with EDAX #662

hakonanes opened this issue Nov 8, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@hakonanes
Copy link
Member

hakonanes commented Nov 8, 2023

I've received a master pattern file generated with EDAX OIM Matrix from a colleague. It's a binary file with file extension .oem of 157.3 MB (157 286 400 bytes). I know nothing of the contents of the file, but I assume it contains master patterns of nickel, possibly for more than one beam energy. Thus, I cannot create a reader for it for kikuchipy at the moment.

@IMBalENce, you have access to EDAX OIM Matrix, right? Are you familiar with .oem files and their contents?

I'll leave this issue open if anyone with more information on this file format stumbles upon kikuchipy.

@hakonanes hakonanes added the enhancement New feature or request label Nov 8, 2023
@IMBalENce
Copy link
Contributor

@hakonanes Yes, we do have EDAX OIM Matrix. But I have not used the .oem format yet. I'll take a look to see if I can find any clue.

@hakonanes
Copy link
Member Author

Hm, I remember you saying that they are stored as HDF5 files identical to EMsoft's HDF5 files, right?

@IMBalENce
Copy link
Contributor

IMBalENce commented Nov 19, 2023

Just confirmed .oem format is actually a hdf5 compatible format, I can use the HDFview package to browser the data structure.

And h5py also works:

import h5py as h5

with h5.File(file) as oem:
    print(oem.keys())

<KeysViewHDF5 ['CrystalData', 'EMData', 'EMheader', 'ExperimentalPatterns', 'NMLparameters']>

I have been using the hdf5 master pattern generated from EMsoft in OIM Matrix without any issue, but have not generate any in OIM yet. Based on facts that OIM Matrix seems can get confused by the EMsoft document/.config/EMsoftConfig.json file, and there are several files in the OIM bin folder resemble the EMsoft equivalent files. There is a good chance that OIM Matrix is simply accessing the EMsoft modules through Fortran wrapper. So file format should be the same.

@hakonanes
Copy link
Member Author

Aha, thank you for checking! I should of course have checked this myself.

Unless EDAX makes any significant changes to the way they write master pattern HDF5 files compared to the EMsoft way, we should be able to include the "oem" extension in

file_extensions = ["h5", "hdf5"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants