Hello:
I have a couple of questions about microstructures in PyMKS
1. Order of indexingWhat is the order of indexing of microstructures in PyMKS? That is, if I take one row of the microstructure matrix and go from column to column, am I going along X (horizontal, to the right) coordinate or Y coordinate?
For example, suppose I define a simple microstructure by
import numpy as np
ms = np.ndarray(shape=(1,5,5))
ms[0,:,:] = np.array((
(1,1,1,1,1),
(0,0,1,0,0),
(0,0,0,0,0),
(0,0,0,0,0),
(0,0,0,0,0)))I expected that the microstructure would look like shades below.

However, when I plot the microstructure by
from pymks.tools import draw_microstructures
draw_microstructures(ms)I get an image rotated 90 deg counterclockwise from what I expected:

I have this question because I am trying to figure out the right way of exporting/importing microstructures from/to PyMKS without rotation artifacts, which comes down to reshaping numpy arrays with the right order (I typically need an ASCII table with
x, y, phaseID columns outside of PyMKS).
2. Strange low-dimensional representationsI get strange PCA plots for my microstructures generated in PyMKS.
For example, if I follow the homogenization example and do
from pymks.datasets import make_elastic_stress_random
sample_size = 200
grain_size = [(47, 6), (4, 49), (14,14)]
n_samples = [sample_size] * 3
elastic_modulus = (410, 200)
poissons_ratio = (0.28, 0.3)
macro_strain = 0.001
size = (51, 51)I can reproduce a plot similar to that in PyMKS example.

However, when I slightly increase the dimensions (e.g.
size=(64,64)), I get a PCA plot as shown below. I tried to scale the "grain sizes" with the same ratio as I increased dimensions but I still get the same shape.

After some adjustment of grain sizes and seeds, I can get PCA plots similar to those in the PyMKS example but I am wondering whether or not such strange plots are wrong and if there are "right" grain sizes to generate reasonable sets of microstructures.
Thanks in advance,
Marat