{ "cells": [ { "cell_type": "markdown", "id": "4c89ab28-5a6d-427e-8e8e-d9315395e440", "metadata": {}, "source": [ "## Customizable radiometric terrain corrections of Sentinel-1 products\n", "\n", "The Planetary Computer includes both [Sentinel-1 Level-1 Ground Range Detected (GRD)](https://planetarycomputer.microsoft.com/dataset/sentinel-1-grd) and [Sentinel-1 Radiometrically Terrain Corrected (RTC)](https://planetarycomputer.microsoft.com/dataset/sentinel-1-rtc) collections. This tutorial explains the some background on Synthetic Aperture Radar (SAR), geometric and radiometric terrain correction, and introduces [sarsen](https://github.com/bopen/sarsen), an open-source library for working with SAR data. `sarsen` enables geometric and radiometric corrections using any digital elevation model (DEM) supported by GDAL / Proj.\n", "\n", "### Background\n", "\n", "The typical side-looking [Synthetic Aperture Radar (SAR)](https://earthdata.nasa.gov/learn/backgrounders/what-is-sar) system acquires data with uniform sampling in azimuth and slant range, where the azimuth and range represents the time when a given target is acquired and the absolute sensor-to-target distance, respectively.\n", "Because of this, the near range appears compressed with respect to the far range. Furthermore, any deviation of the target elevation from a smooth geoid results in additional local geometric and radiometric distortions known as foreshortening, layover and shadow.\n", "\n", "- Radar foreshortening: Terrain surfaces sloping towards the radar appear shortened relative to those sloping away from the radar.\n", "- Radar layover: It's an extreme case of foreshortening occurring when the terrain slope is greater than the angle of the incident signal. \n", "- Radar shadows: They occur when ground points at the same azimuth but different slant ranges are aligned in the direction of the line-of-sight. This is usually due to a back slope with an angle steeper than the viewing angle. When this happens, the radar signal never reaches the farthest points, and thus there is no measurement, meaning that this lack of information is unrecoverable.\n", "\n", "### Geometric Terrain Correction\n", "\n", "The [Sentinel-1 GRD](https://planetarycomputer.microsoft.com/dataset/sentinel-1-grd) product already provides a geometric correction that removes the compression effect on the near-range. Geometric Terrain Correction *also* corrects for displacements due to target elevation. When applying geometric terrain correction, the resolution and accuracy of the input Digital Elevation Model (DEM). The Planetary Computer has a number of [DEMs](https://planetarycomputer.microsoft.com/catalog?tags=DEM) to choose from.\n", "\n", "### Radiometric Terrain Correction\n", "\n", "Terrain variations affect both the position of a given point on the Earth's surface *and* the brightness of the radar return. The `sarsen` radiometric terrain correction compensates for the backscatter modulation generated by the topography of the scene. This produces a more uniform backscatter image, emphasizing the radiometric differences of the terrain.\n", "\n", "The accuracy of Radiometric Terrain Corrected (RTC) products is also strongly affected by the resolution of the input DEM.\n", "\n", "This tutorial shows how to perform (i) geometric and (ii) radiometric terrain corrections on the Sentinel-1 GRD product using `sarsen`. We use a 10-meter resolution DEM, the same resolution of the DEM used to generate the [Sentinel-1 RTC product](https://planetarycomputer.microsoft.com/dataset/sentinel-1-rtc) available on the Planetary Computer. The comparison at the end of this notebook demonstrates that the RTC computed by `sarsen` is consistent with the RTC from the Planetary Computer.\n", "\n", "As an example, we use data covering the South-of-Redmond region (Seattle, US).\n", "\n", "Steps:\n", "\n", "- Download the Sentinel-1 GRD\n", "- Download the 10-meter DEM\n", "- Compute the GTC using `sarsen`\n", "- Compute the RTC using `sarsen`\n", "- Compare the GTC to the RTC\n", "- Compare the RTC computed using `sarsen` to the RTC already available on the Planetery Computer \n", "\n", "**Note**: Download/retrieval steps are slower on local machines compared to the Planetary Computer. In future versions, it will be possible to access data via [fsspec](https://filesystem-spec.readthedocs.io/en/latest/) without having to download data locally." ] }, { "cell_type": "code", "execution_count": 1, "id": "f95d095c-a5b6-40d2-a47c-1adc4e60d31b", "metadata": {}, "outputs": [], "source": [ "%matplotlib inline\n", "\n", "import matplotlib.pyplot as plt\n", "\n", "plt.rcParams[\"figure.figsize\"] = (10, 7)" ] }, { "cell_type": "code", "execution_count": 2, "id": "c949e993-be36-42c6-87f0-773093a464a0", "metadata": {}, "outputs": [], "source": [ "import os\n", "import tempfile\n", "\n", "import rioxarray\n", "\n", "from sarsen import apps\n", "\n", "import adlfs\n", "import planetary_computer\n", "import pystac_client\n", "import stackstac" ] }, { "cell_type": "markdown", "id": "23a700d1-2b4a-45ba-8a64-bd154f775b76", "metadata": {}, "source": [ "### Processing definitions" ] }, { "cell_type": "code", "execution_count": 3, "id": "2cfc92e0-91ee-47f6-8329-f002eb6409b1", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'/tmp'" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# create a temporary directory where to store downloaded data\n", "tmp_dir = tempfile.gettempdir()\n", "\n", "# DEM path\n", "dem_path = os.path.join(tmp_dir, \"South-of-Redmond-10m.tif\")\n", "\n", "# path to Sentinel-1 input product in the Planetary Computer\n", "product_folder = \"GRD/2021/12/17/IW/DV/S1B_IW_GRDH_1SDV_20211217T141304_20211217T141329_030066_039705_9048\" # noqa: E501\n", "\n", "# band to be processed\n", "measurement_group = \"IW/VV\"\n", "\n", "tmp_dir" ] }, { "cell_type": "markdown", "id": "868bd066-4122-4f5c-932e-8b607388ae1f", "metadata": {}, "source": [ "#### Area of interest definition: South-of-Redmond (Seattle, US)" ] }, { "cell_type": "code", "execution_count": 4, "id": "51cfd0f3-1be4-493a-a419-b56425c139eb", "metadata": {}, "outputs": [], "source": [ "lon, lat = [-121.95, 47.04]\n", "buffer = 0.2\n", "bbox = [lon - buffer, lat - buffer, lon + buffer, lat + buffer]" ] }, { "cell_type": "markdown", "id": "211d1633-cd35-4e1c-8b71-bc6432e7495c", "metadata": {}, "source": [ "#### DEMs discovery\n", "\n", "Here we use the [USGS 3dep-seamles DEM](https://planetarycomputer.microsoft.com/dataset/3dep-seamless) with a 10-meter ground sample distance (GDS). Note that **any DEM supported by GDAL/Proj can be used**.\n", "\n", "Using `pystac_client` we can search the Planetary Computer's STAC endpoint for items matching our query parameters. \n", "As multiple DEMs acquired at different times are available in this area, we select the DEMs with 10-meter GDS and perform the average of the remaining DEMs along the time dimension." ] }, { "cell_type": "code", "execution_count": 5, "id": "8a8883ba-e53f-41bf-95a3-25219c1799e6", "metadata": {}, "outputs": [], "source": [ "catalog = pystac_client.Client.open(\n", " \"https://planetarycomputer.microsoft.com/api/stac/v1\",\n", " modifier=planetary_computer.sign_inplace,\n", ")\n", "search = catalog.search(\n", " collections=\"3dep-seamless\", bbox=bbox, query={\"gsd\": {\"eq\": 10}}\n", ")\n", "items = search.item_collection()" ] }, { "cell_type": "markdown", "id": "0d016965", "metadata": {}, "source": [ "Here we load the data into an xarray `DataArray` using stackstac." ] }, { "cell_type": "code", "execution_count": 6, "id": "e7021623-ba3f-407e-8c96-f09824b2adbe", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
<xarray.DataArray 'stackstac-91c9486d3e17af5ae0ea1ccefd39911d' (time: 4,\n",
       "                                                                y: 4321, x: 4321)>\n",
       "dask.array<getitem, shape=(4, 4321, 4321), dtype=float64, chunksize=(1, 1024, 1024), chunktype=numpy.ndarray>\n",
       "Coordinates: (12/13)\n",
       "  * time             (time) datetime64[ns] 2018-02-02 2018-02-08 ... 2020-01-07\n",
       "    id               (time) <U10 'n48w122-13' 'n47w122-13' ... 'n48w123-13'\n",
       "    band             <U4 'data'\n",
       "  * x                (x) float64 -122.2 -122.1 -122.1 ... -121.8 -121.8 -121.8\n",
       "  * y                (y) float64 47.24 47.24 47.24 47.24 ... 46.84 46.84 46.84\n",
       "    threedep:region  <U7 'n40w130'\n",
       "    ...               ...\n",
       "    proj:epsg        int64 5498\n",
       "    proj:shape       object {10812}\n",
       "    gsd              int64 10\n",
       "    end_datetime     (time) <U20 '2016-12-31T00:00:00Z' ... '2019-04-25T00:00...\n",
       "    description      <U1849 'This tile of the 3D Elevation Program (3DEP) sea...\n",
       "    epsg             int64 5498\n",
       "Attributes:\n",
       "    spec:        RasterSpec(epsg=5498, bounds=(-122.15000053746, 46.839907613...\n",
       "    crs:         epsg:5498\n",
       "    transform:   | 0.00, 0.00,-122.15|\\n| 0.00,-0.00, 47.24|\\n| 0.00, 0.00, 1...\n",
       "    resolution:  9.2592593e-05
" ], "text/plain": [ "\n", "dask.array\n", "Coordinates: (12/13)\n", " * time (time) datetime64[ns] 2018-02-02 2018-02-08 ... 2020-01-07\n", " id (time) \n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
<xarray.DataArray 'stackstac-d90c33d750479ce84c6f5eda1b1f3eec' (y: 3000, x: 2900)>\n",
       "array([[ 196.68109131,  196.14202881,  194.11082458, ...,  820.71972656,\n",
       "         820.05755615,  819.68597412],\n",
       "       [ 196.68109131,  196.14202881,  195.13980103, ...,  817.84838867,\n",
       "         814.0760498 ,  814.61773682],\n",
       "       [ 197.03511047,  195.65205383,  195.13980103, ...,  812.12884521,\n",
       "         810.13116455,  809.48669434],\n",
       "       ...,\n",
       "       [ 602.28057861,  607.78918457,  609.63909912, ..., 4130.93261719,\n",
       "        4135.22167969, 4137.34033203],\n",
       "       [ 597.96710205,  602.36712646,  603.93676758, ..., 4133.00195312,\n",
       "        4137.37695312, 4139.43896484],\n",
       "       [ 594.58496094,  599.09234619,  600.71466064, ..., 4135.22558594,\n",
       "        4139.52978516, 4141.82373047]])\n",
       "Coordinates:\n",
       "  * x                (x) float64 5.65e+05 5.65e+05 ... 5.94e+05 5.94e+05\n",
       "  * y                (y) float64 5.22e+06 5.22e+06 ... 5.19e+06 5.19e+06\n",
       "    proj:shape       object {10812}\n",
       "    band             <U4 'data'\n",
       "    threedep:region  <U7 'n40w130'\n",
       "    epsg             int64 5498\n",
       "    proj:epsg        int64 5498\n",
       "    description      <U1849 'This tile of the 3D Elevation Program (3DEP) sea...\n",
       "    gsd              int64 10\n",
       "    spatial_ref      int64 0\n",
       "Attributes:\n",
       "    _FillValue:  1.7976931348623157e+308
" ], "text/plain": [ "\n", "array([[ 196.68109131, 196.14202881, 194.11082458, ..., 820.71972656,\n", " 820.05755615, 819.68597412],\n", " [ 196.68109131, 196.14202881, 195.13980103, ..., 817.84838867,\n", " 814.0760498 , 814.61773682],\n", " [ 197.03511047, 195.65205383, 195.13980103, ..., 812.12884521,\n", " 810.13116455, 809.48669434],\n", " ...,\n", " [ 602.28057861, 607.78918457, 609.63909912, ..., 4130.93261719,\n", " 4135.22167969, 4137.34033203],\n", " [ 597.96710205, 602.36712646, 603.93676758, ..., 4133.00195312,\n", " 4137.37695312, 4139.43896484],\n", " [ 594.58496094, 599.09234619, 600.71466064, ..., 4135.22558594,\n", " 4139.52978516, 4141.82373047]])\n", "Coordinates:\n", " * x (x) float64 5.65e+05 5.65e+05 ... 5.94e+05 5.94e+05\n", " * y (y) float64 5.22e+06 5.22e+06 ... 5.19e+06 5.19e+06\n", " proj:shape object {10812}\n", " band " ], "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "dem_raster.plot()\n", "plt.title(\"DEM in UTM coordinates\");" ] }, { "cell_type": "markdown", "id": "00e88577-3a05-4865-ae1a-e80fd2ae8f8a", "metadata": {}, "source": [ "### Define GRD parameters" ] }, { "cell_type": "code", "execution_count": 10, "id": "49dc13e7-f72d-4c1c-9c48-e5f466a394c3", "metadata": {}, "outputs": [], "source": [ "grd_account_name = \"sentinel1euwest\"\n", "grd_storage_container = \"s1-grd\"\n", "grd_product_folder = f\"{grd_storage_container}/{product_folder}\"\n", "grd_local_path = os.path.join(tmp_dir, product_folder)" ] }, { "cell_type": "markdown", "id": "116c7c85-a65e-4e74-a8a8-f0bdd952c198", "metadata": {}, "source": [ "### Retrieve Sentinel-1 GRD\n", "\n", "We'll use the Planetary Compueter's [SAS API](https://planetarycomputer.microsoft.com/docs/concepts/sas/) to get a read-only token for the Sentinel-1 GRD container." ] }, { "cell_type": "code", "execution_count": 11, "id": "976ee57b-f766-4102-b24e-55f1b787a3b5", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "['s1-grd/GRD/2021/12/17/IW/DV/S1B_IW_GRDH_1SDV_20211217T141304_20211217T141329_030066_039705_9048/manifest.safe']" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "grd_token = planetary_computer.sas.get_token(\n", " grd_account_name, grd_storage_container\n", ").token\n", "grd_fs = adlfs.AzureBlobFileSystem(grd_account_name, credential=grd_token)\n", "grd_fs.ls(f\"{grd_product_folder}/manifest.safe\")" ] }, { "cell_type": "code", "execution_count": 12, "id": "6ebd58bb-5584-4a7d-aeef-ffea00290b9a", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "/tmp/GRD/2021/12/17/IW/DV/S1B_IW_GRDH_1SDV_20211217T141304_20211217T141329_030066_039705_9048\n" ] } ], "source": [ "grd_fs.get(grd_product_folder, grd_local_path, recursive=True)\n", "!ls -d {grd_local_path}" ] }, { "cell_type": "markdown", "id": "9371be6b-5b88-4eb5-91b2-dfcb4ac23030", "metadata": { "tags": [] }, "source": [ "### Processing\n", "\n", "#### GTC\n", "\n", "Here we compute the geometric terrain correction.\n", "\n", "Input parameters:\n", "- `product_urlpath`: product path\n", "- `measurement_group`: band to be processed in the form {swath}/{polarization} (see [xarray-sentinel](https://pypi.org/project/xarray-sentinel/) for more details)\n", "- `dem_urlpath`: path to the input DEM. sarsen supports all DEMs supported by GDAL/Proj for ECEF-translation. \n", "- `interp_method`: interpolation method, sarsen supports all interpolation methods supported by [xarray.Dataset.interp](https://xarray.pydata.org/en/stable/generated/xarray.Dataset.interp.html)\n", "- `chunks`: dask chunks\n", "- `output_urlpath`: output path\n", "\n", "The output is the input SAR image resampled on DEM coordinates. " ] }, { "cell_type": "code", "execution_count": 13, "id": "9f44371e-dedb-4a06-b16e-c4d748216ace", "metadata": {}, "outputs": [], "source": [ "gtc = apps.terrain_correction(\n", " product_urlpath=grd_local_path,\n", " measurement_group=measurement_group,\n", " dem_urlpath=dem_path,\n", " output_urlpath=os.path.join(\n", " tmp_dir, os.path.basename(product_folder) + \".10m.GTC.tif\"\n", " ),\n", ")" ] }, { "cell_type": "code", "execution_count": 14, "id": "7c3ac2e9-4d7d-45cc-9b06-d1bf223354c7", "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "gtc.plot(vmax=0.4);" ] }, { "cell_type": "markdown", "id": "7c9cd051-776b-41dd-a03e-341f3a3271b1", "metadata": {}, "source": [ "#### RTC\n", "\n", "`sarsen` implements the radiometric terrain-correction [Gamma Flattening](https://ieeexplore.ieee.org/document/5752845) algorithm.\n", "\n", "#### Input parameters\n", "- `correct_radiometry`: default `None`. If `correct_radiometry=None`the radiometric terrain correction is not applied. `correct_radiometry=gamma_bilinear` applies the gamma flattening classic algorithm using bilinear interpolation to compute the weights. `correct_radiometry=gamma_nearest` applies the gamma flattening using nearest neighbours instead of bilinear interpolation. 'gamma_nearest' significantly reduces the processing time.\n", "- `grouping_area_factor`: scaling factor for the size of the image pixel where the areas are summed. By default, the `grouping_area_factor` is `(1, 1)`, which corresponds to Sentinel-1 input product pixel size. The `grouping_area_factor` shall be increased if the DEM resolution is lower than the Sentinel-1 input product resolution to avoid gaps and distortions the normalization factor. It can be also used to to speed up the computation or the DEM resolution is lower than the Sentinel-1 input product resolution. \n", "\n", "\n", "**Note**: The `grouping_area_factor` can be increased (i) to speed up the processing or (ii) when the input DEM resolution is low. The Gamma Flattening usually works properly if the pixel size of the input DEM is much smaller than the pixel size of the input Sentinel-1 product. Otherwise, the output may have radiometric distortions. This problem can be avoided by increasing the `grouping_area_factor`. Be aware that `grouping_area_factor` too high may degrade the final result.\n", "\n", "**Note:** As the RTC generation step loads data into the memory, it may take several minutes (about 10 minutes on the Planetary Computer). The performances will be improved in the next releases of `sarsen`." ] }, { "cell_type": "code", "execution_count": 15, "id": "bc90978d-3c8b-4c9e-b77b-781fd04e6f20", "metadata": {}, "outputs": [], "source": [ "rtc = apps.terrain_correction(\n", " grd_local_path,\n", " measurement_group=measurement_group,\n", " dem_urlpath=dem_path,\n", " correct_radiometry=\"gamma_bilinear\",\n", " output_urlpath=os.path.join(\n", " tmp_dir, os.path.basename(product_folder) + \".10m.RTC.tif\"\n", " ),\n", " grouping_area_factor=(3, 3),\n", ")" ] }, { "cell_type": "markdown", "id": "ecae137d-447e-43a6-b74e-5165f858bb4e", "metadata": {}, "source": [ "### Comparison between GTC and RTC\n", "\n", "Let's visualize the geometrically and radiometrically terrain corrected data:" ] }, { "cell_type": "code", "execution_count": 16, "id": "e0c8af4d-01e9-42bf-b219-ca7ec2641b47", "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "f, axes = plt.subplots(nrows=1, ncols=2, figsize=(30, 12))\n", "\n", "gtc.plot(ax=axes[0], vmax=0.4)\n", "axes[0].grid(c=\"red\")\n", "axes[0].set(title=\"GTC\")\n", "\n", "rtc.plot(ax=axes[1], vmax=0.4)\n", "axes[1].grid(c=\"red\")\n", "axes[1].set(title=\"RTC\");" ] }, { "cell_type": "markdown", "id": "5a421b9a-5f5b-47cd-88ce-f23b7bc9353d", "metadata": {}, "source": [ "### Comparison between Planetary Computer RTC and sarsen RTC\n", "\n", "Finally, let's compare the pre-computed Sentinel-1 RTC with the customizable RTC from sarsen. We'll use the Planetary Computer's STAC API to find the matching scene from the Sentinel-1 RTC collection.\n", "\n", "Note: accessing data from the `sentinel-1-rtc` collection requires an account on the Planetary Computer. See [When an account is needed](https://planetarycomputer.microsoft.com/docs/concepts/sas/#when-an-account-is-needed) for more." ] }, { "cell_type": "code", "execution_count": 17, "id": "11747c3b-036d-4668-817e-423c6d95bb58", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Found 1 items\n" ] }, { "data": { "text/plain": [ "" ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "search = catalog.search(\n", " collections=[\"sentinel-1-rtc\"], datetime=\"2021-12-17\", bbox=bbox\n", ")\n", "items = search.get_all_items()\n", "print(f\"Found {len(items)} items\")\n", "item = items[0]\n", "item" ] }, { "cell_type": "markdown", "id": "1b4dd404-2467-490f-b226-4bfa91b8497d", "metadata": {}, "source": [ "We'll load up the pre-computed RTC data:" ] }, { "cell_type": "code", "execution_count": 18, "id": "5c64895d-3ed8-4498-8230-a1e3eaa97ff2", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
<xarray.DataArray (band: 1, y: 3000, x: 2900)>\n",
       "[8700000 values with dtype=float32]\n",
       "Coordinates:\n",
       "  * x            (x) float64 5.65e+05 5.65e+05 5.65e+05 ... 5.94e+05 5.94e+05\n",
       "  * y            (y) float64 5.22e+06 5.22e+06 5.22e+06 ... 5.19e+06 5.19e+06\n",
       "    spatial_ref  int64 0\n",
       "Dimensions without coordinates: band\n",
       "Attributes:\n",
       "    Matrix_Element:   _1_1\n",
       "    Polarization:     VV\n",
       "    SARPixelContent:  intensity\n",
       "    Scale:            linear\n",
       "    _FillValue:       -32768.0\n",
       "    scale_factor:     1.0\n",
       "    add_offset:       0.0\n",
       "    long_name:        Sentinel-1 Calibrated and Terrain Corrected VV
" ], "text/plain": [ "\n", "[8700000 values with dtype=float32]\n", "Coordinates:\n", " * x (x) float64 5.65e+05 5.65e+05 5.65e+05 ... 5.94e+05 5.94e+05\n", " * y (y) float64 5.22e+06 5.22e+06 5.22e+06 ... 5.19e+06 5.19e+06\n", " spatial_ref int64 0\n", "Dimensions without coordinates: band\n", "Attributes:\n", " Matrix_Element: _1_1\n", " Polarization: VV\n", " SARPixelContent: intensity\n", " Scale: linear\n", " _FillValue: -32768.0\n", " scale_factor: 1.0\n", " add_offset: 0.0\n", " long_name: Sentinel-1 Calibrated and Terrain Corrected VV" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "rtc_pc = rioxarray.open_rasterio(item.assets[\"vv\"].href).drop(\"band\").sel(dem_corners)\n", "rtc_pc" ] }, { "cell_type": "markdown", "id": "1abc6292-455b-409a-b80e-4be005955207", "metadata": {}, "source": [ "And plot the results, with the pre-computed RTC on the left and sarsen's RTC on the right." ] }, { "cell_type": "code", "execution_count": 20, "id": "2ebe759d-5d53-40fc-badf-a4aafe13a91a", "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "f, axes = plt.subplots(ncols=2, figsize=(30, 12))\n", "\n", "rtc_pc.plot(ax=axes[0], vmax=0.4)\n", "axes[0].grid(c=\"red\")\n", "axes[0].set(title=\"Planetary Computer RTC\")\n", "\n", "rtc.plot(ax=axes[1], vmax=0.4)\n", "axes[1].grid(c=\"red\")\n", "axes[1].set(title=\"sarsen RTC\")\n", "\n", "plt.tight_layout();" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.13" }, "widgets": { "application/vnd.jupyter.widget-state+json": { "state": { "64a432e05d4b48e69e42a6ad27e19830": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, "6babbc2397164618b1b16286d26c1192": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "VBoxModel", "state": { "layout": "IPY_MODEL_64a432e05d4b48e69e42a6ad27e19830" } } }, "version_major": 2, "version_minor": 0 } } }, "nbformat": 4, "nbformat_minor": 5 }