Skip to content

get_rotation_from_z_to_direction + calculate_ed_data don't work together for monoclinic (and likely most non-orthonormal) unit cells #177

@JoonatanL

Description

@JoonatanL

I'm working on a monoclinic cocrystal. Running get_rotation_from_z_to_direction in zap_map_generators does not return the correct structure when u (in [uvw]) is nonzero. For example, for 100:
image
when plotted with calculate_ed_data as follows:
Screenshot from 2021-10-12 17-11-15
gives:
Screenshot from 2021-10-12 15-19-35
whereas
1-0-0 crystalmaker
from CrystalMaker is correct. This is not present for rotations where u=0, such as 010:
Screenshot from 2021-10-12 15-20-51
in diffsims versus:
010 crystalmaker
in CrystalMaker.

I wrote my own check for the Euler angles using scipy.Rotation.align_vectors, which gives a different orientation that seems equivalent but is not for the plots on calculate_ed_data.
Screenshot from 2021-10-12 15-23-06

For 100:
diffsims: 90, 99.526, -90 versus mine (which gives the correct diffraction): 90, 99.526,90.
For 010:
diffsims: 180, 90, -180 versus mine 0, 90, 0. (results are identical as we are rotating perpendicular to the monoclinic axis).

Working on this as I discover more of the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions