SunnySuite / Sunny.jl

Spin dynamics and generalization to SU(N) coherent states
Other
86 stars 19 forks source link

Invert axes labels when loading from Mantid #181

Closed Lazersmoke closed 11 months ago

Lazersmoke commented 12 months ago

This needs to happen because Mantid axes labels like [H,H,0] (meaning that the coordinate displayed on the axis is H and you can compute Q from H using Q = [H,H,0]) are related to the coordinate covectors used by Sunny by a pseudo-inverese (which means transpose and divide by the norm-squared). This way, multiplying (dot product) [qx,qy,qz] with pinv([1,1,0]) gives (qx+qy)/2, which is the correct way to extract the label H from a vector like [H,H,0].