Skip to content

Commit

Permalink
Built site for gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Quarto GHA Workflow Runner committed Jan 9, 2025
1 parent 9c46991 commit 1dcb5bc
Show file tree
Hide file tree
Showing 12 changed files with 141 additions and 141 deletions.
2 changes: 1 addition & 1 deletion .nojekyll
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dfbb5838
efd6f0d1
36 changes: 18 additions & 18 deletions chapters/courses/microwave-remote-sensing/01_in_class_exercise.html

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions chapters/courses/microwave-remote-sensing/02_in_class_exercise.html

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ <h2 id="toc-title">Table of contents</h2>


<p>In this notebook, we will introduce some of the steps involved in the processing of Sentinel-1 Level1 Ground Range Detected (<code>GRD</code>) data to <span class="math inline">\(\sigma^0\)</span> (<code>sig0</code>) and <span class="math inline">\(\gamma^0\)</span> (<code>gmr</code>). Moreover, the notebook illustrates the importance and impact of geometric and radiometric terrain correction. As the processing of SAR data is a very time and hardware-intense task, we won’t perform the actual processing in this notebook. Instead, data at different processing steps is illustrated to highlight the impact of the processing steps.</p>
<div id="9e2fb2ca" class="cell" data-execution_count="1">
<div id="9e2fb2ca" class="cell" data-execution_count="2">
<div class="sourceCode cell-code" id="cb1"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> numpy <span class="im">as</span> np</span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> xarray <span class="im">as</span> xr</span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> intake</span>
Expand Down Expand Up @@ -958,7 +958,7 @@ <h2 id="toc-title">Table of contents</h2>
<section id="loading-backscatter-data" class="level2" data-number="3.1">
<h2 data-number="3.1" class="anchored" data-anchor-id="loading-backscatter-data"><span class="header-section-number">3.1</span> Loading Backscatter Data</h2>
<p>We first load our data from the following <a href="https://intake.readthedocs.io/en/latest/">intake</a> catalog. Intake is somewhat similar to STAC in that it makes it easy to discover and load data. More importantly, this package allows us to hide some of the complexities involved with getting the data in the right format, which are not of concern in this notebook.</p>
<div id="52592eb8" class="cell" data-execution_count="2">
<div id="52592eb8" class="cell" data-execution_count="3">
<div class="sourceCode cell-code" id="cb2"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a>url <span class="op">=</span> <span class="st">"https://huggingface.co/datasets/martinschobben/microwave-remote-sensing/resolve/main/microwave-remote-sensing.yml"</span></span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a>cat <span class="op">=</span> intake.open_catalog(url)</span>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a>gtc_dc <span class="op">=</span> cat.gtc.read()</span>
Expand Down Expand Up @@ -1413,7 +1413,7 @@ <h2 data-number="3.2" class="anchored" data-anchor-id="geometric-terrain-correct
<p><img src="https://www.esri.com/arcgis-blog/wp-content/uploads/2024/05/emenezes-esriBlog-GP-tool-fig_Apply-Geometric-Terrain-Correction-detailed.png" class="img-fluid"></p>
<p><em>Figure 1: Geometric terrain correction. The lower bar shows the GRD without geometric terrain correction in slant geometry. In areas where the ground is elevated, the time of the signal to travel to the earth’s surface and back to the sensor is distorted, causing geometric shifts (foreshortening, lengthening, etc). Using a DEM and the Range Doppler Terrain Correction, the distortions are corrected and the image is orthorectified. (Source: ESRI)</em></p>
<p>Let’s visualize this geometric terrain correction (GTC) with some actual data using the <code>xarray</code> method <code>hvplot</code> of the <code>gtc_dc</code> object.</p>
<div id="3ac8e86f" class="cell" data-execution_count="3">
<div id="3ac8e86f" class="cell" data-execution_count="4">
<div class="sourceCode cell-code" id="cb3"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a>gtc_dc.hvplot.image(x<span class="op">=</span><span class="st">"x"</span>, y<span class="op">=</span><span class="st">"y"</span>, robust<span class="op">=</span><span class="va">True</span>, data_aspect<span class="op">=</span><span class="dv">1</span>, cmap<span class="op">=</span><span class="st">"Greys_r"</span>,</span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a> groupby<span class="op">=</span><span class="st">"band"</span>, rasterize<span class="op">=</span><span class="va">True</span>).<span class="op">\</span></span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a> opts(frame_height<span class="op">=</span><span class="dv">600</span>, framewise<span class="op">=</span><span class="va">False</span>, aspect<span class="op">=</span><span class="st">"equal"</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
Expand Down Expand Up @@ -1498,7 +1498,7 @@ <h2 data-number="3.2" class="anchored" data-anchor-id="geometric-terrain-correct
<p><img src="../../images/side_looking_image_distortions.png" class="img-fluid"></p>
<p><em>Figure 3: Side Looking radar distortions (script Chapter 4).</em></p>
<p>Foreshortening can be spotted by eye, as it often has a radiometric consequence, where unusually bright areas fringe mountain ridges; a phenomenon called “highlighting”. This geometric artifact occurs due to the compression of the distance in the image of slopes facing the radar system and the consequentially higher density of scatterers per unit length. Now let’s zoom in on an example from the same datacube and display the original and corrected values side-by-side.</p>
<div id="5426d1a2" class="cell" data-execution_count="4">
<div id="5426d1a2" class="cell" data-execution_count="5">
<div class="sourceCode cell-code" id="cb4"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a>for_dc <span class="op">=</span> gtc_dc.sel(x<span class="op">=</span><span class="bu">slice</span>(<span class="fl">9.651</span>, <span class="fl">9.706</span>), y<span class="op">=</span><span class="bu">slice</span>(<span class="fl">47.134</span>, <span class="fl">47.079</span>)).band_data</span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a>fig, ax <span class="op">=</span> plt.subplots(<span class="dv">1</span>, <span class="dv">2</span>, figsize<span class="op">=</span>(<span class="dv">20</span>, <span class="dv">8</span>))</span>
Expand Down Expand Up @@ -1542,7 +1542,7 @@ <h2 data-number="3.2" class="anchored" data-anchor-id="geometric-terrain-correct
<section id="backscattering-coefficients" class="level2" data-number="3.3">
<h2 data-number="3.3" class="anchored" data-anchor-id="backscattering-coefficients"><span class="header-section-number">3.3</span> Backscattering Coefficients</h2>
<p>In this chapter, we will look at some of the different backscatter coefficients in more detail (<span class="math inline">\(\sigma^0_E\)</span> or <span class="math inline">\(\gamma^0_E\)</span>), where both coefficients are geometrically terrain corrected. The difference is the plane of the reference area, which is the ground area as a tangent on an ellipsoidal Earth model for <span class="math inline">\(\sigma^0_E\)</span> and perpendicular to the line of sight for <span class="math inline">\(\gamma^0_E\)</span> (Figure 5). For this, we load a new datacube which includes <span class="math inline">\(\sigma^0_E\)</span> and the Incidence Angle for each pixel. We visualize the cube with the same method as before.</p>
<div id="ee8466c4" class="cell" data-execution_count="5">
<div id="ee8466c4" class="cell" data-execution_count="6">
<div class="sourceCode cell-code" id="cb5"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a>coef_dc <span class="op">=</span> cat.coef.read()</span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a>coef_dc.hvplot.image(x<span class="op">=</span><span class="st">"x"</span>, y<span class="op">=</span><span class="st">"y"</span>, robust<span class="op">=</span><span class="va">True</span>, data_aspect<span class="op">=</span><span class="dv">1</span>, cmap<span class="op">=</span><span class="st">"Greys_r"</span>,</span>
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a> groupby<span class="op">=</span><span class="st">"band"</span>, rasterize<span class="op">=</span><span class="va">True</span>).<span class="op">\</span></span>
Expand Down Expand Up @@ -1627,7 +1627,7 @@ <h2 data-number="3.3" class="anchored" data-anchor-id="backscattering-coefficien
<p>In Figure 5 we can see the incidence angle image of our scene. We can see, that it depicts the differences between near to far range, but not the actual terrain as it refers to the ellipsoid. The slight patterns of the terrain that are visible are originating from the geometric terrain correction. We will use this information now to convert our (<span class="math inline">\(\sigma^0_E\)</span> to <span class="math inline">\(\gamma^0_E\)</span>) with the following equation (equation 6.20 in the script):</p>
<p><span class="math display">\[ \gamma^0_E = \sigma^0_E / \cos(\theta_i) \]</span></p>
<p>We can perform this transformation with basic <code>numpy</code> operations on the <code>xarray</code> datacube.</p>
<div id="387ca672" class="cell" data-execution_count="6">
<div id="387ca672" class="cell" data-execution_count="7">
<div class="sourceCode cell-code" id="cb6"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="co"># linear scale</span></span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a>sig0_db <span class="op">=</span> (coef_dc.sel(band<span class="op">=</span><span class="st">"sig0_gtc"</span>) <span class="op">/</span> <span class="dv">10</span>)</span>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a>sig0_lin <span class="op">=</span> <span class="dv">10</span> <span class="op">**</span> (coef_dc.sel(band<span class="op">=</span><span class="st">"sig0_gtc"</span>) <span class="op">/</span> <span class="dv">10</span>)</span>
Expand Down Expand Up @@ -1726,7 +1726,7 @@ <h2 data-number="3.3" class="anchored" data-anchor-id="backscattering-coefficien
<section id="radiometric-terrain-correction" class="level1" data-number="4">
<h1 data-number="4"><span class="header-section-number">4</span> Radiometric Terrain Correction</h1>
<p>So far, we corrected geometric distortions and compared the impact of the choice of the reference area. However, we still haven’t corrected the backscatter intensity of pixels which are distorted by the terrain. In this last step, we will show that we can also correct radiometric artifacts to a certain degree. For this, we will load radiometrically terrain corrected (<code>rtc</code>) <span class="math inline">\(\gamma^0_T\)</span> and plot it along the other coefficients.</p>
<div id="28a619ec" class="cell" data-execution_count="7">
<div id="28a619ec" class="cell" data-execution_count="8">
<div class="sourceCode cell-code" id="cb7"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a>rtc_dc <span class="op">=</span> cat.rtc.read()</span>
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a><span class="co"># add to existing cube</span></span>
Expand Down
Loading

0 comments on commit 1dcb5bc

Please sign in to comment.