Skip to content

Commit

Permalink
Fixing the language
Browse files Browse the repository at this point in the history
  • Loading branch information
beyucel committed May 17, 2021
1 parent 06b1043 commit 9aac048
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions notebooks/intro.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"PyMKS can handle both numpy and Dask arrays. For simplicity, we will only use Numpy arrays in this notebook. Note that PyMKS requires certain data shapes for proper 2-point spatial correlation calculations. For a two-dimensional microstructure, PyMKS requires a 4-dimensional array. The first dimension is the sample axis, the second dimension is the x-axis, the third dimension is the y-axis, and the fourth dimension is the phase axis. In the phase axis, the specific phase gets '1's and the rest of the image gets '0's. This is equivalent to one-hot encoding in image analysis. For this example, we have a 2-phase segmented microstructure (986 x 1376 pixels) so we need to perform some array manipulations to obtain a 1 x 986 x 1376 x 2 array. "
"PyMKS can handle both Numpy and Dask arrays. For simplicity, we will only use Numpy arrays in this notebook. Note that PyMKS requires certain data shapes for proper 2-point spatial correlation calculations. For a two-dimensional microstructure, PyMKS requires a 4-dimensional array. The first dimension is the sample axis, the second dimension is the x-axis, the third dimension is the y-axis, and the fourth dimension is the phase axis. In the phase axis, the specific phase gets '1's and the rest of the image gets '0's. This is equivalent to one-hot encoding in image analysis. For this example, we have a 2-phase segmented microstructure (986 x 1376 pixels) so we need to perform some array manipulations to obtain a 1 x 986 x 1376 x 2 array. "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Convert the image to a Numpy array and add the sample axis by using `np.expand_dims`function. If you have multiple images you can simply stack them by using Numpy data manipulation functions."
"Convert the image to a Numpy array and add the sample axis by using the `np.expand_dims` function. Multiple images can be stacked along the sample axis."
]
},
{
Expand Down Expand Up @@ -310,7 +310,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"In the previous section, we demonstrated a 2-point spatial correlation calculation for a single experimental image. Now we will demonstrate calculating 2-point correlations for multiple microstructure images without using any for loops. In the following, the data array has axes representing samples, x-direction, y-direction and phase. \n",
"In the previous section, we demonstrated a 2-point spatial correlation calculation for a single experimental image. Now we will demonstrate calculating 2-point correlations for multiple microstructure images without using any for loops. In the following, the data array has axes representing the sample axis, the x axis, the y axis and the phase axis. \n",
"\n",
"Here we generate 40 different 2-phased synthetic microstructures each with a `100x100` shape using the function `generate_multiphase`. [Effective Siffness of a Composite Material example](./stress.ipynb) notebook has detailed explanation for the `generate_multiphase` function. \n",
"\n",
Expand Down Expand Up @@ -1549,7 +1549,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.6"
"version": "3.8.5"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 9aac048

Please sign in to comment.