Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

radiomax: observation geometry and radiometry on any array library

radiomax converts and locates what a sensor saw: solar and viewing angles per pixel, the Earth–Sun distance, the conversions from counts to radiance to reflectance, Planck and brightness temperature, the geometric air-mass factor, parallax and geostationary navigation, swath and bowtie geometry, and the empirical retrievals applied pixel by pixel. It sits at GeoNumerics tier 1 and has no state to retrieve; radiative transfer, which does, is radtrax’s. Status: built.

At a glance

Layer, tierGeoNumerics, tier 1
Importsgeophysix, array-api-compat, NumPy; JAX and xarray optional
Imported byradtrax; geoops, geoproducts
Takes overgeoops radiometry (counts, radiance, reflectance, a scene-centre solar zenith, Earth–Sun distance, brightness temperature); the bowtie and parallax maths in geoops geom; the brightness-temperature copies in geoproducts; geostationary navigation from geoproducts; from radtrax, Planck’s law and the monochromatic brightness temperature, the air masses, the Earth–Sun distance, the Ross–Li kernels and the spectral response matrices
Does not ownradiative transfer and full air-mass factors (radtrax); spectral indices (geoops); SRF tables (georeader); cell corners and areas of a swath (gridax)
Statusbuilt in radiomax (v0.0.8, 23 Nov 2026)
Tracked ingeostack#300; the layer map and its section “radiomax and radtrax: where the line is”; the companion geophysix and integrix designs
where radiomax sits · GeoNumerics tier 1

Where radiomax sits · geonumerics tier 1.

The test that places a name, from the layer map: does it need a model of radiation moving through the atmosphere? Then it is radtrax’s. Is it geometry, a unit conversion, or an empirical formula with fitted coefficients applied pixel by pixel? Then it is radiomax’s. The import goes one way, radtrax to radiomax. This page is the design; core types, algorithms and the code survey are in radiomax: design details.

The problem

Before a matched filter or a retrieval sees a methane pixel, the scene is calibrated, located and converted, and each of those steps is coded more than once:

StepWhat it computesWhere it is coded today
Counts to radianceL = g · DN + o, with a gain and offset per bandgeoops dn_to_radiance and DNToRadiance; geoproducts’ Himawari _calibrate and GOES calibration_coefficients
Radiance to top-of-atmosphere reflectanceρ = π L d² / (E₀ cos θₛ)geoops RadianceToReflectance, earth_sun_distance_correction_factor, compute_sza; and lazy calls into georeader.reflectance
The geometric air-mass factor of the target signatureAMF = 1 / cos θₛ + 1 / cos θᵥradtrax atmosphere/geometry.py
Cloud screening in the thermal bands of GOES and Himawaribrightness temperature from radiancegeoops bt_from_radiance; geoproducts’ Himawari _brightness_temperature; geoproducts’ GOES L1B formula; radtrax radiometry/brightness.py
Where a plume at height H really is, seen from geostationary orbitparallax and fixed-grid navigationgeoops GeostationaryParallaxCorrect; geoproducts _src/geostationary.py
Band averages over a spectral responsef̄ = ∫ f R dλ / ∫ R dλgeoops, through georeader; radtrax instrument/srf.py, instrument/spectral.py, geo/srf.py
VIIRS and MODIS scan geometrybowtie detector positionsgeoops bowtie_detector_positions and BowtieCorrection

Brightness temperature is written three times in geotoolz and once in radtrax. What geoops holds lives inside its Operators, so radtrax, which sits on plain arrays, cannot reuse it without importing a GeoStack toolkit; what radtrax holds needs JAX, so geoops and geoproducts cannot reuse that either.

Angles, units and fitted formulas

Everything radiomax computes is a function of a pixel’s position, the time, the sensor and a few coefficients. None of it follows light through the air.

Solar geometry. With δ the solar declination and ω the hour angle at time t, the solar zenith angle θₛ at latitude φ is

cos⁡θs=sin⁡φsin⁡δ+cos⁡φcos⁡δcos⁡ω\cos\theta_s = \sin\varphi \sin\delta + \cos\varphi \cos\delta \cos\omega

and the Earth–Sun distance d(t), in astronomical units, scales the solar irradiance by 1 / d².

Viewing geometry. From the satellite’s position s and the pixel’s position p, both in Earth-centred coordinates from geophysix, the line of sight is s − p; its angle from the local vertical is the view zenith θᵥ, and its direction in the local east–north plane is the view azimuth. The relative azimuth and the scattering angle follow from the solar and viewing directions.

Radiometry. Counts become radiance through a gain g and offset o, and radiance becomes top-of-atmosphere reflectance through the band’s solar irradiance E₀:

L=g⋅DN+oL = g \cdot DN + o
ρTOA=πLd2E0cos⁡θs\rho_{\mathrm{TOA}} = \frac{\pi L d^2}{E_0 \cos\theta_s}
E0=∫E⊙(λ)R(λ)dλ∫R(λ)dλE_0 = \frac{\int E_\odot(\lambda) R(\lambda) d\lambda}{\int R(\lambda) d\lambda}

with R(λ) the band’s spectral response; the two integrals are weighted sums, or, for a response tabulated on another grid, the exact integrals of radiomax#23.

Thermal bands. Planck’s law gives the radiance of a black body at temperature T, with h, c and k_B from geophysix:

B(λ,T)=2hc2λ51exp⁡(hc/(λkBT))−1B(\lambda, T) = \frac{2 h c^2}{\lambda^5} \frac{1}{\exp(h c / (\lambda k_B T)) - 1}

A sensor’s brightness temperature inverts it with band coefficients; GOES, for one, publishes T = (fₖ₂ / ln(fₖ₁ / L + 1) − b₁) / b₂.

Geometric air-mass factor. The path length through a plane-parallel atmosphere, down to the surface and back up to the sensor, relative to the vertical:

AMF=1cos⁡θs+1cos⁡θv\mathrm{AMF} = \frac{1}{\cos\theta_s} + \frac{1}{\cos\theta_v}

The full air-mass factor, with scattering weights per layer, is radtrax’s.

Parallax. A cloud or plume at height H, seen at view zenith θᵥ, appears displaced along the view azimuth by H tan θᵥ; geostationary navigation maps a sensor’s scan angles to latitude and longitude on geophysix’s ellipsoid.

Empirical retrievals. Formulas with fitted coefficients, applied pixel by pixel: split-window sea- and land-surface temperature from two thermal bands, SST = a₀ + a₁ T₁₁ + a₂ (T₁₁ − T₁₂) + a₃ (sec θᵥ − 1); ocean-colour band ratios; and kernel BRDF, R = f_iso + f_vol K_vol + f_geo K_geo, with fixed Ross–Li kernels and fitted weights.

Modules and boundaries

Six modules. Each takes arrays of any array-API library, or DataArrays (angles, radiances, coefficients), and returns the same kind; sensor metadata such as calibration coefficients and spectral responses arrive as arguments from the readers.

ModuleOwnsComes from
radiomax.geometrysolar position and zenith, Earth–Sun distance, viewing angles, relative azimuth and scattering angle, air masses, parallax, geostationary navigation, swath and bowtie scan geometrygeoops compute_sza, earth_sun_distance_correction_factor, bowtie_detector_positions, the maths of GeostationaryParallaxCorrect; geoproducts on_earth; radtrax’s air masses and earth_sun_distance
radiomax.radiometrycounts to radiance and back, radiance to reflectance and back, band averages, response matrices and band solar irradiance, spectral densitiesgeoops dn_to_radiance, radiance_to_dn, dn_to_reflectance; the lazy georeader.reflectance calls; radtrax’s response matrices
radiomax.thermalPlanck’s law, brightness temperature and its inverse, from band coefficients or a spectral responseradtrax radiometry/planck.py and the monochromatic half of brightness.py; geoops bt_from_radiance; geoproducts’ Himawari _brightness_temperature and GOES L1B formula
radiomax.retrievalssplit-window SST and LST, ocean-colour ratios, Ross–Li BRDF and NBARthe Ross–Li kernels from radtrax surface/ross_li.py; the rest is new
radiomax.sarSAR calibration to σ⁰, β⁰ and γ⁰, and the conversions between themnew
radiomax.altimetryaltimetry range corrections (dry and wet tropospheric, ionospheric, inverse barometer) and the sea surface heightnew

What radiomax owns, and what it hands off

Neighbourradiomax ownsThe neighbour ownsThe line
radtraxangles, unit conversions, the geometric air-mass factor, Planck with band coefficientsradiative transfer, spectroscopy, full air-mass factors, the instrument model that applies a response matrix to a modelled spectrum, band brightness temperature (a solve through an instrument), methane retrievalsdoes it need radiation moving through an atmospheric state? Then radtrax
geoopsthe mathsOperators on GeoArray, spectral indices, masks, dark-object subtraction (a percentile over a scene)geoops’ radiometry Operators stay and call radiomax
geoproductsnavigation and brightness-temperature mathsreaders, file formats, the calibration coefficients as metadataa reader passes its coefficients to radiomax
georeadernothing of its ownthe SRF tables, read-only (spaceml-org’s)SRFs arrive as arrays; radiomax does not import georeader
geophysixsensor geometrythe Earth, its constants, h, c, k_Bradiomax reads geophysix for every constant
gridaxthe scan geometry of a swaththe cell corners and areas of a swath gridhow a sensor scanned is radiomax’s; the grid it produced is gridax’s
integrix, functaxthe band average, with its own trapezoid weightsquadrature rules and integration on JAXboth need JAX, so they are test references; a functax rule’s weights plug in through weights=

What moves in

FromWhatIts users then import
geoops radiometrythe array functions in _src/array.py and _src/solar.pyradiomax; the Operators stay in geoops and call it
geoops geombowtie and parallax mathsradiomax; the Operators stay
geoproductsHimawari and GOES brightness temperature; on_earthradiomax; the readers, scan_angle_transform and geos_crs stay
radtraxPlanck and its views, the monochromatic brightness temperature, both air masses, the Earth–Sun distance, the Ross–Li kernels, the response matrices, the relative azimuthsradiomax; ViewingGeometry, RossLi, the band brightness temperature, the instruments and the readers stay
geoops (via georeader)the lazy georeader.reflectance callsradiomax, with georeader as a test reference

In use

A methane scene from counts to the inputs a matched filter needs: angles, reflectance, the air-mass factor of the target signature, and a brightness temperature for cloud screening. Every radiomax name is proposed.

# Shapes: B bands; Ny × Nx pixels; W wavelengths of the spectral responses

import geophysix as gpx
import radiomax as rmx

# --- angles ---
# proposed (radiomax), on the host
# () datetime64 → (), ()
day, seconds = rmx.geometry.utc_day_seconds(time)
# proposed (radiomax)
# cos θₛ = sin φ sin δ + cos φ cos δ cos ω
solar_zenith = rmx.geometry.solar_zenith(lon, lat, day, seconds)  # → (Ny, Nx)
# proposed (radiomax)
# θᵥ = angle between the line of sight s − p and the local vertical
view_zenith, view_azimuth = rmx.geometry.view_angles(  # → (Ny, Nx), (Ny, Nx)
    lon, lat, *satellite_position, earth=gpx.earth.WGS84
)
# proposed (radiomax)
# d(t), in astronomical units
distance = rmx.geometry.earth_sun_distance(day, seconds)  # → ()

# --- counts to reflectance ---
# proposed (radiomax)
# L = g · DN + o, per band
radiance = rmx.radiometry.counts_to_radiance(counts, gain, offset)  # (B, Ny, Nx)
# proposed (radiomax)
# E₀ = ∫ E⊙ R dλ / ∫ R dλ
irradiance = rmx.radiometry.band_irradiance(  # (W,), (B, W), (W,) → (B,)
    solar_spectrum, responses, wavelength
)
# proposed (radiomax)
# ρ = π L d² / (E₀ cos θₛ)
reflectance = rmx.radiometry.reflectance(  # (B, Ny, Nx) → (B, Ny, Nx)
    radiance, irradiance[:, None, None], solar_zenith, distance
)

# --- what the matched filter and the cloud screen need ---
# proposed (radiomax)
# AMF = 1 / cos θₛ + 1 / cos θᵥ
air_mass = rmx.geometry.air_mass_factor(solar_zenith, view_zenith)  # → (Ny, Nx)
# proposed (radiomax)
# T = (fₖ₂ / ln(fₖ₁ / L + 1) − b₁) / b₂
brightness = rmx.thermal.brightness_temperature_band(  # (Ny, Nx) → (Ny, Nx)
    thermal_radiance, coefficients
)

radtrax takes solar_zenith, view_zenith and air_mass as inputs to its forward model and builds the target signature from them; nothing in this block models the atmosphere.

Integration across the stack

Three libraries import radiomax. geoops and geoproducts keep their Operators and readers and call radiomax inside them; radtrax dropped its copies. plumax computes no angles or radiometry of its own and takes them from radtrax.

ConsumerUsed beforeWith radiomax
radtraxits own Planck, air masses, Ross–Li kernels, response matrices and Earth–Sun distanceradiomax; keeps radiative transfer and the instrument model
geoopsradiometry array functions, bowtie and parallax maths, lazy georeader.reflectance callsthe same Operators, calling radiomax; ApplySRF keeps georeader’s rule (geotoolz#764)
geoproductsHimawari and GOES brightness temperature; geostationary navigationradiomax inside the readers, still without JAX; the calibration coefficients stay reader metadata
xropsnothingno wrappers: radiomax takes and returns DataArrays (geotoolz#719)

For a geoops user nothing changes; for a library below GeoStack the import moves down:

# Today:
# today (geoops)
from geoops.radiometry import bt_from_radiance

# After:
# proposed (radiomax)
from radiomax.thermal import brightness_temperature

No deprecated alias is kept; geoops’ BTFromRadiance Operator keeps its name.

Decisions and open questions

All decided on 23 Nov 2026: nine by the owner in radiomax#15, which holds the measurements, and geostack#300; decisions 5 and 7 as recommended, in radiomax#45 and radiomax#69. Each entry gives the position first, then the trade-off.

1. Layer and dependencies: GeoNumerics tier 1, on NumPy, geophysix and array-api-compat

Decided (5 and 23 Nov 2026). radiomax imports geophysix and nothing else from the stack, so radtrax can use it on plain arrays and geoops and geoproducts can use it without JAX. integrix requires JAX, and functax’s quad and interp need its jax extra, so both are reference libraries in the tests. array-api-compat is required, because without it an array that has no __array_namespace__ falls back to NumPy silently.

2. The line with radtrax

Decided (5 and 23 Nov 2026). Geometry, unit conversions and empirical formulas with given coefficients are radiomax’s; anything that needs radiation moving through an atmospheric state is radtrax’s. As much as possible moves out of radtrax: what solves through an instrument, reads a file or is an Equinox module stays. Kernel BRDF falls on radiomax’s side (fixed kernels, fitted weights, no path). For spectral responses, radiomax builds the matrix and radtrax’s instruments apply it. Planck’s law and the Ross–Li kernels keep exact gradients without radtrax’s hand-written derivatives.

3. Spectral responses and coefficients arrive as arguments

Decided (23 Nov 2026). The SRF tables stay in georeader, which is spaceml-org’s and read-only to us. radiomax reads no files and never imports georeader: a reader or a geoops Operator loads the SRF and the calibration coefficients and passes arrays in.

4. Replace the lazy calls into georeader.reflectance

Decided (23 Nov 2026). geoops reaches into georeader.reflectance for counts, radiance and reflectance conversions. Those become radiomax calls, with georeader’s results kept as the test reference.

5. Coefficient tables as data

Decided (23 Nov 2026). Split-window, ocean-colour and BRDF coefficients differ by sensor and by version, so they are arguments, and a formula has no sensor in it. A table ships only where a published one has been read at its source, as plain data, one record per sensor and version. One does: NASA’s ocean-colour coefficients. Split window ships none.

6. Which solar-position algorithm

Decided (23 Nov 2026). The Astronomical Almanac formulas, for the solar position and the Earth–Sun distance; no SPA option until a user needs one. Over 2000–2050 the zenith is within 0.0121° of SPA, and the distance within 8.7 × 10⁻⁵ AU. The formula geoops and radtrax use for the distance is off by up to 8.0 × 10⁻⁴ AU, so switching moves a reflectance by up to 1.5 × 10⁻³ relative.

7. SAR and altimetry: now or when needed?

Decided (23 Nov 2026). Despeckling is a window filter and not a per-pixel formula, so it stays in geoops; it can move when a JAX consumer needs it. SAR calibration and the altimetry corrections with a closed form are built, although no consumer asks for them yet. The sea state bias is empirical and belongs to a retracker, so the caller supplies it.

8. Arrays, labels and units

Decided (23 Nov 2026). One implementation in the Python array API standard, as in geophysix, for NumPy, JAX, CuPy and others. A DataArray in gives a DataArray out, through xr.apply_ufunc; an array type the backend does not know raises. Degrees by default with degrees=False, SI otherwise, records as keyword arguments, frozen dataclasses registered as JAX pytrees only when JAX is importable.

9. Time is two arrays

Decided (23 Nov 2026). day, UTC midnights since 2000-01-01, and seconds of the UTC day, fraction included. JAX runs in float32 by default, where a Julian date resolves a quarter of a day; the split keeps the solar zenith within 0.0124° of SPA in float32.

10. Planck’s axis

Decided (23 Nov 2026). Wavenumber in cm⁻¹ and radiance in W m⁻² sr⁻¹ (cm⁻¹)⁻¹, as radtrax has it, with views per µm and per GHz. The argument is named wavenumber_cm.

11. Where the repository lives

Decided (23 Nov 2026). Standalone, outside the workspaces that geostack#254 discusses.

Roadmap

Six waves, each an epic in the radiomax repository. Geometry and radiometry come first: they end the most copies and every methane retrieval needs them.

WaveDeliversEndsNeeds
0. Scaffold and the array backendthe repository from the library template; CI, capability index; the array backend; the test harness with pvlib, georeader and stored radtrax values—geophysix wave 1
1. Geometry and radiometrysolar and viewing angles, Earth–Sun distance, air masses, counts, radiance and reflectance, band averages and response matricesgeoops’ radiometry arrays; the lazy georeader calls (decision 4)0
2. Thermal and navigationPlanck and brightness temperature; parallax, geostationary navigation, bowtie geometrythe brightness-temperature copies; the navigation and parallax maths in geoproducts and geoops1
3. Empirical retrievalsRoss–Li BRDF and NBAR, split-window SST and LST, ocean-colour ratios, with coefficient tables as data (decision 5)radtrax’s kernels1
4. SAR and altimetrySAR calibration and altimetry corrections (decision 7)—1
5. Consumers switchradtrax, geoops and geoproducts onto radiomaxthe remaining copies1–3

Waves 2, 3 and 4 can run side by side. Wave 5 is one issue per consumer, filed in that consumer’s repository and linked to the radiomax epic.

Sources

References
  1. Reda, I., & Andreas, A. (2004). Solar position algorithm for solar radiation applications. Solar Energy, 76, 577–589.
  2. NOAA, & NASA. (n.d.). GOES-R Series Product Definition and Users’ Guide, Volume 3: Level 1b Products. NOAA.
  3. Lucht, W., Schaaf, C. B., & Strahler, A. H. (2000). An algorithm for the retrieval of albedo from space using semiempirical BRDF models. IEEE Transactions on Geoscience and Remote Sensing, 38(2), 977–998.