def test_set_navigation_shape(self, pc, desired_nav_shape,
                               desired_nav_ndim):
     """Change shape of PC array."""
     detector = EBSDDetector(pc=pc)
     detector.navigation_shape = desired_nav_shape
     assert detector.navigation_shape == desired_nav_shape
     assert detector.navigation_dimension == desired_nav_ndim
     assert detector.pc.shape == desired_nav_shape + (3, )
 def test_set_navigation_shape_raises(self, pc1):
     """Desired error message."""
     detector = EBSDDetector(pc=pc1)
     with pytest.raises(ValueError, match="A maximum dimension of 2"):
         detector.navigation_shape = (1, 2, 3)