Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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
     )
Exemplo n.º 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)