InSAR Processing¶
LOS projection, phase conversion, and noise generation functions.
LOS Projection¶
compute_los_vector ¶
Compute unit vector pointing from ground to satellite (LOS direction).
The LOS vector components represent how much of each displacement direction contributes to the measured range change.
| PARAMETER | DESCRIPTION |
|---|---|
incidence_deg
|
Incidence angle from vertical (degrees) 0° = looking straight down, 90° = horizontal
TYPE:
|
heading_deg
|
Satellite heading/azimuth from North (degrees) Measured clockwise from North - Ascending (northward): typically -13° to -10° - Descending (southward): typically -167° to -170°
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
los_e, los_n, los_u : float
|
LOS unit vector components (East, North, Up) Positive values indicate that motion in that direction results in range decrease (motion toward satellite). |
Notes
For a typical Sentinel-1 ascending geometry (inc=33°, head=-13°): - los_e ≈ 0.12 (eastward motion → small range decrease) - los_n ≈ 0.53 (northward motion → range decrease) - los_u ≈ 0.84 (uplift → range decrease)
For descending (inc=33°, head=-167°): - los_e ≈ -0.12 (westward motion → range decrease) - los_n ≈ -0.53 (southward motion → range decrease) - los_u ≈ 0.84 (uplift → range decrease)
Source code in src/eq_insar/insar/projection.py
compute_los_displacement ¶
compute_los_displacement(Ue: ndarray, Un: ndarray, Uz: ndarray, incidence_deg: Optional[float] = None, heading_deg: Optional[float] = None, satellite: Optional[str] = None, orbit: str = 'ascending') -> np.ndarray
Project 3D displacement to satellite line-of-sight (LOS).
Positive LOS displacement = motion toward satellite (range decrease). In interferograms, this corresponds to a particular phase sign (typically negative phase for range decrease with standard convention).
| PARAMETER | DESCRIPTION |
|---|---|
Ue
|
East, North, Up displacement components (meters)
TYPE:
|
Un
|
East, North, Up displacement components (meters)
TYPE:
|
Uz
|
East, North, Up displacement components (meters)
TYPE:
|
incidence_deg
|
Incidence angle from vertical (degrees) Either provide this + heading_deg, or use satellite parameter
TYPE:
|
heading_deg
|
Satellite heading from North (degrees)
TYPE:
|
satellite
|
Satellite name for automatic geometry. Options: 'sentinel1', 'alos2', 'terrasar', 'cosmo', 'radarsat2', etc. If provided, overrides incidence_deg and heading_deg
TYPE:
|
orbit
|
Orbit direction: 'ascending' or 'descending' Only used if satellite is specified
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
d_los
|
Line-of-sight displacement (meters) Positive = motion toward satellite
TYPE:
|
Examples:
>>> import numpy as np
>>> # Using explicit geometry
>>> d_los = compute_los_displacement(Ue, Un, Uz, incidence_deg=33, heading_deg=-13)
>>>
>>> # Using satellite configuration
>>> d_los = compute_los_displacement(Ue, Un, Uz, satellite='sentinel1', orbit='ascending')
Source code in src/eq_insar/insar/projection.py
Phase Conversion¶
displacement_to_phase ¶
displacement_to_phase(displacement_m: ndarray, wavelength_m: float = SENTINEL1_WAVELENGTH_M, satellite: Optional[str] = None) -> np.ndarray
Convert LOS displacement to interferometric phase.
Uses the two-way path relation: phase = -4π * displacement / wavelength
The negative sign follows the convention that: - Range decrease (motion toward satellite) → negative phase - Range increase (motion away from satellite) → positive phase
| PARAMETER | DESCRIPTION |
|---|---|
displacement_m
|
LOS displacement in meters (positive = toward satellite)
TYPE:
|
wavelength_m
|
Radar wavelength in meters (default: Sentinel-1 C-band)
TYPE:
|
satellite
|
Satellite name to automatically use correct wavelength. Overrides wavelength_m if provided.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
phase
|
Interferometric phase in radians (unwrapped)
TYPE:
|
Notes
For Sentinel-1 (λ = 5.55 cm): - 1 cm LOS displacement ≈ 2.26 radians ≈ 0.36 fringes - One fringe (2π) ≈ 2.77 cm LOS displacement
For ALOS-2 (λ = 22.9 cm): - 1 cm LOS displacement ≈ 0.55 radians - One fringe (2π) ≈ 11.5 cm LOS displacement
Source code in src/eq_insar/insar/projection.py
wrap_phase ¶
Wrap phase to [-π, π] interval.
Simulates the inherent phase ambiguity in interferometric measurements.
| PARAMETER | DESCRIPTION |
|---|---|
phase
|
Unwrapped phase in radians
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
wrapped
|
Wrapped phase in [-π, π] radians
TYPE:
|
Source code in src/eq_insar/insar/projection.py
phase_to_displacement ¶
phase_to_displacement(phase: ndarray, wavelength_m: float = SENTINEL1_WAVELENGTH_M, satellite: Optional[str] = None) -> np.ndarray
Convert interferometric phase to LOS displacement.
Inverse of displacement_to_phase.
| PARAMETER | DESCRIPTION |
|---|---|
phase
|
Interferometric phase in radians
TYPE:
|
wavelength_m
|
Radar wavelength in meters
TYPE:
|
satellite
|
Satellite name to automatically use correct wavelength
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
displacement_m
|
LOS displacement in meters
TYPE:
|
Source code in src/eq_insar/insar/projection.py
Noise Models¶
generate_random_noise ¶
generate_random_noise(shape: Tuple[int, int], amplitude_m: float = 0.005, seed: Optional[int] = None) -> np.ndarray
Generate simple random Gaussian noise.
| PARAMETER | DESCRIPTION |
|---|---|
shape
|
Output array shape
TYPE:
|
amplitude_m
|
Standard deviation of noise in meters (default: 5 mm)
TYPE:
|
seed
|
Random seed for reproducibility
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
noise
|
Random noise field in meters
TYPE:
|
Source code in src/eq_insar/insar/noise.py
generate_orbital_ramp ¶
generate_orbital_ramp(shape: Tuple[int, int], ramp_east_m_per_km: float = 0.0, ramp_north_m_per_km: float = 0.0, offset_m: float = 0.0, pixel_size_km: float = 0.5, seed: Optional[int] = None) -> np.ndarray
Generate orbital/baseline error ramp.
| PARAMETER | DESCRIPTION |
|---|---|
shape
|
Output array shape
TYPE:
|
ramp_east_m_per_km
|
East-West gradient in meters per km
TYPE:
|
ramp_north_m_per_km
|
North-South gradient in meters per km
TYPE:
|
offset_m
|
Constant offset in meters
TYPE:
|
pixel_size_km
|
Pixel size in km
TYPE:
|
seed
|
Random seed (for random ramp if gradients not specified)
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ramp
|
Orbital ramp in meters
TYPE:
|