Exemple #1
0
 def test_interactive_special_case(self):
     s = self.s.inav[0]
     r = CircleROI(3, 5, 2)
     sr = r.interactive(s, None, color="blue")
     np.testing.assert_array_equal(
         np.where(sr.data.mask.flatten())[0], [0, 3, 12, 15])
     r.r_inner = 1
     r.cy = 16
     sr2 = r(s)
     np.testing.assert_array_equal(
         np.where(sr.data.mask.flatten())[0], [0, 3, 5, 6, 9, 10, 12, 15])
     np.testing.assert_array_equal(sr2.data, sr.data)
Exemple #2
0
 def test_interactive_special_case(self):
     s = self.s.inav[0]
     r = CircleROI(3, 5, 2)
     sr = r.interactive(s, None)
     np.testing.assert_array_equal(np.where(sr.data.mask.flatten())[0],
                                   [0, 3, 12, 15])
     r.r_inner = 1
     r.cy = 16
     sr2 = r(s)
     np.testing.assert_array_equal(np.where(sr.data.mask.flatten())[0],
                                   [0, 3, 5, 6, 9, 10, 12, 15])
     np.testing.assert_array_equal(sr2.data, sr.data)
Exemple #3
0
 def test_out_special_case(self):
     s = self.s.inav[0]
     r = CircleROI(3, 5, 2)
     sr = r(s)
     np.testing.assert_array_equal(
         np.where(sr.data.mask.flatten())[0], [0, 3, 12, 15])
     r.r_inner = 1
     r.cy = 16
     sr2 = r(s)
     r(s, out=sr)
     np.testing.assert_array_equal(
         np.where(sr.data.mask.flatten())[0], [0, 3, 5, 6, 9, 10, 12, 15])
     np.testing.assert_array_equal(sr2.data, sr.data)