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

Geometry module and orix interface #272

Merged
merged 20 commits into from
Mar 28, 2024
Merged

Conversation

jadball
Copy link
Contributor

@jadball jadball commented Mar 27, 2024

Added ImageD11.sinograms.geometry

Should partially address #269 although some tasks are still outstanding

Added orix interface to unitcell class

  • unitcell.orix_phase is now a property of unitcell if it was created with an integer spacegroup symmetry.
  • added unitcell.get_orix_orien() - computes the orix orientation from a provided numpy array of UB matrices. Note that this can be more than one UB matrix! - the orix orientation class can contain multiple orientations.
  • added unitcell.get_ipf_colour_from_orix_orien() - computes the IPF colour from an orix orientation given a corresponding axis
  • added unitcell.get_ipf_colour() - computes the IPF colour from a numpy array of UB matrices
  • grain objects now have a ref_unitcell property to supply a unitcell class instance
  • grain objects have helper methods for getting orix_phase and orix_orien from grain.ref_unitcell
  • added a few unit tests for the orix interface in test/test_orix.py - should not break CI as will be skipped on Py2
  • added/updated IPF and PF plots in nb_utils.py to use new orix interface - much faster and more reliable now!
  • added demonstration notebook for IPF and PF plots in sandbox/orix/test_pole_figures.ipynb
  • added orix and diffpy.structure as 'useful' dependencies in setup.py for python_version >= "3"

It's not all sunshine and roses though - unfortunately I've been unable to get a unit test to work with a large strain between B (e.g the B matrix of a measured grain) and B0 (the B matrix used by the reference unit cell). I think the problem is that with large strains, there is a significant angle between [a* of the B0 matrix in the lab frame] and [a* of the B matrix in the lab frame]. I will make a separate issue to track this once merged.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@jonwright jonwright merged commit 98ff33c into FABLE-3DXRD:master Mar 28, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants