diff --git a/examples/example_01.ipynb b/examples/example_01.ipynb index bd25239..a73ed4b 100644 --- a/examples/example_01.ipynb +++ b/examples/example_01.ipynb @@ -27,6 +27,47 @@ "source": [ "create_animation(file_name=\"sample_0\", frames=frames)" ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# JPK Files" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Import the load_jpk function from topofileformats\n", + "from topofileformats.jpk import load_jpk" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Load the IBW file as an image and pixel to nm scaling factor\n", + "FILE = \"../tests/resources/sample_0.jpk\"\n", + "image, pixel_to_nm_scaling = load_jpk(file_path=FILE, channel=\"height_trac\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Plot the image\n", + "import matplotlib.pyplot as plt\n", + "\n", + "plt.imshow(image, cmap=\"afmhot\")\n", + "plt.show()" + ] } ], "metadata": {