def testHkl001(self): pos = YouPos(mu=-90, delta=60, nu=0, eta=0, chi=90 + 30, phi=-90, unit='DEG') self._check((0, 0, 1), pos, {'alpha': 30, 'beta': 30})
def testHkl011(self): # raise SkipTest() # skipped because we can't calculate values to check against by hand pos = YouPos(mu=-90, delta=90, nu=0, eta=0, chi=90 + 90, phi=-90, unit='DEG') self._check((0, 1, 1), pos, {'alpha': 45, 'beta': 45})
def willmott_to_you_fixed_mu_chi(pos): pos = YouPos(mu=-0, delta=pos.delta, nu=pos.gamma, eta=pos.omegah, chi=90, phi=-pos.phi) if pos.phi > 180: pos.phi -= 360 elif pos.phi < -180: pos.phi += 360 return pos
def willmott_to_you_fixed_eta_chi(pos): pos = YouPos(mu=pos.omegah, delta=-pos.gamma, nu=pos.delta, eta=0, chi=0, phi=-pos.phi, unit='DEG') if pos.phi > 180: pos.phi -= 360 elif pos.phi < -180: pos.phi += 360 return pos