def getHkl(self): pos = self.geometry.physical_angles_to_internal_position( self.diffractometerScannable.getPosition()) pos.changeToRadians() wavelength = self.wavelengthScannable.getPosition() if self.engine.lower() == 'vlieg': return vliegAnglesToHkl(pos, wavelength, self.UB) elif self.engine.lower() == 'you': return youAnglesToHkl(pos, wavelength, self.UB) else: raise ValueError(self.engine)
def test_anglesToHkl_arbitrary(self): pos = posFromI16sEuler(1.9, 2.9, 30.9, 0.9, 60.9, 2.9).inRadians() arrayeq_(youAnglesToHkl(pos, self.WL1, self.UB1), [1.01174189, 0.02368622, 0.06627361])
def test_anglesToHkl_mu_10_gam_0(self): pos = posFromI16sEuler(1, 1, 30, 10, 60, 0).inRadians() arrayeq_(youAnglesToHkl(pos, self.WL1, self.UB1), [0.99620193, 0.0065784359, 0.08682408])
def test_anglesToHkl_mu_0_gam_10(self): pos = posFromI16sEuler(1, 1, 30, 0, 60, 10).inRadians() arrayeq_(youAnglesToHkl(pos, self.WL1, self.UB1), [1.00379806, -0.006578435, 0.08682408])
def test_anglesToHkl_mu_0_gam_0(self): pos = posFromI16sEuler(1, 1, 30, 0, 60, 0).inRadians() arrayeq_(youAnglesToHkl(pos, self.WL1, self.UB1), [1, 0, 0])