-
Notifications
You must be signed in to change notification settings - Fork 27
Closed
Labels
enhancementNew feature, request, or improvementNew feature, request, or improvement
Milestone
Description
Describe the bug
simulate_rotated_structure(), in theory, "rotates" a diffpy lattice. In practice ... it's not that simple.
To Reproduce
Make a boring orthorhombic lattice.
Make a second "rotated" lattice - the rotation here is a cut down version of what we do in simulate_rotated_structure()
canonical = diffpy.structure.lattice.Lattice(4,2,1, 90, 90, 90)
R = np.asarray([[1/np.sqrt(2),1/np.sqrt(2),0],[-1/np.sqrt(2),1/np.sqrt(2),0],[0,0,1]])
halfhalf = diffpy.structure.lattice.Lattice(base=(R@canonical.base))
The problem is that the halfhalf lattice has two cell parameters of 3.162... ~ this makes life hard work.
Solution
Cut all the rotation code that involved diffpy, spit cartesians out of get_points_sphere() then
manually rotate the cartesians with a rotation matrix. I actually think this might be quite simple.
get_kinematical_intensities might also need a revisit
Metadata
Metadata
Assignees
Labels
enhancementNew feature, request, or improvementNew feature, request, or improvement