Skip to content

Commit

Permalink
Example loading jpk
Browse files Browse the repository at this point in the history
  • Loading branch information
SylviaWhittle committed Apr 23, 2024
1 parent 1c8d82c commit 1596dc8
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions examples/example_01.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down

0 comments on commit 1596dc8

Please sign in to comment.