From 26486e34781b9d274aff5ca8f8c414ce4585dd69 Mon Sep 17 00:00:00 2001 From: eric Date: Mon, 1 Apr 2024 17:53:34 -0700 Subject: [PATCH] remove fluff --- docs/examples/remote_sensing_examples.ipynb | 209 ++++---------------- 1 file changed, 43 insertions(+), 166 deletions(-) diff --git a/docs/examples/remote_sensing_examples.ipynb b/docs/examples/remote_sensing_examples.ipynb index 3c90f3b..1dfafeb 100644 --- a/docs/examples/remote_sensing_examples.ipynb +++ b/docs/examples/remote_sensing_examples.ipynb @@ -12445,173 +12445,50 @@ "metadata": {}, "outputs": [], "source": [ - "list(bbox_gdf.total_bounds)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "!pip install --upgrade xee" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import xee" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "!earthengine authenticate --quiet" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import ee\n", + "# list(bbox_gdf.total_bounds)\n", "\n", - "ee.Initialize(opt_url=\"https://earthengine-highvolume.googleapis.com\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "bbox_ee = ee.Geometry.Rectangle(153.0, -43.0, 154.0, -42.0)\n", - "bbox_ee = ee.Geometry.Rectangle(*list(bbox_gdf.total_bounds))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "bbox_ee = ee.Geometry.BBox(*list(bbox_gdf.total_bounds))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "bbox_ee.Polygon()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "ic.first().select(0).projection()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "ic = ee.ImageCollection(\"JAXA/ALOS/PALSAR-2/Level2_2/ScanSAR\").filterDate(\n", - " \"2022-07-01\", \"2022-07-31\"\n", - ")\n", - "ds = xr.open_dataset(\n", - " ic,\n", - " geometry=bbox_ee,\n", - " projection=ic.first().select(0).projection(),\n", - " crs=\"EPSG:4326\",\n", - " engine=\"ee\",\n", - " scale=0.01,\n", - ")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "ds" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "ds[\"HH\"].isel(time=1).plot()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "def dn_to_db(dn):\n", - " db = 10 * np.log10(dn**2) - 83\n", - " return db" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "ds[\"HH\"].map_blocks(dn_to_db)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "ds[\"HH\"].isel(time=0)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "ds.time.values[0:10]" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# auth: planetary computer, google earth engine, earthdata, etc. and save?" + "# !pip install --upgrade xee\n", + "\n", + "# import xee\n", + "\n", + "# !earthengine authenticate --quiet\n", + "\n", + "# import ee\n", + "\n", + "# ee.Initialize(opt_url=\"https://earthengine-highvolume.googleapis.com\")\n", + "\n", + "# bbox_ee = ee.Geometry.Rectangle(153.0, -43.0, 154.0, -42.0)\n", + "# bbox_ee = ee.Geometry.Rectangle(*list(bbox_gdf.total_bounds))\n", + "\n", + "# bbox_ee = ee.Geometry.BBox(*list(bbox_gdf.total_bounds))\n", + "\n", + "# bbox_ee.Polygon()\n", + "\n", + "# ic.first().select(0).projection()\n", + "\n", + "# ic = ee.ImageCollection(\"JAXA/ALOS/PALSAR-2/Level2_2/ScanSAR\").filterDate(\n", + "# \"2022-07-01\", \"2022-07-31\"\n", + "# )\n", + "# ds = xr.open_dataset(\n", + "# ic,\n", + "# geometry=bbox_ee,\n", + "# projection=ic.first().select(0).projection(),\n", + "# crs=\"EPSG:4326\",\n", + "# engine=\"ee\",\n", + "# scale=0.01,\n", + "# )\n", + "\n", + "# ds\n", + "\n", + "# ds[\"HH\"].isel(time=1).plot()\n", + "\n", + "# def dn_to_db(dn):\n", + "# db = 10 * np.log10(dn**2) - 83\n", + "# return db\n", + "\n", + "# ds[\"HH\"].map_blocks(dn_to_db)\n", + "# ds[\"HH\"].isel(time=0)\n", + "# ds.time.values[0:10]" ] } ],