You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Hello everyone, I am currently following the Fast Template Matching scripts (https://pyxem.readthedocs.io/en/v0.19.1/tutorials/pyxem-demos/11%20Accelerated%20orientation%20mapping%20with%20template%20matching.html) to map the crystal orientation in my samples. I followed the instruction in the tutorial and what I found a bit confusing is in the get_beam_directions_grid() for stereographic projection mesh grids. I am having a problem when setting crystal_systems = 'monoclinic' which produces the stereographic projection mesh grid that is not as stereographic triangle as expected (see attached file). I checked the source code and it seems to me like the source code for get_beam_directions_grid() should perform the crop to stereographic triangle for different crystal systems (?) (#crop to stereographic triangle which depends on crystal system). Further check with different crystal systems also shows the same for triclinic, trigonal, and orthorhombic (eee attached). I am new in crystal orientation mapping so I am not sure if these types of stenographic projection mesh presentation are common for these crystal systems.
The reason why I am asking is because I am having error in the following step when trying to plot the results after doing template matching on the stereographic projection:
What I found was the script for stereographic projection (below) reshapes the size of x and y to not match with the number of simulated patterns when I selected the crystal_system = 'monoclinic'. For reference, the number of simulated patterns was 1497 after performing grid_mono = get_beam_directions_grid("monoclinic", resolution=4.3, mesh="spherified_cube_edge") while the shape of x and y after the stereographic projection (below) was 771. Is there any specific reasons for such a change in shape as it does occur for trigonal, triclinic, and orthorhombic as well. Many thanks!
defgrid_to_xy(grid):
fromorix.quaternion.rotationimportRotationfromorix.vector.vector3dimportVector3dfromorix.projectionsimportStereographicProjections=StereographicProjection(pole=-1)
rotations_regular=Rotation.from_euler(np.deg2rad(grid))
rot_reg_test=rotations_regular*Vector3d.zvector()
x, y=s.vector2xy(rot_reg_test)
returnx, y
The text was updated successfully, but these errors were encountered:
Describe the bug
Hello everyone, I am currently following the Fast Template Matching scripts (https://pyxem.readthedocs.io/en/v0.19.1/tutorials/pyxem-demos/11%20Accelerated%20orientation%20mapping%20with%20template%20matching.html) to map the crystal orientation in my samples. I followed the instruction in the tutorial and what I found a bit confusing is in the get_beam_directions_grid() for stereographic projection mesh grids. I am having a problem when setting crystal_systems = 'monoclinic' which produces the stereographic projection mesh grid that is not as stereographic triangle as expected (see attached file). I checked the source code and it seems to me like the source code for get_beam_directions_grid() should perform the crop to stereographic triangle for different crystal systems (?) (#crop to stereographic triangle which depends on crystal system). Further check with different crystal systems also shows the same for triclinic, trigonal, and orthorhombic (eee attached). I am new in crystal orientation mapping so I am not sure if these types of stenographic projection mesh presentation are common for these crystal systems.
The reason why I am asking is because I am having error in the following step when trying to plot the results after doing template matching on the stereographic projection:
What I found was the script for stereographic projection (below) reshapes the size of x and y to not match with the number of simulated patterns when I selected the crystal_system = 'monoclinic'. For reference, the number of simulated patterns was 1497 after performing grid_mono = get_beam_directions_grid("monoclinic", resolution=4.3, mesh="spherified_cube_edge") while the shape of x and y after the stereographic projection (below) was 771. Is there any specific reasons for such a change in shape as it does occur for trigonal, triclinic, and orthorhombic as well. Many thanks!
The text was updated successfully, but these errors were encountered: