Exemplo n.º 1
0
 def test_correct_radius(self):
     s0, s1, r0, r1 = self.s0, self.s1, self.r0, self.r1
     s = ra.get_angle_image_comparison(s0, s1, angleN=2)
     assert s.axes_manager.signal_shape == (100, 100)
     # Check that radius is correct by getting a line profile
     s_top = s.isig[0.0, :0.0]
     s_bot = s.isig[0.0, 0.0:]
     argmax0 = s_top.data.argmax()
     argmax1 = s_bot.data.argmax()
     assert abs(s_top.axes_manager[0].index2value(argmax0)) == r0
     assert abs(s_bot.axes_manager[0].index2value(argmax1)) == r1
Exemplo n.º 2
0
 def test_mask(self):
     s0, s1 = self.s0, self.s1
     s_no_mask = ra.get_angle_image_comparison(s0, s1)
     s_mask = ra.get_angle_image_comparison(s0, s1, mask_radius=40)
     assert s_no_mask.data.sum() != 0.0
     assert s_mask.data.sum() == 0.0
Exemplo n.º 3
0
 def test_different_signal_size(self):
     s0 = mdtd.MakeTestData(100, 100).signal
     s1 = mdtd.MakeTestData(100, 150).signal
     with pytest.raises(ValueError):
         ra.get_angle_image_comparison(s0, s1)
Exemplo n.º 4
0
 def test_different_angleN(self):
     s0, s1 = self.s0, self.s1
     for i in range(1, 10):
         ra.get_angle_image_comparison(s0, s1, angleN=i)