-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add option to load either processed or unprocessed from Oxford Instrument's H5OINA file #692
Comments
For loading "Unprocessed Patterns" from .h5oina files, it probably also makes sense that the static BG is also loaded from the file. I'm not sure if this is currently done already... |
The static background is loaded kikuchipy/src/kikuchipy/io/plugins/oxford_h5ebsd.py Lines 140 to 141 in a016c0a
and available in the property EBSD.static_background. This is also mentioned in the IO user guide. |
@Tijmenvermeij, I made a fix for the processed/unprocessed patterns from H5OINA in https://github.com/hakonanes/kikuchipy/tree/692-h5oina-un-processed-patterns and #702. Could you try it out? |
Should be fixed in #702. |
@Tijmenvermeij, the latest 0.11.1 release now has this option. |
Sorry for the spam, but I solved this issue, at least temporarily. I found the line that specifies that the pattern dataset should not be read into memory (I think), and added "Unprocessed Patterns" to it. I changed line 99 in oxford_h5ebsd.py to the following:
dd = _hdf5group2dict(group["EBSD/Data"], data_dset_names=[self.patterns_name, "Unprocessed Patterns"])
This solves the issue for me.
Perhaps this is not a suitable permanent solution though. I guess the user would need to have the option to import unprocessed patterns, if they like, instead of processed patterns...
Originally posted by @Tijmenvermeij in #690 (comment)
I did not think about H5OINA files storing both processed and unprocessed patterns when writing the reader. Thank you for spotting the bug, @Tijmenvermeij!
The solution is, as you say, to give the user the opportunity to load either of them (or both, if they load consecutively). The other, if present, should not be read into memory.
We should look at releasing a
v0.11.00.12.0 within the next couple weeks with these changes.The text was updated successfully, but these errors were encountered: