Model definition and analysis.

About this example

This example shows the basics on how to setup and analyze an RT1 model specification with the rt1 python package .

Hide code cell source
%matplotlib widget
import matplotlib.pyplot as plt
from rt1_model import RT1, surface, volume, set_loglevel
set_loglevel("debug")

Define the used volume- and surface-scattering phase function

# Parameterized HenyeyGreenstein function used as volume-scattering phase function
V = volume.HenyeyGreenstein(t="t_v", ncoefs=6)

# Parameterized linear-combination of BRDFs used as surface-scattering phase function
SRF_1 = surface.HG_nadirnorm(t="t_s", ncoefs=6, a=[1, 1, 1])
SRF_2 = surface.HG_nadirnorm(t="-t_s", ncoefs=6, a=[-1, 1, 1])

SRF = surface.LinComb([("x", SRF_1), ("1 - x", SRF_2)])

Visualize distribution functions as polarplots

# visualize V and SRF as polarplots
f, axes = plt.subplots(2, 2, figsize=(10, 8), subplot_kw=dict(projection='polar'))
f.canvas.header_visible = False
for ax, t_v in zip(axes[0], [0.15, 0.4]):
    V.polarplot(param_dict=dict(t_v=t_v), ax=ax, legend=False, label=f"Volume-Scattering Phase Function with (t_v={t_v})")
for ax, x, t_s in zip(axes[1], [0.75, 0.25], [0.4, 0.4]):
    SRF.polarplot(param_dict=dict(x=x, t_s=t_s), legend=False, groundcolor=".7", ax=ax, label=f"BRDF with (t_s={t_s}, x=0.75)")
f.tight_layout()
plt.show()

Plot the incidence-angle dependency of the hemispherical reflectance of the BRDF

# check incidence-angle dependency of hemispherical reflectance of the surface BRDF
SRF.hemreflect(param_dict=dict(t_s=0.15, x=0.5, NormBRDF=0.1))

Setup RT1 model and analyze resulting backscattering coefficient

# Setup RT1 model
R = RT1(V=V, SRF=SRF, int_Q=True, sig0=True, dB=True)

Analyze monostatic backscattering coefficient

R.dB = True # Create monostatic plots in dB

# setup parameter ranges to analyze monostatic results
a1 = R.analyze(
    t_s=(0.01, 0.4),
    t_v=(0.01, 0.4, 0.01),
    x=(0, 1),
    omega=(0,1),
    tau=(0,1),
    NormBRDF=(0, .4),
    bsf=(0, 1)
    )

Analyze 3D scattering distribution

R.dB = False   # Create 3D plots in linear units

# setup parameter ranges to analyze bistatic results
a0 = R.analyze3d(
    contributions="tsv",
    t_s=(0.01, 0.5),
    t_v=(0.01, 0.5),
    x=(0, 1),
    omega=(0, 1),
    tau=(0, 1),
    NormBRDF=(0, 0.4),
    bsf=(0, 1),
)