예제 #1
0
 def test_2t_from_nm_zero(self):
     # boundary condition: 0
     result = get_2t_from_nm(0)
     self.assertIsNotNone(result)
     self.assertAlmostEquals(result, 0)
예제 #2
0
 def test_2t_from_nm_positive(self):
     # boundary condition: positive
     result = get_2t_from_nm(0.716)
     self.assertIsNotNone(result)
     self.assertAlmostEquals(result, 12.351779659)
예제 #3
0
 def get_2t_from_nm(self, nm):
     """ Converts a nanometer value to a 2-theta position"""
     return get_2t_from_nm(nm, wavelength=self.wavelength)
예제 #4
0
 def get_2t_from_nm(self, nm):
     """ Converts a nanometer value to a 2-theta position"""
     return get_2t_from_nm(nm, wavelength=self.wavelength)
예제 #5
0
 def test_2t_from_nm_positive(self):
     # boundary condition: positive
     result = get_2t_from_nm(0.716)
     self.assertIsNotNone(result)
     self.assertAlmostEquals(result, 12.351779659)
예제 #6
0
 def test_2t_from_nm_zero(self):
     # boundary condition: 0
     result = get_2t_from_nm(0)
     self.assertIsNotNone(result)
     self.assertAlmostEquals(result, 0)