예제 #1
0
 def test_nm_from_t_zero(self):
     # boundary condition: 0
     result = get_nm_from_t(0)
     self.assertIsNotNone(result)
     self.assertAlmostEquals(result, 1e+16)
     result = get_nm_from_t(0, zero_for_inf=True)
     self.assertIsNotNone(result)
     self.assertAlmostEquals(result, 0)
예제 #2
0
 def test_nm_from_t_zero(self):
     # boundary condition: 0
     result = get_nm_from_t(0)
     self.assertIsNotNone(result)
     self.assertAlmostEquals(result, 1e+16)
     result = get_nm_from_t(0, zero_for_inf=True)
     self.assertIsNotNone(result)
     self.assertAlmostEquals(result, 0)
예제 #3
0
 def test_nm_from_t_negative(self):
     # boundary condition: negative
     result = get_nm_from_t(-6.17588983)
     self.assertIsNotNone(result)
     self.assertAlmostEquals(result, -0.716)
예제 #4
0
 def get_nm_from_t(self, theta):
     """Converts a theta position to a nanometer value"""
     return get_nm_from_t(theta,
                          wavelength=self.wavelength,
                          zero_for_inf=True)
예제 #5
0
 def get_nm_from_t(self, theta):
     """Converts a theta position to a nanometer value"""
     return get_nm_from_t(
         theta,
         wavelength=self.wavelength, zero_for_inf=True
     )
예제 #6
0
 def test_nm_from_t_negative(self):
     # boundary condition: negative
     result = get_nm_from_t(-6.17588983)
     self.assertIsNotNone(result)
     self.assertAlmostEquals(result, -0.716)