Python bindings for the I2EM surface scattering/emissivity model
Project description
pyi2em
Python bindings for the I2EM rough-surface scattering and emissivity model.
Reference: Ulaby, F.T. and Long, D.G. (2014). Microwave Radar and Radiometric Remote Sensing. University of Michigan Press.
Install
pip install pyi2em
Notes on wheels vs source builds
- PyPI wheels bundle required native libraries, including GSL and embedded cubature routines. End users do not need system packages.
- Source builds require GSL available via pkg-config. The cubature integration code is compiled into the extension automatically.
From source
- Ubuntu:
sudo apt-get install -y cmake build-essential libgsl-dev - macOS:
brew install cmake gsl
Then
pip install .
Note: The cubature library (hcubature/pcubature) is fetched automatically during build; you do not need to install a system package for it. GSL remains a system dependency for source builds.
Development with pixi (recommended for source builds)
pixi provides a fully reproducible build/dev environment from
the lockfile — including the GSL and C++ toolchain — so you do not need to
install any system packages (no apt/brew). The environment is defined in the
[tool.pixi.*] tables of pyproject.toml; pixi.lock pins exact versions.
# Install pixi (one time): https://pixi.sh/latest/#installation
pixi install # resolves toolchain + GSL, builds pyi2em editable
pixi run test # run the test suite
pixi run validate # run the acceptance checks
pixi run example # run example.py
After editing the C++ sources, force a fresh native recompile:
pixi run rebuild
Test
pytest -q
Or, inside the pixi environment: pixi run test.
Usage
The high-level Python API exposes three functions. Units are GHz, meters, and degrees throughout.
- Emissivity
from pyi2em import emissivity
eh, ev = emissivity(
freq_ghz=5.3,
rms_height_m=0.0025,
corr_length_m=0.10,
theta_deg=30.0,
er_complex=complex(11.3, 1.5),
correl="gaussian", # 'exponential' | 'gaussian' | 'x_power' | 'x_exponential'
)
print(eh, ev) # linear emissivities
- Monostatic backscatter (scalar or array incidence)
import numpy as np
from pyi2em import sigma0_backscatter
thetas = np.array([20.0, 30.0, 40.0])
sig = sigma0_backscatter(
freq_ghz=5.0,
rms_height_m=0.01,
corr_length_m=0.05,
theta_deg=thetas, # scalar or array
er_complex=complex(15.0, 3.0),
correl="gaussian",
include_hv=True,
return_db=True, # return dB (default)
)
print(sig["hh"], sig["vv"], sig["hv"]) # arrays in dB
- Bistatic backscatter
from pyi2em import sigma0_bistatic
sig = sigma0_bistatic(
freq_ghz=5.0,
rms_height_m=0.01,
corr_length_m=0.05,
thi_deg=40.0,
ths_deg=40.0,
phs_deg=180.0,
er_complex=complex(15.0, 3.0),
correl="gaussian",
xcoeff=1.0,
return_db=True,
)
print(sig["hh"], sig["vv"]) # dB
Correlation options: 'exponential' | 'gaussian' | 'x_power' | 'x_exponential'.
Notes
- sigma0_* return dB by default; set return_db=False for linear values.
- sigma0_backscatter(theta_deg=...) accepts a scalar or a NumPy array.
- emissivity returns linear values in [0, 1].
Validation
The cross-pol (VH) channel is validated against the published reference from Fung and Chen, Microwave Scattering and Emission Models for Users (Artech House, 2010), Fig. 3.9 — dielectric variation with exponential correlation (f = 5 GHz, σ = 0.3 cm, L = 4 cm). pyi2em reproduces the reference curves to within ~0.3 dB across incidence angles 0–70° and ε_r = 3.5 / 7.5 / 15.
Regenerate with python docs/make_xpol_figure.py; the numerical check lives in
tests/test_xpol_reference.py.
Bistatic (cross-model)
The bistatic model is referenced to the IEM-M single-surface bistatic program (Fung and Chen, 2010, Figs 6.1/6.2 — azimuthal scattering at f = 10 GHz, θ_i = 20°, θ_s = 50°, ε_r = 3, L = 3 cm, exponential). pyi2em implements I2EM (Ulaby & Long 2014) and Fung's reference is IEM-M so this is a labeled cross-model comparison. Away from the specular null the two agree to a median ~0.2 dB across azimuth for σ = 0.2/0.4/0.7 cm. Divergence is limited to a narrow specular-null notch, indicating a small null-position shift between the formulations.
Regenerate with python docs/make_bistatic_figure.py.
Reference
Fung, A.K. and Chen, K.S.(2010), Microwave Scattering and Emission Models for Users, Artech House
Ulaby, F.T. and Long, D.G.(2014), Microwave Radar and Radiometric Remote Sensing, The University of Michigan Press
License and Notices
- Wrapper: MIT (see
LICENSE) - GSL: GPL-licensed dependency; the
NOTICEandCOPYING.GPLfiles are included.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyi2em-0.1.5.tar.gz.
File metadata
- Download URL: pyi2em-0.1.5.tar.gz
- Upload date:
- Size: 352.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fdaeaebc9de85916fb3482200a4b88bd6d183ba4fbefcad965aa252567704815
|
|
| MD5 |
f7559194921245bb9a9bbc4186ece00a
|
|
| BLAKE2b-256 |
6745aea7ca526e546fa80c11a60b7f1a95630c9b70d6ad9073d75b7e22e7fd32
|
File details
Details for the file pyi2em-0.1.5-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pyi2em-0.1.5-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 15.4 MB
- Tags: CPython 3.12, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb49e12e83109af3dc875bee53b8ac0b361c6556867d2c48ea51db7b206b4215
|
|
| MD5 |
c4017fef35c41a7a764d57245fd0dd03
|
|
| BLAKE2b-256 |
fb9bf44724f0dc9b886d535cf3e1e69d84ae21467514472c3492dd7aa894d0a9
|
File details
Details for the file pyi2em-0.1.5-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pyi2em-0.1.5-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 15.4 MB
- Tags: CPython 3.11, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a50ef7d61d82903c6129f30b25e0d0eef4b7ae7ad6dd4a69253835cd3879fe40
|
|
| MD5 |
cee8244f48b6725682b4ee75d6c68eb3
|
|
| BLAKE2b-256 |
6390c6075ffb5410115d79f75e41b1dd30d0eb40a11149f468e728e98d95106c
|
File details
Details for the file pyi2em-0.1.5-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pyi2em-0.1.5-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 15.4 MB
- Tags: CPython 3.10, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d411956fab58171ed7cfcd7951673be71702b41448047c20307f2b2eea562b86
|
|
| MD5 |
ed804a8bbc32104e90d241cff1d831f8
|
|
| BLAKE2b-256 |
6c8767bef572732dd19b6e247342d8b9eaa5b9b0d5a6cbfebeb49e5e235cd7cc
|
File details
Details for the file pyi2em-0.1.5-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pyi2em-0.1.5-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 15.4 MB
- Tags: CPython 3.9, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80299aeb31454a86269b72d7b75732c379164d3b80bd6fd49e75d6552d24afb8
|
|
| MD5 |
0f2b0e62754747f11380620df0d52480
|
|
| BLAKE2b-256 |
e7503bc78508a3e3365d96f6e258bc88b1a353e0737d56cac9d2b002386ac681
|