{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"hideCode": false,
"hidePrompt": false,
"tags": []
},
"source": [
"![OpenSARlab notebook banner](NotebookAddons/blackboard-banner.png)\n",
"\n",
"# Subset Data Stack\n",
"\n",
"### Alex Lewandowski; University of Alaska Fairbanks\n",
"\n",
"\n",
"\n",
"This notebook crops a directory of tiffs to a subset area of interest using an interactive Matplotlib plot of an image in your data stack.\n",
"This notebook assumes that users have generated the original image from `Prepare_Data_Stack` notebook. Users now have an option to subset the original image in following methods:\n",
"\n",
"1. Drag and drop to cut out sqare shape\n",
"1. Given a correct Well-Known Text (WKT), users can define and cut a specific polygon shape.\n",
"1. Upload shapely file along with its relavent files to cut a specific polygon.\n",
"\n",
""
]
},
{
"cell_type": "markdown",
"metadata": {
"hideCode": false,
"hidePrompt": false
},
"source": [
"\n",
"---\n",
"\n",
" Important Note about JupyterHub \n",
"\n",
"**Your JupyterHub server will automatically shutdown when left idle for more than 1 hour. Your notebooks will not be lost but you will have to restart their kernels and re-run them from the beginning. You will not be able to seamlessly continue running a partially run notebook.**\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hideCode": false,
"hidePrompt": false,
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"import url_widget as url_w\n",
"notebookUrl = url_w.URLWidget()\n",
"display(notebookUrl)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hideCode": false,
"hidePrompt": false
},
"outputs": [],
"source": [
"from IPython.display import Markdown\n",
"from IPython.display import display\n",
"\n",
"notebookUrl = notebookUrl.value\n",
"user = !echo $JUPYTERHUB_USER\n",
"env = !echo $CONDA_PREFIX\n",
"if env[0] == '':\n",
" env[0] = 'Python 3 (base)'\n",
"if env[0] != '/home/jovyan/.local/envs/rtc_analysis':\n",
" display(Markdown(f'