Esempio n. 1
0
 def test_reduced_corner_cases(self, lattice):
     # test whether there is always a sym-eq rotation that falls into the FZ
     N = np.random.randint(10, 40)
     size = np.ones(3) * np.pi**(2. / 3.)
     grid = grid_filters.coordinates0_node([N + 1, N + 1, N + 1], size,
                                           -size * .5)
     evenly_distributed = Orientation.from_cubochoric(x=grid[:-2, :-2, :-2],
                                                      lattice=lattice)
     assert evenly_distributed.shape == evenly_distributed.reduced.shape
Esempio n. 2
0
 def test_from_cubochoric(self):
     assert np.all(
         Orientation.from_cubochoric(x=np.zeros(
             3), lattice='triclinic').as_matrix() == np.eye(3))