예제 #1
0
 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)
예제 #2
0
 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)
예제 #3
0
 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])
예제 #4
0
 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])
예제 #5
0
 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])
예제 #6
0
 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])
예제 #7
0
 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])
예제 #8
0
 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])
예제 #9
0
 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])
예제 #10
0
 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])