Skip to content

Possible bug in get_orientations_from_stereographic_triangle() #36

@EirikOpheim

Description

@EirikOpheim

I am not sure if this is really a bug or if I am not using the function correctly. I have interpreted the function as giving a list of orientations that span the Euler space for a given crystal structure.

What I have done to test this function is generate a grid of all Euler angles from (-90,-90,0) to (90,90,0) at 5 degree intervals, and simulate diffraction patterns of gold (cubic fcc) for each orientation.
I experience that for my simulated data, if I use a set of orientations from get_orientation_from_stereographic_triangle() in my template library, using a resolution of 1/2 degree, the match is a good fit only in the region characterized by having as corners euler angles (0,-55,0) (-45,-55,0)(-45,55,0)(0,55,0)[I think first angle is along y axis.] And a similar region on top in the image. Outside this range templates do not fit the simulated diffraction maps.

Figure__Signal_Pyxem_stereographic_triangle

To see if I could find the minimum set of orientations necessary for the template to do the job I have made a template library with the angles in the grid. I find that if I use angles from (-45,-90,0) to (45,90,0) I get a unique match for each pixel, except along the lines (mod(x,90) = 0, : ,0), where I have double matches. See figure

Figure__Signal_pyxem_orientation_list

Steps to reproduce the behavior:

  1. Generate a simulated set of diffraction patterns for known angles at a regular grid in the range (-90,-90,0) to (90,90,0).
  2. Use the same set of angles as a template, but include only angles from (-45,-90,0) to (45,90,0)
  3. Perform template matching. Plot orientation map. Use this this as a "perfect match".
  4. Generate angles from get_orientations_from_stereographic_triangle() at high resolution.
  5. Perform template matching and plot orientation map. See problem.

I would expect that the orientation map obtained using get_orientations_from_stereographic_triangle() would be similar to the "perfect match" all over, with some errors, but in general a smooth result. It seems to me like the Euler space is not covered in get_orientations_from_stereographic_triangle().

Possible solutions:

  1. Maybe I have to choose the in-plane rotations in a specific way?
  2. Span orientation angles over a the rectangle I have been using

Note: The reason why I choose a smooth orientation map as a quality metric is that if there are multiple correct templates, it seems like the template will somewhat randomly be choosen, as seen in the lines in figure 2. Also, for a distance metric such as the one generating the orientation map the triangle inequality D(a,b) <= D(a,c)+D(c,b) should ensure a smooth orientation map, if the orientation map is correct. If the distance between two neighbouring pixels is more than 5 i suppose one of them must be wrong, as their relative tilt is 5 degrees.

pyxem 0.10.0.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions