Missing operators: filters, grid transfer, integral operators and persistence
Design · the priority-1 operator gaps of the operator curriculum, in functax, integrix, pyrox-xtreme and plumax
4 Dec 2026 · draft for review
Status: decisions GS-D1 to GS-D9 (§11) and open questions GS-O1 to GS-O6 (§12) await review. Sections are numbered by hand so that the cross-references (§4.9, §5) stay fixed.
Repositories: functax (F1 to F3), integrix (I1, I3 to I5), radiomax (I2), pyrox-xtreme (X1, X2), plumax (X3 and the plume kernel); gridax, radtrax and radiomax adopt the new operators.
Prototype: every number on this page comes from
prototypes/missing_operators.py(NumPy, float64; runs in about a second), checked against functax, integrix, gaussx, pyrox and plumax atmainon 4 Dec 2026. §5 lists what it measured, andtests/test_missing_operators_prototype.pyreruns it in CI and checks that table against its output.Related: Probabilistic numerics (BayesCG, Bayesian quadrature and the ODE filter, now landed), functax and integrix designs, integrix over space, Stack layer map, and filterax’s Sequential Monte Carlo design, whose layout this page follows. The operator curriculum and the ranked list of 32 gaps it is drawn from are draft pages outside this repository; the gap rows cited below refer to that list.
TL;DR¶
Eleven additions in four packages close the nine priority-1 gaps of the ranked gap list (Related, above), plus Fredholm and Volterra operators, which cost little once the integral operator exists.
functax gains filters as plans with adjoints (F1), a
transfermodule for prolongation, restriction and Galerkin coarse operators (F2), and the trace onto a curve (F3). The placement rule is unchanged: functax changes a function’s representation, integrix integrates against a measure (GS-D1).Filters need explicit adjoints, but not everywhere. The prototype found that a symmetric Gaussian under the reflect, wrap or constant boundary is exactly self-adjoint, while mirror and nearest are not (relative asymmetry 0.09 and 0.18, all of it in the edge cells), and a masked normalised convolution is far from it (0.84). A plan therefore carries its adjoint and a
self_adjointflag per boundary mode (GS-D2).integrix gains
integrix.operator, an integral operator on a functax rule and integrix’s existingKernelLikeprotocol (I1), second-kind Fredholm solves (I4) and causal Volterra operators (I5); andintegrix.green, a few free-space Green’s kernels with the plume kernel left to plumax (I3). The quadrature discretisation is never callednystrom, to keep it apart from kernellib’s landmark Nyström (GS-D5).The spectral response is radiomax’s already.
radiomax.radiometry.response_matrixis exact on any grid and has its adjoint (jejjohnson/radiomax#23), and radiomax builds the response matrix by the owner’s decision of 23 Nov 2026 (jejjohnson/radtrax#307). What it lacks is a compact form for narrow bands, which touch 7 % of a fine grid; radiomax gains one (I2, GS-D6).The trace matters when the wind is oblique. A one-pixel strip across a Gaussian plume recovered the emission rate exactly when the wind ran along a grid axis, but overestimated it by 12 % at 200 m and 2.5 % at 500 m with the wind at 30°; the trace with a line rule was within 0.04 % in every case (GS-D4).
Persistence gains two operators on intensities in pyrox-xtreme, a retention built from an overpass schedule and cloud mask (X1) and a Markov-modulated Poisson process for sources that switch on and off (X2), and conditional persistency for history-dependent sources in plumax (X3) (GS-D8).
The duty cycle is not a detail. For a source on 2 days in 20 and emitting five events a day while on, the probability of an event in the next week is 0.35; a Poisson intensity with the same mean rate says 0.97.
Hawkes and renewal persistency need no simulation for two of plumax’s three metrics. Until the next event, a history-dependent intensity evolves without new events, so the occurrence probability and the wait time have closed forms given the complete history; only the expected count needs simulation (§4.9). With thinned detections the history is incomplete and the closed forms do not apply.
First release: steps S1 to S7 of §13.
1 Motivation¶
The curriculum’s running example has two layers, and each lacks operators.
One scene. The forward model of a methane retrieval from one shortwave-infrared scene is a composition:
where Q is the emission rate (kg s⁻¹), 𝒢 the Green’s operator that maps it to a column enhancement ΔΩ (kg m⁻²), 𝒩_BL the Beer–Lambert attenuation of the high-resolution radiance, 𝒞_SRF the convolution of that radiance with each band’s spectral response, ℬ the point-spread blur, 𝒮 the sampling onto pixels and the restriction to a coarser band’s grid, y the observed radiances and ε the noise. The retrieval minimises a misfit 𝒥(Q), so it needs the chain’s adjoints in reverse:
with R the noise covariance, a star the adjoint and 𝒩′ the Jacobian of Beer–Lambert. Three of the five links exist only as code inside one application or as functions without adjoints: 𝒢 is plumax’s ColumnPlume, evaluated per source with no operator or adjoint, ℬ is functax.filter.gaussian_filter with no adjoint, and the restriction in 𝒮 is private to gridax’s multigrid. 𝒞_SRF is radiomax’s response_matrix, with apply_response_adjoint as its adjoint, but it is stored dense. The transect flux that checks a retrieved Q against the plume, Φ = ∫ ΔΩ (u · n) dℓ, is a one-pixel strip in plumax, which §5 shows is biased when the wind is not along a grid axis.
Many overpasses. Each overpass gives at most one retrieved Q̂. Over months, the detections are a thinned marked point process: emission events with intensity λ(t) and sizes q drawn from f(q), seen only when an overpass falls in an event, the sky is clear, and the event is large enough to be detected with probability P_d(q). pyrox-xtreme and plumax already hold the processes, the thinning, ten probability-of-detection models, the persistency metrics and the missing-mass correction. Three operators are missing:
The overpass schedule as a thinning operator.
ThinningProcessaccepts any retention callable, so a schedule can be encoded by hand, but nothing builds the retention from revisit times, swath and cloud masks, where every user will otherwise write it differently.Sources that switch on and off. Facilities often emit in episodes. A Poisson intensity with the right mean rate gets the persistence badly wrong (0.97 against 0.35 in §5), and nothing in the stack models the on–off state.
Persistency for history-dependent sources. plumax refuses Hawkes and Weibull-renewal intensities in its persistency metrics. Two of the three metrics have closed forms given the history (§4.9), so the refusal is stricter than it needs to be.
Why operators, not functions. Autodiff can differentiate every link, so three reasons decide it:
Cost. A reverse pass through a filter or an integral stores its intermediates; a hand-written adjoint costs one forward pass and composes with lineax solvers that need only
mvandT.mv.Structure. A Galerkin coarse operator R A P is symmetric only if R is a multiple of Pᵀ, a property of the pair that two separate functions cannot promise.
Reuse. The same integral operator is a Green’s function in plumax, a kernel mean in integrix’s Bayesian quadrature, a compensator in pyrox-xtreme’s Hawkes processes and a layer of a neural operator in geonnax Li et al., 2021Kovachki et al., 2023. Written once, each library supplies only its kernel.
2 User stories¶
A retrieval developer in plumax wants the Gaussian plume as an operator 𝒢 with an adjoint, so the gradient of the misfit in Q costs one forward and one reverse application, and a Lagrangian footprint can replace the plume without touching the inversion. They need I1 and I3.
A radiative-transfer developer in radtrax wants one operator from a line-by-line spectral grid to the centres of every band of an instrument, built from the band responses, so a forward model on 13 or 285 bands is one sparse contraction and its transpose is the adjoint in radiance. radiomax’s
response_matrixis that operator, dense; they need I2 for the compact form.An instrument modeller in radiomax wants the point-spread function as a filter that skips cloudy pixels in the forward and the adjoint alike and passes the dot-product test. They need F1.
An ocean modeller in gridax wants prolongation from a functax plan and restriction as its scaled transpose, so the multigrid coarse operators stay symmetric by construction and the hand-written stencils go. They need F2.
A data engineer regridding 20 m bands to 60 m wants a conservative restriction paired with a prolongation back, so a retrieval that mixes resolutions can pull a coarse-band misfit back to the fine grid. They need F2.
A plume analyst wants the flux through a transect at any angle to the grid, with a gradient, so the cross-sectional flux method is unbiased for oblique winds and can sit inside a fit. They need F3.
A methane-persistence researcher fitting a thinned marked process to a year of detections wants the observation operator built from the satellite’s overpass times, swath and cloud masks, and a source model that can be off for weeks, so persistence and total emissions are not driven by a Poisson assumption the data contradict. They need X1 and X2.
An analyst reporting a source’s outlook wants the probability of an event in the next week and the expected wait for it from a fitted Hawkes or renewal intensity, given a complete record of the source’s events so far (from continuous monitoring, for instance). They need X3. From satellite detections alone the record is thinned, and the on–off model of X2 is the one that filters it exactly.
A student working through the curriculum wants Green’s functions, second-kind integral equations and memory operators as objects to apply and check against closed forms, so chapters 3 and 7 have runnable code. They need I3, I4 and I5.
An ML researcher in geonnax wants a kernel-integral layer whose quadrature is a functax rule, so a kernel neural operator differs from the classical integral operator only by a learned kernel. They need I1.
3 Scope¶
In scope
| Code | Addition | Package | Gap row |
|---|---|---|---|
| F1 | Filters as plans with adjoints and a self-adjoint flag; the functions stay | functax | 1 |
| F2 | functax.transfer: coarsen_grid, Transfer (P and R = M_H⁻¹ Pᵀ M_h, c Pᵀ on uniform cells), interpolating_transfer, conservative_transfer, Galerkin products | functax; gridax adopts | 4 |
| F3 | The trace onto a curve rule (trace_plan), boundary_curve; the flux stays an integrix rule | functax; plumax adopts | 5 |
| I1 | IntegralOperator on a functax rule and a KernelLike kernel, dense-chunked and low-rank paths; convolution | integrix | 2 |
| I2 | compact_response: radiomax’s response matrix kept as per-band indices and weights, dense rows when a band is not sparse | radiomax; radtrax adopts | 3 |
| I3 | integrix.green: Poisson, screened-Poisson and heat Green’s kernels with cell averages; green_operator | integrix; plumax supplies the plume kernel | 7 |
| I4 | solve_second_kind with the Nyström interpolant | integrix | 14 |
| I5 | VolterraOperator, a causal integral operator run as a scan | integrix; pyrox-xtreme’s Hawkes compensator is the first consumer | 15 |
| X1 | ScheduleRetention: the retention of a satellite’s overpasses and cloud masks | pyrox-xtreme; plumax composes it with P_d | 6 |
| X2 | MarkovModulatedPoisson: a two-state on–off source with its persistency in closed form | pyrox-xtreme | 9 |
| X3 | Conditional persistency for Hawkes and renewal intensities | plumax.population | 8 |
Gap rows refer to the ranked list of 32 gaps named under Related, above.
Out of scope
Sequential Monte Carlo, particle filters and tempered SMC (gap row 23): already designed and accepted in filterax’s own SMC design, which also puts resampling in integrix.
The remaining priority-2 gaps (Koopman and DMD, Galerkin reduced models, DeepONet and graph operators, splitting composers, couplers, Leray projections, positivity fixers, curvilinear metrics, conditioning estimates, tomography recipes, revisit planning): each needs its own short design in the package named in the gaps doc.
The priority-3 gaps (finite elements, Laplace, Z and Radon transforms, resolvents, homogenisation, tensor decompositions): names reserved, no code until a consumer appears.
Singular quadrature beyond the diagonal (product integration, singularity subtraction): I3 handles the coincident case only (GS-O3).
Persistency of Hawkes and renewal sources from thinned detections: an undetected event still excites a Hawkes intensity or resets a renewal age, so it needs inference over the missing events (sequential Monte Carlo, after filterax’s SMC design), not X3’s closed forms.
Non-Poisson processes with more than two modulating states, and spatial thinning by swath geometry: X1 and X2 are temporal and two-state; both generalise later.
First release: steps S1 to S7 and S11 of §13 (F1, F2, F3, I1, I2, X1, X2). I3, I4, I5 and X3 follow.
4 Background maths¶
4.1 Adjoints and the measures behind them¶
Let Ω ⊂ ℝ^D be a domain with a measure μ (area on the ground, wavenumber on the spectral axis, time, a probability). Functions on it have the inner product
and the adjoint of a linear map 𝒜 from L²(Ω₁, μ₁) to L²(Ω₂, μ₂) is the map 𝒜* with
for all f and g. On grids the measures become diagonal weight matrices W₁ and W₂, and the adjoint of a matrix A is W₁⁻¹ Aᵀ W₂, which is the plain transpose only when both weights are equal. Every operator here returns the plain transpose as adjoint, the reverse-mode derivative of its forward pass, and the weighted one through weighted_adjoint (GS-D2).
4.2 Filters on a bounded domain (F1)¶
A filter with kernel k convolves after extending the field past the edge with an operator ℰ and keeps the part on Ω with the restriction ℛ_Ω:
Its adjoint is correlation with the reflected kernel k̃(x) = k(−x), wrapped in the adjoints of the extension and the restriction:
On a grid, ℰ is an index map and ℰ* scatters back through it with addition. For a symmetric kernel, ℬ is self-adjoint exactly when ℰ makes the extended convolution commute with that scatter: SciPy’s reflect (d c b a | a b c d | d c b a) and wrap extensions are periodic extensions of a doubled or repeated signal, and constant pads with zeros, so all three give a symmetric matrix. Mirror (d c b | a b c d | c b a) counts the edge sample once and its neighbours twice, and nearest repeats the edge sample, so neither is symmetric; their asymmetry sits in the cells within the kernel’s half-width of the edge (§5).
With a validity mask m (1 where a pixel is clear, 0 where it is cloudy), the filter is the normalised convolution
which is linear in f for a fixed mask, with adjoint
As matrices, ℬ_m = D⁻¹ K M with D = diag(k ⋆ m) and M = diag(m), and ℬ_mᵀ = M Kᵀ D⁻¹, which differs from ℬ_m wherever the mask varies.
4.3 Grid transfer (F2)¶
Let V_h be the functions a fine grid of spacing h represents and V_H those of a coarse grid of spacing H = 2h, nested so that V_H ⊂ V_h. Prolongation P: V_H → V_h interpolates the coarse values onto the fine nodes. Restriction R: V_h → V_H, defined as P’s adjoint between the two grids’ inner products, is
with M_h and M_H the mass matrices of the two grids’ bases. On uniform cells M = h^D I and R = c Pᵀ with c = (h/H)^D. The coarse operator with the variational property, whose coarse correction minimises the error in the energy norm, is the Galerkin product Briggs et al., 2000Trottenberg et al., 2001
where A_h is the fine operator. A_H is symmetric whenever A_h is and R is a multiple of Pᵀ. In the coarse-grid correction e = P A_H⁻¹ R r the factor c cancels, which is why gridax’s R = Pᵀ works, but it does not cancel when R is used on its own. Conservative restriction is the L² projection onto cell averages, ū(C) = |C|⁻¹ ∫_C u dA for every coarse cell C, which keeps the integral of u Jones, 1999Ullrich & Taylor, 2015.
4.4 The trace and the flux (F3)¶
The trace γ restricts a function on Ω to a curve Γ, γu = u|_Γ. It is bounded from the Sobolev space H¹(Ω) to H^(1/2)(Γ) but not from L²(Ω), so the discrete trace must read from an interpolant that is at least continuous: linear interpolation, not nearest. Its adjoint sends a function on Γ to a line source. The flux of a column enhancement ΔΩ (kg m⁻²) carried by a wind u through Γ with unit normal n is
in kg s⁻¹, and for a steady plume with no sink it equals the emission rate Q at any distance downwind.
4.5 Integral operators and responses (I1, I2)¶
An integral operator with kernel k: Ω_x × Ω_s → ℝ and measure μ on Ω_s is
A kernel with finite energy, ∫∫ k² dμ dμ < ∞, makes 𝒦 Hilbert–Schmidt and so compact: its singular values fall to zero Kress, 2014. Its adjoint has the transposed kernel k*(s, x) = k(x, s). integrix’s kernel mean z(x) = ∫ k(x, s) dΠ(s), which Bayesian quadrature uses, is 𝒦 applied to the constant 1 under a probability Π.
The spectral response of band b, with response function r_b on the wavenumber axis ν, is the normalised integral
where L(ν) is the high-resolution radiance. Read over every band b = 1, …, N_B, it is an integral operator from functions of ν to N_B numbers.
4.6 Green’s functions (I3)¶
For a linear differential operator 𝓛 with boundary conditions, the Green’s function solves 𝓛 G(·, x′) = δ(· − x′), and the response to a source f is an integral operator:
In free space, with r = ‖x − x′‖, the three that integrix ships are Duffy, 2015:
| Operator 𝓛 | D | G(r) |
|---|---|---|
| −∇² (Poisson) | 2 | −(1/2π) log r |
| −∇² (Poisson) | 3 | 1/(4π r) |
| κ² − ∇² (screened Poisson) | 2 | K₀(κr)/(2π) |
| κ² − ∇² (screened Poisson) | 3 | e^(−κr)/(4π r) |
| ∂_t − K∇² (heat, at time t) | D | (4πKt)^(−D/2) e^(−r²/(4Kt)) |
with K₀ the modified Bessel function of the second kind, κ an inverse length and K a diffusivity. The screened-Poisson rows are the Matérn link: the field x with (κ² − ∇²) x = w for white noise w, which gaussx’s spde_precision discretises, has covariance G ⋆ G Lindgren et al., 2011.
The plume kernel of the running example is the steady Gaussian plume integrated over height Stockie, 2011. A source of rate Q in a wind of speed U, with crosswind spread σ_y(x) at downwind distance x and a reflecting ground, gives the column enhancement
for x > 0 and zero upwind, with y the crosswind offset. It is linear in Q, so for a field of sources it is an integral operator with kernel G_plume(x − x′), and its crosswind integral times U is Q at every x, the check behind §4.4.
4.7 Fredholm equations of the second kind (I4)¶
Given f, a kernel k and a number λ, find u with
By the Fredholm alternative a unique solution exists for every f unless 1/λ is an eigenvalue of 𝒦 Kress, 2014. The first-kind equation 𝒦u = f is ill-posed, because 𝒦 is compact; solving it needs a regulariser, which is argminax’s or vardax’s, not integrix’s.
4.8 Volterra operators (I5)¶
A Volterra operator integrates only up to the present, so it is causal:
For an exponential kernel k(t, s) = α e^(−β(t − s)), the output y = 𝒱f solves dy/dt = −β y + α f, so it is a scan with one state, linear in the number of steps. The intensity of an exponential Hawkes process Hawkes, 1971 is a Volterra operator applied to the counting measure N of its own past events,
with baseline rate μ, jump α and decay β, and its compensator ∫₀^t λ is the same operator integrated once more.
4.9 Thinning, duty cycles and persistence (X1, X2, X3)¶
The observed process. Emission events at times t_i with sizes q_i form a marked point process with intensity λ(t) f(q) Daley & Vere-Jones, 2003, where λ is in events day⁻¹ and f the density of the emission rate q (kg h⁻¹). Keeping each event independently with probability p(t, q) gives a process with intensity Lewis & Shedler, 1979Ogata, 1981
Thinning is linear in the intensity, and sources superpose by adding intensities.
The schedule (X1). An event of duration d that starts at t is seen if an overpass at t_k falls inside it and the sky is clear then, with cloud fraction c_k. Assuming independent overpasses, its retention is a schedule term times the probability of detection:
Duty cycles (X2). A source whose emitting state Z(t) ∈ {off, on} is a two-state Markov chain, switching on at rate α and off at rate β, and that emits events at rate λ_on while on, is a Markov-modulated Poisson process Fischer & Meier-Hellstern, 1993. With generator G and event-rate matrix Λ,
its emitting fraction is π_on = α/(α + β), its mean rate λ_on π_on, and the probability of no event in the next τ days, given the state probabilities π(t) as a row vector, is a matrix exponential, the propagator of chapter 7:
where N(a, b] counts events in (a, b] and 1 is a column of ones. Given past detections, π(t) is the forward filter of the hidden on–off chain under the same observation model as the thinning. Because the sizes are independent of the state, the detection times form an MMPP with event rates p̄(t) Λ, where p̄(t) = p_sched(t) 𝔼_f[P_d(q)] is the retention averaged over the size density; filtering with the schedule alone would treat every clear overpass as perfectly sensitive and pull π_on down.
Conditional persistency (X3). For any intensity that depends on the history H_t, write λ*(s | H_t) for the intensity at s > t if no event happens in (t, s]. Until the next event, λ* is a deterministic function of s, so the first event after t has hazard λ* and
For an exponential Hawkes process λ*(s | H_t) = μ + ∑_{t_i ≤ t} α e^(−β(s − t_i)), whose integral is closed-form. For a renewal process with survival function S of the gaps and last event t_last, the same formula gives 1 − S(t + τ − t_last)/S(t − t_last). The expected wait to the next event is ∫₀^∞ of the survival term. Only the expected count needs simulation, because events after the first excite or reset the intensity. All of this needs H_t to be the complete event history: under thinning an undetected event still excites a Hawkes intensity or resets a renewal age, so detection times cannot stand in for H_t (§3, out of scope).
5 Background numerics¶
What the prototype measured. docs/design/prototypes/missing_operators.py builds each operator as an explicit matrix or a short loop in NumPy (float64) and checks it against a closed form or a simulation. Filters use a Gaussian of width 3 cells and 4σ truncation on 200 cells; the plume is the column kernel of §4.6 with Q = 1,000 kg h⁻¹, U = 3 m s⁻¹ and σ_y(x) = 0.22 x^0.9 m on a 20 m grid.
| Measurement | Result |
|---|---|
| relative asymmetry ‖B − Bᵀ‖ / ‖B‖ of a Gaussian filter, by boundary mode | reflect 0, wrap 0, constant 0; mirror 0.089; nearest 0.18 |
| share of that asymmetry within the kernel’s half-width of either edge (mirror, nearest) | 1.00 in both |
| the same for the masked normalised convolution, 30 % of cells masked | 0.84 |
| dot-product test of the scatter-through-the-index-map adjoint (reflect, wrap, masked) | 4 × 10⁻¹⁶, 4 × 10⁻¹⁵, 8 × 10⁻¹⁶ |
| coarse-grid correction with R = Pᵀ against R = ½ Pᵀ, 1-D Poisson, 65 to 33 points | identical to 0 |
| restriction of a constant 1 with R = Pᵀ and R = ½ Pᵀ (interior values) | 2 and 1 |
| conservative restriction R = k^(−D) Pᵀ of a 2-D field, k = 2 and 3: mass error; restriction of a constant | below 10⁻¹⁴ for both; 1 for both (2^(−D) Pᵀ at k = 3 gives 9/4) |
| conservative restriction on nonuniform cells (fine edges 0, 1, 3, 6, 10; coarse edges 0, 3, 10), fine values 1, 0, 0, 0: coarse integral | M_H⁻¹ Pᵀ M_h: 1; ½ Pᵀ: 1.5 |
| transect flux / Q, wind along x, at 200, 500 and 2,000 m | trace with a 400-node line rule: 1.0004, 1.0000, 1.0000; one-pixel strip: 1.0000 at all three |
| transect flux / Q, wind at 30°, at 200 and 500 m | trace: 1.0000, 1.0000; one-pixel strip: 1.124, 1.025 |
| second-kind equation, k = exp(−(x − s)²), λ = ½, f = cos πx on [0, 1], max error of the Nyström interpolant against N = 64 | N = 4, 8, 16: Gauss–Legendre 4 × 10⁻⁵, 5 × 10⁻¹², 2 × 10⁻¹⁶; trapezoid 4 × 10⁻³, 8 × 10⁻⁴, 2 × 10⁻⁴ |
| rank-one kernel x s with λ = 1 and f = x, exact u = 1.5 x | error 4 × 10⁻¹⁶ at 8 Gauss–Legendre nodes |
| kernel mean of an RBF (length 0.2) under U[0, 1] as 𝒦 1 with 32 nodes, against the erf closed form | 4 × 10⁻¹⁶ |
| nonzeros of a Gaussian spectral response on a 0.01 cm⁻¹ grid from 4,000 to 5,000 cm⁻¹ (10⁵ nodes), cut at 10⁻⁶ of the peak | EMIT-like band (FWHM 16 cm⁻¹): 7,174; Sentinel-2 B12-like band (FWHM 376 cm⁻¹): all 10⁵ |
| detected fraction of events, 0.5 events day⁻¹, 6-hour events, 5-day revisit, 40 % cloud, logistic P_d with mid-point 400 kg h⁻¹, lognormal sizes with median 300 kg h⁻¹; 400 simulated years | simulated 0.0125 (912 of 73,057); schedule × clear sky × 𝔼[P_d] = 0.0125 |
| mean of detected rates / mean of all rates; mass seen / mass emitted | 1.83; 0.023 |
| probability of an event in the next 7 days, on–off source (on 2 days in 20, 5 events day⁻¹ while on), 20,000 runs | simulated 0.354; MMPP closed form of §4.9 0.355; Poisson with the same mean rate 0.970 |
What follows from it.
Adjoints are needed for three boundary modes in five, and for every mask. Reflect, wrap and constant filters are their own adjoints, so a plan can say so and skip the scatter. Mirror and nearest put all their asymmetry in the edge cells, which is exactly where an adjoint written as “the same filter” would bias a gradient without any visible symptom in the interior. A cloud mask makes the filter strongly non-symmetric everywhere it varies.
The scatter adjoint is exact. Scattering back through the boundary index map passed the dot-product test Claerbout, 1992 to rounding in every case, at the cost of the forward pass.
c is a convention for multigrid and a fact for regridding. It cancels in the coarse correction but doubles the restricted values of a field in 1-D (quadruples in 2-D), so a
Transfermust expose it and default it to the mass-consistent value.The trace fixes an angle-dependent bias. The one-pixel strip is exact when the wind runs along a grid axis and biased by up to 12 % when it does not, more so close to the source where the plume is narrow relative to the pixel. A line rule through bilinear interpolation was within 0.04 % at every angle and distance tried.
Gauss rules make the quadrature method spectrally accurate. For a smooth kernel, eight Gauss–Legendre nodes reached 5 × 10⁻¹² where the trapezoid rule was at 8 × 10⁻⁴; the Nyström interpolant converges at the rule’s order, as the theory says Atkinson, 1997.
Sparsity depends on the band, not the method. A narrow imaging-spectrometer band touches 7 % of a fine grid, so a sparse stencil pays; a broad multispectral band with a Gaussian stand-in touched all of it at this cut. Real broadband responses have compact support, so radtrax’s tabulated responses decide the storage, and the operator must fall back to dense rows when a response is not sparse.
The schedule dominates thinning. With a 5-day revisit and 6-hour events, only 5 % of events have an overpass inside them before clouds and detection, so the observation operator is mostly the schedule; getting it right per sensor matters more than the choice among the ten P_d models.
A Poisson persistency is wrong for an episodic source. The same mean rate gave 0.97 instead of 0.35 for an event within a week. The MMPP closed form matched 20,000 simulations to 0.001.
Numerics that are design constraints.
Static shapes. Stencils, rules and schedules are built on the host and applied in JAX with fixed shapes; a mask that changes per scene is data, not structure, so a filter plan takes it as an argument when it varies and freezes it when it does not.
Chunked dense integral operators. The dense path maps over blocks of targets with
jax.lax.map, so memory is O(chunk × N) and never O(M × N).Matrix exponentials of 2 × 2 generators. The MMPP persistency uses
jax.scipy.linalg.expmon a 2 × 2 matrix, or its closed form; gaussx’s SDE discretisation already guardsexpmagainst large arguments, and the same guard applies.Log space for persistency. Probabilities of no event are products of small numbers over long windows, so the compensators are accumulated and reported in log space.
Precision. The prototype ran in float64 only, so float32 behaviour is unmeasured. The convergence and dot-product tests will run in float64; whether retrievals can run the operators in float32 is a measurement for step S2.
6 Prior art¶
From memory of each library’s documentation, not re-read for this page; each row should be checked before its step is filed.
| Library | What it has | What to take | What to avoid |
|---|---|---|---|
SciPy ndimage | separable filters with the five boundary modes named in §4.2, mode per axis | the mode names, which functax already uses | no adjoints, no masks, NumPy only |
| PyAMG | algebraic and geometric multigrid with prolongation P and restriction as Pᵀ, Galerkin coarse operators | the convention R = Pᵀ for solvers, with the scale stated | sparse matrices as the only representation |
| ESMF, xESMF, TempestRemap | conservative and bilinear remapping weights between spherical grids, stored as sparse matrices | first- and higher-order conservative weights as a stencil; consistency and conservation checks | weights built offline in Fortran or C++, outside JAX |
| Firedrake, FEniCS | trace spaces and facet integrals in a finite-element setting | that the trace needs a continuous interpolant | the whole finite-element machinery, out of scope here |
| Chebfun | integral operators, Fredholm and Volterra solvers on Chebyshev expansions | Volterra as its own operator; spectral accuracy as the test | MATLAB, and global polynomials only |
| neuraloperator (PyTorch) | Fourier, spherical and graph neural operators, integral-kernel layers | that a kernel layer is an integral operator with a learned kernel | PyTorch; geonnax already has the Fourier family |
| tick (Python, C++) | Hawkes processes with exponential and sum-of-exponential kernels, simulation and fitting | the exponential kernel’s recursive compensator | no JAX, no thinning by an observation schedule |
| pyrox-xtreme (in the stack) | Poisson, renewal, Hawkes, marked and spatio-temporal processes; ThinningProcess with a retention callable | everything; X1 and X2 are new operators beside it | — |
The gap common to all of them is the adjoint as part of the object, together with the structure (stencil, rule, kernel) it came from, inside JAX. That is what the plans and operators here add.
7 What it builds on¶
Most of the work is glue between pieces that exist. Each name below was read on main of its repository on 4 Dec 2026.
| Need | Upstream name | State |
|---|---|---|
| a read-out with an adjoint and a lineax view | functax.interp.Plan (__call__, adjoint, operator(), outer @ inner) | today (functax) |
| a sparse read-out as indices and weights | functax.interp.Stencil | today (functax) |
| conservative remapping between grids | functax.interp.Conservative, with per-axis overlap bands in _src/interp/_overlap.py | today (functax); the bands are private |
| bilinear and higher-order prolongation | functax.interp.Linear, Cubic, BSpline plans | today (functax) |
| Gaussian taps and separable filters | functax.filter.gaussian_kernel, correlate1d, gaussian_filter, fft_filter, BOUNDARIES | today (functax), functions without adjoints |
| grids | functax.geometry.AffineGrid, RectilinearGrid, CurvilinearGrid | today (functax) |
| quadrature rules as data | functax.quad.Rule, gauss_legendre, trapezoid, cell_area | today (functax) |
| rules on curves with normals | functax.quad.CurveRule, polyline | today (functax) |
| sums and running integrals against a rule | integrix.rule.integrate, weighted_mean; integrix.scan.cumulative | today (integrix) |
| a kernel protocol integrix already accepts | integrix.expect.KernelLike (anything with pairwise(x, x′)) | today (integrix); kernellib’s kernels satisfy it |
| an oracle for the integral operator | integrix.expect.kernel_mean | today (integrix) |
| a spectral response matrix with its adjoint, exact on any grid | radiomax.radiometry.response_matrix, sampled_response_matrix, apply_response, apply_response_adjoint | today (radiomax, jejjohnson/radiomax#23) |
| matrix-free solves for Fredholm systems | lineax GMRES, CG | inherited |
| the Matérn link and guarded matrix exponentials | gaussx.spde_precision; gaussx’s SDE discretisation | today (gaussx) |
| the multigrid solver that adopts F2 | gridax.solvers MultigridSolver, with private _prolongate, _restrict, _transfer_operators | today (gridax) |
| thinning by a retention callable, and its compensator | pyrox_xtreme.point_processes.ThinningProcess(base, retention_fn, observation_window); retention_compensator | today (pyrox-xtreme) |
| the processes X2 and X3 build on | InhomogeneousPoissonProcess, RenewalProcess, ExponentialHawkes, MarkedTemporalPointProcess | today (pyrox-xtreme) |
| probability-of-detection models | plumax.population.pod: LogisticPOD, LogLogisticPOD, SNRBasedPOD and seven more | today (plumax) |
| the column of a steady Gaussian plume per unit line density | plumax.gauss_plume.ColumnPlume, PlumeGeometry, unit_column | today (plumax) |
| persistency metrics for Poisson-family intensities | plumax.population.persistency: occurrence_probability, expected_wait_time, expected_count, posterior_metric | today (plumax) |
| total emissions with the missing-mass correction | plumax.population.totals.total_emission; plumax.population.paradox | today (plumax) |
Gaps, each sent to the package that owns the concept.
| Gap | Owner | Why there |
|---|---|---|
| filter plans with adjoints (F1) | functax | filters change a field’s representation and already live in functax.filter |
functax.transfer (F2, F3) | functax | prolongation is interpolation, restriction its adjoint, the trace a plan onto a curve: all read-outs |
| public overlap bands | functax | conservative_transfer and gridax’s staggered transfers both need them |
integrix.operator (I1, I4, I5) | integrix | each sums a rule against a kernel, which integrix decision 3 reserves for integrix |
| compact response rows (I2) | radiomax | radiomax builds the response matrix, by the owner’s decision of 23 Nov 2026 (jejjohnson/radtrax#307) |
integrix.green (I3) | integrix | free-space Green’s functions are kernels with no physics parameters beyond a length or a diffusivity |
the plume kernel, a KernelLike view of ColumnPlume | plumax | dispersion coefficients, widths and the centreline are physics, and ColumnPlume already computes the column |
ScheduleRetention, MarkovModulatedPoisson (X1, X2) | pyrox-xtreme | operators on intensities, beside ThinningProcess |
| conditional persistency (X3) | plumax.population | it extends plumax’s persistency metrics and their posterior versions |
New dependency edges. None in the core: integrix already imports functax and gaussx. gridax already resolves functax and integrix (its pyproject pins both and steps with integrix.march), plumax’s persistency already imports functax and integrix, radtrax already imports radiomax, and pyrox-xtreme gains nothing.
8 Architecture¶
8.1 The rungs¶
| Piece | Rung | Kind | Package | Used by |
|---|---|---|---|---|
Stencil, Rule, CurveRule (existing) | ⓪ structure | Module | functax | every rung above |
FilterPlan (taps, boundary index maps, mask, denominator, self_adjoint) | ⓪ structure | Module | functax | F1 |
Transfer (prolongation plan, scale c) | ⓪ structure | Module | functax | F2, gridax |
ScheduleRetention (overpass times, cloud fractions, event duration) | ⓪ structure | Module | pyrox-xtreme | X1 |
coarsen_grid, boundary_curve | ① primitive | function | functax | F2, F3 |
galerkin_product(R, A, P) | ① primitive | function | functax | F2 |
mmpp_no_event_log_prob(generator, rates, state_probs, horizon) | ① primitive | function | pyrox-xtreme | X2 |
GaussianFilter, BoxFilter, Correlation, FFTFilter | ② strategy | Module | functax | settings frozen by .plan(grid, mask=...) |
interpolating_transfer(..., scheme=...), conservative_transfer | ② strategy | function | functax | choose interpolating or conservative pairs |
PoissonGreen, ScreenedPoissonGreen, HeatGreen | ② strategy | Module | integrix.green | kernels for green_operator |
ColumnPlumeKernel (a ColumnPlume, its geometry and the wind speed) | ② strategy | Module | plumax | the plume kernel |
IntegralOperator, VolterraOperator | ③ model | Module | integrix.operator | I1, I5, geonnax later |
MarkovModulatedPoisson | ③ model | Module | pyrox-xtreme | X2 |
trace_plan(grid, curve) | ④ algorithm | function | functax | F3, plumax |
convolution, green_operator | ④ algorithm | function | integrix.operator, integrix.green | I1, I3 |
compact_response returning CompactResponse | ④ algorithm | function | radiomax.radiometry | I2, radtrax |
solve_second_kind returning SecondKindSolution | ④ algorithm | function | integrix.operator | I4 |
conditional_occurrence_probability, conditional_wait_time | ④ algorithm | function | plumax.population | X3 |
A filter scheme and a kernel hold settings only, so they are strategies; a plan, a transfer and a schedule hold the arrays that define them, so they are structures; an integral operator holds a kernel, a rule and targets and has meaning of its own, so it is a model.
8.2 Protocols¶
KernelLike (existing, integrix.expect). pairwise(x, y) -> K for points x (m, D) and y (n, D). Optional extras, looked up by name: features(x) returning (m, R) features for the low-rank path; cell_average(cell_size) returning the kernel averaged over a cell centred on the source, for coincident points; is_translation_invariant for the FFT path.
AbstractFilterPlan (functax). __call__(field), adjoint(residual), operator(), and the attribute self_adjoint: bool, true for reflect, wrap and constant boundaries with a symmetric kernel and no mask (§5).
AbstractTransfer (functax). prolong(coarse), restrict(fine), galerkin(fine_operator), and the attribute scale.
AbstractRetention (pyrox-xtreme). The existing retention callable (t, history, proposed_mark=None) -> p of ThinningProcess, made explicit as a protocol so that ScheduleRetention and a plumax P_d compose by product: retention = schedule * pod.
8.3 Data types¶
| Type | Fields (shapes) |
|---|---|
FilterPlan | taps: tuple[Float[Array, " tap"], ...], gather: tuple[Int[Array, "n tap"], ...], mask: Bool[Array, "y x"], denominator: Float[Array, "y x"], self_adjoint: bool (static) |
Transfer | prolongation: Plan (coarse to fine), fine_mass: Float[Array, " fine"], coarse_mass: Float[Array, " coarse"] (the diagonals of M_h and M_H) |
IntegralOperator | kernel: KernelLike, rule: Rule, targets: Float[Array, "target dim"], chunk: int (static) |
SecondKindSolution | operator: IntegralOperator, coupling: float, values: Float[Array, " node"] |
VolterraOperator | decay: Float[Array, ""], scale: Float[Array, ""] for the exponential kernel; a general kernel falls back to a dense causal operator |
ScheduleRetention | overpass_times: Float[Array, " pass"], cloud_fraction: Float[Array, " pass"], event_duration: float |
MarkovModulatedPoisson | switch_on_rate: Float[Array, ""], switch_off_rate: Float[Array, ""], rate_on: Float[Array, ""], observation_window |
All are eqx.Modules.
8.4 Layout¶
functax/src/functax/
├── _src/filter/_plans.py # FilterPlan, GaussianFilter, BoxFilter, Correlation, FFTFilter
├── _src/transfer/
│ ├── _coarsen.py # coarsen_grid
│ ├── _transfer.py # Transfer, interpolating_transfer, conservative_transfer, galerkin_product
│ └── _trace.py # trace_plan, boundary_curve
└── transfer.py # public: functax.transfer
integrix/src/integrix/
├── _src/operator/
│ ├── _integral.py # IntegralOperator, convolution
│ ├── _fredholm.py # solve_second_kind, SecondKindSolution
│ └── _volterra.py # VolterraOperator
├── _src/green/_kernels.py # PoissonGreen, ScreenedPoissonGreen, HeatGreen, green_operator
├── operator.py # public: integrix.operator
└── green.py # public: integrix.green
radiomax/src/radiomax/_src/radiometry/
└── response.py # + CompactResponse, compact_response
pyrox/packages/pyrox-xtreme/src/pyrox_xtreme/point_processes/
├── operators/schedule.py # ScheduleRetention
├── operators/mmpp.py # MarkovModulatedPoisson
└── primitives/mmpp.py # mmpp_no_event_log_prob
plumax/src/plumax/
├── gauss_plume/_src/column.py # + ColumnPlumeKernel
└── population/_src/persistency.py # + conditional_occurrence_probability, conditional_wait_time9 API proposal¶
The sketches follow the house code-sketch form: a shapes header, then above each line its status, its equation and its shape. Symbols are those of §4. Every operator returns the Euclidean transpose as adjoint and wraps __call__ in jax.custom_vjp with that adjoint as its backward pass, so reverse mode through a chain calls the hand-written adjoints. Every proposed public name was checked against the four capability indexes on 4 Dec 2026, so none rebinds a name another module already exports: the Green’s kernels end in Green because argminax.curvature.Laplace is a Gaussian approximation, trace_plan and coarsen_grid avoid gaussx.trace and pipekit_array.coarsen, and the interpolating pair is interpolating_transfer so that it does not shadow its own module, functax.transfer.
9.1 functax: filter plans (F1)¶
import equinox as eqx
import lineax as lx
from jaxtyping import Array, Bool, Float
from functax.geometry import AffineGrid
# Shapes: N_y × N_x grid cells; T taps per axis
# proposed (F1)
class GaussianFilter(eqx.Module):
"""Settings for a separable Gaussian blur, frozen against a grid by `plan`.
The plan applies B f = R_Ω (k ⋆ E f), or with a mask m the normalised
convolution B_m f = k ⋆ (m f) / (k ⋆ m).
Attributes:
sigma: σ per filtered axis, in grid cells.
truncate: Half-width of the taps in units of σ.
boundary: The extension E per axis, with SciPy's mode names.
min_weight: Cells where k ⋆ m falls below this are invalid.
"""
sigma: float | tuple[float, ...]
truncate: float = 4.0
boundary: str | tuple[str, ...] = "reflect"
min_weight: float = 1e-6
def plan(
self, grid: AffineGrid, *, mask: Bool[Array, "y x"] | None = None
) -> "FilterPlan":
"""Freeze the taps, the boundary index maps and k ⋆ m for one grid.
Algorithm:
1. Build the 1-D taps kₐ per filtered axis with gaussian_kernel.
2. Build the gather index of E per axis from its boundary mode.
3. With a mask, compute and keep the denominator k ⋆ m.
4. Set self_adjoint when every mode is reflect, wrap or constant
and there is no mask.
Args:
grid: The grid the field lives on.
mask: m, true where a cell is valid; None means every cell.
Returns:
A plan applying B (or B_m), its transpose and its lineax view.
"""
...
# proposed (F1)
class FilterPlan(eqx.Module):
"""A frozen linear filter B_m and its transpose B_mᵀ."""
def __call__(self, field: Float[Array, "*batch y x"]) -> Float[Array, "*batch y x"]:
"""B_m f = k ⋆ (m f) / (k ⋆ m), one gather and correlate per axis."""
...
def adjoint(
self, residual: Float[Array, "*batch y x"]
) -> Float[Array, "*batch y x"]:
"""B_mᵀ g = m (k̃ ⋆ (g / (k ⋆ m))), scattering back through E per axis."""
...
def operator(self) -> lx.FunctionLinearOperator:
"""B_m on the flattened grid; its .T is `adjoint`, tagged symmetric when self_adjoint."""
...BoxFilter, Correlation(taps) for any kernel and FFTFilter(response) for a Fourier multiplier follow the same pattern. Median, percentile and bilateral filters are nonlinear and get no plan.
9.2 functax.transfer: grid transfer and the trace (F2, F3)¶
from typing import Literal
from functax.interp import Plan, Scheme
from functax.quad import CurveRule
Grid = AffineGrid | RectilinearGrid
# proposed (F2)
def coarsen_grid(
grid: Grid, *, factor: int = 2, nesting: Literal["vertex", "cell"] = "vertex"
) -> Grid:
"""The coarse grid nested in `grid`.
Vertex nesting maps n points to (n + 1) // 2 with coarse point J on fine
point 2J, as gridax's multigrid does; cell nesting puts factor^D fine
cells in each coarse cell.
Raises:
GeometryError: If an axis does not nest, naming the padding that would.
"""
...
# proposed (F2)
class Transfer(eqx.Module):
"""A prolongation P and the restriction R = M_H⁻¹ Pᵀ M_h paired with it.
The masses are the cell volumes of the two grids, so R is the adjoint of P
between their mass-weighted inner products on any rectilinear grid. On
uniform cells R = c Pᵀ with c = (h / H)^D; masses of ones give c = 1,
which reproduces gridax.
Attributes:
prolongation: P, a plan from the coarse grid to the fine one.
fine_mass: The diagonal of M_h, one volume per fine cell.
coarse_mass: The diagonal of M_H, one volume per coarse cell.
"""
prolongation: Plan
fine_mass: Float[Array, " fine"]
coarse_mass: Float[Array, " coarse"]
def prolong(
self, coarse: Float[Array, "*batch coarse"]
) -> Float[Array, "*batch fine"]:
"""P u_H."""
...
def restrict(
self, fine: Float[Array, "*batch fine"]
) -> Float[Array, "*batch coarse"]:
"""R u_h = M_H⁻¹ Pᵀ M_h u_h, which is c Pᵀ u_h on uniform cells."""
...
def galerkin(
self, fine_operator: lx.AbstractLinearOperator
) -> lx.AbstractLinearOperator:
"""A_H = R A_h P.
Tagged symmetric only when A_h is and R is a scalar multiple of Pᵀ,
that is when both masses are uniform. On nonuniform cells R A_h P is
self-adjoint in the M_H inner product but not symmetric, so it gets no
tag; a solver that needs a symmetric coarse operator uses a transfer
with masses of ones (Pᵀ A_h P).
"""
...
# proposed (F2)
def interpolating_transfer(
coarse: Grid,
fine: Grid,
*,
scheme: Scheme | None = None,
scale: float | Literal["mass"] = "mass",
) -> Transfer: ...
# proposed (F2)
def conservative_transfer(coarse: Grid, fine: Grid) -> Transfer:
"""R averages fine cells into coarse cells by volume; P copies back.
R = M_H⁻¹ Pᵀ M_h with the cell volumes of the two grids, so R of a
constant is that constant and R keeps the integral on any rectilinear
grid. On uniform cells it is k^(−D) Pᵀ, with k = H / h the nesting factor
per axis (3 for 20 m into 60 m).
Raises:
GeometryError: If the coarse cells are not whole blocks of fine cells.
"""
...
# proposed (F3)
def boundary_curve(grid: Grid, *, spacing: float | None = None) -> CurveRule:
"""The closed curve ∂Ω of a grid as nodes, arc lengths and outward normals."""
...
# proposed (F3)
def trace_plan(grid: Grid, curve: CurveRule, *, scheme: Scheme | None = None) -> Plan:
"""γ_h = H_Γ, the plan from the grid to the curve's nodes; bilinear by default."""
...9.3 integrix.operator and integrix.green (I1 to I5)¶
from collections.abc import Callable
from functax.interp import Stencil
from functax.quad import Rule
from integrix.expect import KernelLike
# Shapes: M targets; N nodes; D dimensions; N_B bands; N_ν wavenumbers
# proposed (I1)
class IntegralOperator(eqx.Module):
"""(𝒦f)(xᵢ) ≈ ∑ⱼ k(xᵢ, sⱼ) wⱼ f(sⱼ), applied without forming K.
Algorithm:
1. Low-rank path if the kernel has `features`: φ(x)ᵀ (Φ_sᵀ (w ⊙ f)).
2. Otherwise map over blocks of `chunk` targets, evaluate k(xᵢ, sⱼ)
for the block and contract with w ⊙ f over the nodes.
Attributes:
kernel: k, through integrix's KernelLike protocol.
rule: The nodes sⱼ and weights wⱼ (functax's Rule).
targets: The points xᵢ.
chunk: Targets per block on the dense path.
"""
kernel: KernelLike
rule: Rule
targets: Float[Array, "M D"]
chunk: int = 1024
def __call__(
self, values: Float[Array, "*batch N"]
) -> Float[Array, "*batch M"]: ...
def adjoint(self, residual: Float[Array, "*batch M"]) -> Float[Array, "*batch N"]:
"""(K W)ᵀ r: gⱼ = wⱼ ∑ᵢ k(xᵢ, sⱼ) rᵢ."""
...
def weighted_adjoint(
self, residual: Float[Array, "*batch M"], target_weights: Float[Array, " M"]
) -> Float[Array, "*batch N"]:
"""The L² adjoint, the kernel k* on the target rule: gⱼ = ∑ᵢ k(xᵢ, sⱼ) vᵢ rᵢ."""
...
def operator(self) -> lx.FunctionLinearOperator: ...
# proposed (I2), in radiomax.radiometry
def compact_response(
matrix: Float[Array, "N_B N_ν"], *, threshold: float = 1e-6
) -> "CompactResponse":
"""A from `response_matrix`, kept as per-band indices and weights.
Each row keeps the nodes above threshold × its peak and is renormalised
to sum to 1; a row that keeps more than half the grid stays dense.
`apply_response` and `apply_response_adjoint` accept the result.
"""
...
# proposed (I3)
class PoissonGreen(eqx.Module):
"""G for −∇²: −(1/2π) log r in 2-D, 1/(4π r) in 3-D."""
dim: int
def pairwise(
self, x: Float[Array, "m D"], y: Float[Array, "n D"]
) -> Float[Array, "m n"]: ...
def cell_average(self, cell_size: Float[Array, " D"]) -> Float[Array, ""]: ...
# proposed (I3)
def green_operator(
kernel: KernelLike,
rule: Rule,
targets: Float[Array, "M D"] | None = None,
*,
cell_size: Float[Array, " D"] | None = None,
) -> IntegralOperator:
"""u(xᵢ) = ∑ⱼ G(xᵢ, sⱼ) wⱼ fⱼ, with `cell_average` on coincident points."""
...
# proposed (I4)
def solve_second_kind(
kernel: KernelLike,
rule: Rule,
rhs: Callable,
coupling: float,
*,
solver: lx.AbstractLinearSolver | None = None,
symmetric: bool = False,
positive_definite: bool = False,
) -> "SecondKindSolution":
"""Solve u − λ𝒦u = f by the quadrature method; `.at(x)` is the Nyström interpolant.
A symmetric kernel makes the symmetrised system symmetric but not definite:
once λ passes 1/ρ(W^(1/2) K W^(1/2)) it is indefinite yet invertible, and CG
can break down on it. CG is therefore chosen only on the caller's promise of
definiteness, which holds for a positive semi-definite kernel when λ ≤ 0 or
λ < 1/ρ(W^(1/2) K W^(1/2)).
Algorithm:
1. Build 𝒦 with targets on the nodes.
2. Form I − λKW, or I − λW^(1/2) K W^(1/2) when symmetric.
3. Solve with CG when positive_definite (which requires symmetric),
otherwise GMRES; implicit gradients through lineax.
Raises:
ValueError: If positive_definite is set without symmetric.
"""
...
# proposed (I5)
class VolterraOperator(eqx.Module):
"""(𝒱f)(t) = ∫₀ᵗ α e^(−β(t − s)) f(s) ds as a one-state scan: dy/dt = −β y + α f."""
scale: Float[Array, ""]
decay: Float[Array, ""]
def __call__(
self, times: Float[Array, " T"], values: Float[Array, "*batch T"]
) -> Float[Array, "*batch T"]: ...9.4 pyrox-xtreme and plumax: persistence (X1 to X3)¶
from pyrox_xtreme.point_processes import ThinningProcess
# Shapes: K overpasses; N events
# proposed (X1)
class ScheduleRetention(eqx.Module):
"""p_sched(t) = 1 − ∏ₖ (1 − 𝟙[t ≤ tₖ ≤ t + d] (1 − cₖ)).
Attributes:
overpass_times: tₖ, in days.
cloud_fraction: cₖ at each overpass, in [0, 1].
event_duration: d, in days.
"""
overpass_times: Float[Array, " K"]
cloud_fraction: Float[Array, " K"]
event_duration: float
def __call__(
self, t: Float[Array, ""], history=None, proposed_mark=None
) -> Float[Array, ""]: ...
# proposed (X2)
class MarkovModulatedPoisson(eqx.Module):
"""Events at rate λ_on while a two-state Markov chain is on.
Attributes:
switch_on_rate: α, per day.
switch_off_rate: β, per day.
rate_on: λ_on, events per day while on.
observation_window: T, in days.
"""
def emitting_fraction(self) -> Float[Array, ""]:
"""π_on = α / (α + β)."""
...
def log_prob_no_event(
self, state_probs: Float[Array, " 2"], horizon: Float[Array, ""]
) -> Float[Array, ""]:
"""log π exp(τ (G − Λ)) 1."""
...
def filter_state(
self, event_times: Float[Array, " N"], mask, retention
) -> Float[Array, " 2"]:
"""π(t), the forward filter of the on–off chain given thinned detections.
retention is the mark-averaged p̄(t) = p_sched(t) 𝔼_f[P_d(q)], the
same observation model as the thinning, so the detections are an MMPP
with event rates p̄(t) Λ.
"""
...
# proposed (X3), in plumax.population.persistency
def conditional_occurrence_probability(
process, event_times, mask, t, horizon
) -> Float[Array, ""]:
"""1 − exp(−∫ₜ^(t+τ) λ*(s | H_t) ds), with λ* the no-new-event intensity.
event_times must be the complete history H_t, not thinned detections.
"""
...10 Usage examples¶
These are sketches of how §9 composes; none runs until the steps of §13 land.
The plume chain and its gradient in Q. A 20 m scene of 201 × 201 pixels around a source at x_s, wind U = 3 m s⁻¹, one band observed on a 60 m grid (67 × 67 pixels), noise standard deviation σ_ε. A one-node rule with weight 1 at x_s makes the source a point mass.
import jax
import jax.numpy as jnp
from functax import filter as fxf
from functax import transfer
from functax.quad import Rule
from integrix import green
from plumax.gauss_plume import ColumnPlume, ColumnPlumeKernel
from radiomax.radiometry import apply_response, compact_response, response_matrix
# Shapes: N_Ωx = 40,401 fine pixels; N_Ωy = 4,489 coarse pixels; N_ν wavenumbers; N_B = 1
# proposed (F2)
# the 60 m grid, three fine cells per coarse cell per axis
coarse_grid = transfer.coarsen_grid(fine_grid, factor=3, nesting="cell")
# today (plumax) wrapped by proposed (plumax, GS-D7)
# G(x, x_s) = exp(−c² / (2w(d)²)) / (√(2π) U w(d)) downwind, ColumnPlume's r / U
plume_kernel = ColumnPlumeKernel(ColumnPlume(), geometry, wind_speed=3.0)
# proposed (I3)
# 𝒢: (1,) → (N_Ωx,)
plume = green.green_operator(
plume_kernel, Rule(x_s[None, :], jnp.ones(1)), pixel_centres
)
# today (radiomax), then proposed (I2)
# A_bj = ∫ R_b φⱼ dν / ∫ R_b dν, kept compact: (N_ν,) → (N_B,)
bands = compact_response(response_matrix(responses, table_wavelength, nu_grid))
# proposed (F1)
# ℬ, reflect boundary, so self_adjoint is True
blur = fxf.GaussianFilter(sigma=0.6).plan(fine_grid)
# proposed (F2)
# R, the conservative 3 × 3 average
to_coarse = transfer.conservative_transfer(coarse_grid, fine_grid)
# user
def misfit(rate):
"""𝒥(Q) = ‖𝒮 ℬ 𝒞 𝒩 𝒢(Q) − y‖² / (2σ_ε²)."""
# ΔΩ = 𝒢 Q
# (1,) → (N_Ωx,)
column = plume(rate[None])
# L(ν, x) = L₀(ν) exp(−A σ_CH4(ν) ΔΩ(x) / M)
# (N_Ωx,) → (N_Ωx, N_ν)
radiance = beer_lambert(column)
# proposed (I2)
# (N_Ωx, N_ν) → (N_Ωx, N_B) → (N_B, 201, 201)
images = to_images(apply_response(bands, radiance))
# proposed (F1, F2)
# (N_B, 201, 201) → (N_B, 67, 67)
model = to_coarse.restrict(blur(images))
# → ()
return jnp.sum((model - observed) ** 2) / (2 * noise_std**2)
# today (jax)
# ∇_Q 𝒥 through each operator's custom_vjp
gradient = jax.grad(misfit)(jnp.asarray(1000.0 / 3600.0))A transect flux at an oblique wind. The check of §5, at 500 m downwind with the wind at 30°.
from functax import quad
from integrix import rule
# Shapes: N_Γ = 400 transect nodes
# today (functax)
# Γ across the wind, midpoint nodes, arc lengths and normals
transect = quad.polyline(transect_ends, 400)
# proposed (F3)
# ΔΩ on Γ by bilinear trace: (201, 201) → (N_Γ,)
column_on_transect = transfer.trace_plan(fine_grid, transect)(column_image)
# today (integrix)
# Φ = ∑_q w_q ΔΩ_q (u · n_q), in kg s⁻¹; expect Q to 0.04 %
flux = rule.integrate(transect, column_on_transect * (transect.normals @ wind)).valueA year of detections and the outlook for next week. A facility seen by a 5-day-revisit sensor for a year, with detections at times t_i of retrieved sizes q_i.
from plumax.population import pod, persistency
from pyrox_xtreme.point_processes import ThinningProcess
from pyrox_xtreme.point_processes.operators import (
MarkovModulatedPoisson,
ScheduleRetention,
)
# Shapes: K = 73 overpasses; N detections
# proposed (X1)
# p_sched(t) from overpass times and cloud fractions, 6-hour events
schedule = ScheduleRetention(overpass_times, cloud_fraction, event_duration=0.25)
# today (plumax)
# P_d(q), logistic in the emission rate
detect = pod.LogisticPOD(...)
# proposed (X2)
# on–off source: α, β, λ_on to be fitted
source = MarkovModulatedPoisson(
switch_on_rate=a, switch_off_rate=b, rate_on=lam_on, observation_window=365.0
)
# today* (pyrox-xtreme)
# λ_obs(t, q) = p_sched(t) P_d(q) λ(t) f(q)
observed = ThinningProcess(
source, retention_fn=lambda t, h, q=None: schedule(t) * detect(q)
)
# user
# 𝔼_f[P_d(q)] under the size density, by quadrature over q
mean_detection = jnp.sum(size_weights * detect(size_nodes))
# p̄(t) = p_sched(t) 𝔼_f[P_d(q)], the retention averaged over the sizes
mark_averaged = lambda t: schedule(t) * mean_detection
# proposed (X2)
# Pr(no event in 7 d) = π(t) exp(7 (G − Λ)) 1, π(t) filtered from the detections
outlook = 1.0 - jnp.exp(
source.log_prob_no_event(source.filter_state(times, mask, mark_averaged), 7.0)
)ThinningProcess is marked today* because it exists, but passing a marked base and a mark-dependent retention this way was not checked against its signature.
11 Decisions¶
Proposed, for the owner to accept or change.
| ID | Decision | Main reason |
|---|---|---|
| GS-D1 | functax holds operators that change a function’s representation; integrix holds those that integrate against a measure | keeps functax’s “a rule is data” and integrix decision 3 intact; one test decides every new operator |
| GS-D2 | Every linear operator returns the Euclidean transpose as adjoint, offers weighted_adjoint, wraps __call__ in custom_vjp, and filter plans carry a self_adjoint flag | reflect, wrap and constant filters are self-adjoint, mirror, nearest and masked ones are not (§5), and a wrong adjoint fails silently at the edges |
| GS-D3 | Grid transfer is a new public module functax.transfer; a Transfer holds the two grids’ cell volumes, so R = M_H⁻¹ Pᵀ M_h (c = (h/H)^D on uniform cells); gridax adopts it with volumes of ones (c = 1) | c cancels in the coarse correction but scales a restricted field by 2^D, and a scalar c does not conserve on nonuniform cells |
| GS-D4 | The trace is a plan onto a curve rule’s nodes, bilinear by default; the flux stays integrix.rule.integrate | the strip method is biased by up to 12 % at oblique winds, and integrix decision 13 already gives line integrals to integrix |
| GS-D5 | IntegralOperator lives in integrix on the existing KernelLike protocol; integrix never imports kernellib and never names a function nystrom | kernel means, Bayesian quadrature, Fredholm and Volterra operators belong together; kernellib’s Nyström is a different method Williams & Seeger, 2001 |
| GS-D6 | The spectral response stays radiomax’s response_matrix; its compact form is radiomax’s compact_response, with dense rows when a band is not sparse | one response matrix in the stack, as the owner decided on 23 Nov 2026; narrow bands are 7 % dense, broad ones may not be |
| GS-D7 | integrix.green ships only parameter-light free-space kernels; the Gaussian plume kernel lives in plumax | dispersion coefficients are physics |
| GS-D8 | Schedule thinning and the MMPP live in pyrox-xtreme beside ThinningProcess; conditional persistency lives in plumax.population | they are operators on intensities; persistency metrics are already plumax’s |
| GS-D9 | Volterra operators are causal integral operators in integrix, with the exponential kernel as a one-state scan | the Hawkes compensator is one, and a closure with memory (gap row 31) would be the next |
12 Open questions¶
| ID | Question | Recommendation |
|---|---|---|
| GS-O1 | Should IntegralOperator live in functax, beside its kernel interpolation plans, rather than in integrix? | integrix (GS-D5). It sums a rule, and its relatives are already there; geonnax importing integrix for a kernel layer costs nothing, since integrix is Core. |
| GS-O2 | Should self_adjoint filters skip the scatter and reuse the forward pass as the adjoint? | Yes, behind the flag, with the dot-product test still run in CI for every mode. |
| GS-O3 | How far should I3 go with singular kernels: the diagonal cell average only, or product integration for near-singular entries too? | Diagonal only, with the accuracy limit documented and a test that shows it. |
| GS-O4 | Should coarsen_grid pad an axis that does not nest, crop it, or refuse? | Refuse with a GeometryError naming the padding, since a silent pad changes a conservative total. |
| GS-O5 | Is the independence of overpasses in ScheduleRetention acceptable, or do clouds need correlation in time? | Independence first; cloud persistence is a known effect and would enter as a Markov cloud state, the same machinery as the MMPP. |
| GS-O6 | Should X3 replace plumax’s refusal for Hawkes and renewal intensities, or sit beside it as new functions? | New functions first (conditional_*), then retire the refusal once the closed forms match simulation in tests. |
13 Steps¶
Each step is one issue, filed in the repository whose code changes and linked as a sub-issue of one epic in jejjohnson/geostack. S1, S4 and S6 can start in parallel.
| Step | Repo | Work | Oracle | Gate |
|---|---|---|---|---|
| S1 | functax | FilterPlan and the scheme twins GaussianFilter, BoxFilter, Correlation, FFTFilter; custom_vjp on plans | dot-product test for all five modes, with and without a mask; asymmetry 0 for reflect, wrap and constant and nonzero for mirror and nearest (§5); agreement with SciPy’s ndimage.gaussian_filter | GS-D2, GS-O2 |
| S2 | functax | functax.transfer: coarsen_grid, Transfer, interpolating_transfer, conservative_transfer, galerkin_product; public overlap bands | R = M_H⁻¹ Pᵀ M_h, and c Pᵀ on uniform cells, to rounding; galerkin symmetric and tagged on uniform masses, untagged on nonuniform ones; mass conservation to 10⁻¹⁴ at 2:1 and 3:1 and on nonuniform rectilinear cells, and a constant restricted to itself; coarse correction independent of c (§5); float32 behaviour measured | GS-D3, GS-O4 |
| S3 | functax, then plumax | trace_plan, boundary_curve; plumax CrossSectionalFlux on the trace and integrix.rule.integrate | flux / Q within 10⁻³ at 0° and 30° winds at 200 and 500 m (§5) | GS-D4, S2 |
| S4 | integrix | integrix.operator: IntegralOperator (dense and low-rank), convolution | expect.kernel_mean to 10⁻¹²; flat memory as M grows | GS-D5, GS-O1 |
| S5 | integrix, then plumax | integrix.green with PoissonGreen, ScreenedPoissonGreen, HeatGreen, green_operator; plumax ColumnPlumeKernel | a manufactured Poisson solution; the cell average of log r against its closed form; the plume’s crosswind integral times U equals Q | GS-D7, GS-O3, S4 |
| S6 | pyrox-xtreme | ScheduleRetention, MarkovModulatedPoisson, mmpp_no_event_log_prob, the forward filter of the on–off state | detected fraction against schedule × clear sky × 𝔼[P_d] (§5); MMPP persistency against simulation (0.355 against 0.354); the state filter with the mark-averaged retention recovers π_on from simulated thinned detections | GS-D8, GS-O5 |
| S7 | plumax | conditional_occurrence_probability, conditional_wait_time for Hawkes and renewal intensities, with posterior versions | closed forms against forward simulation of the same process given the same complete history | GS-O6, S6 not required |
| S8 | integrix | solve_second_kind, SecondKindSolution, ConvergenceError | the rank-one case to 10⁻¹⁵; spectral convergence with Gauss–Legendre (§5); a symmetric indefinite system (constant kernel, two weights of ½, λ = 2) solved by GMRES, never CG | S4 |
| S9 | integrix, then pyrox-xtreme | VolterraOperator with the exponential scan; pyrox-xtreme’s Hawkes compensator on it | the scan against a dense causal quadrature; the Hawkes log-likelihood unchanged | GS-D9, S4 |
| S10 | geostack | update the Operator Curriculum page and the gaps doc as steps land; add the decisions to the functax and integrix design pages | every coverage row checked against the released names | after each step |
| S11 | radiomax, then radtrax | compact_response, CompactResponse, accepted by apply_response and apply_response_adjoint; radtrax’s instruments keep the compact form | the compact product equals the dense one to 10⁻¹² above the threshold; the adjoint passes the dot-product test; an EMIT-like band keeps 7 % of a 0.01 cm⁻¹ grid (§5) | GS-D6 |
Later, not filed now: gridax’s multigrid on functax.transfer (after S2 releases), a kernel-integral layer in geonnax (after S4), a Markov cloud state in ScheduleRetention (after GS-O5), and the deferred F4 transforms.
14 What it does not do¶
| Not here | Where instead |
|---|---|
| particle filters, SMC samplers, resampling | filterax’s SMC design (accepted), with resampling in integrix.expect |
| regularised inversion of first-kind equations, tomography | argminax and vardax, on the operator from I1 |
| staggered C-grid transfers, Shapiro and Laplacian smoothers | gridax, built from functax’s 1-D overlap bands |
| coordinate reference systems and polygon overlaps between projections | geotoolz, feeding functax’s geometry |
| the physics of plume dispersion (stability classes, σ_y fits) | plumax |
| kernels for Gaussian processes, features, the landmark Nyström | kernellib |
| Koopman, DMD, reduced models, DeepONet, splitting composers and the other priority-2 gaps | their own designs, in the packages the gaps doc names |
| Laplace, Z and Radon transforms, finite elements | deferred until a consumer appears |
15 References¶
The stack pages and repositories were read on 4 Dec 2026. The books and papers are cited in the text from references.bib, each checked against its publisher’s record on 4 Dec 2026, and MyST lists them at the end of the page.
The operator curriculum and its ranked gap list (draft pages outside this repository).
functax and its design page: decisions 2, 4 and 7, and the note that multigrid restriction could be the scaled adjoint of prolongation.
integrix, its design page (decisions 2 and 3) and integrix over space (decision 13).
gridax
solvers/multigrid.py; pyroxpyrox-xtreme/point_processes; plumaxpopulationandlagrangian.filterax’s Sequential Monte Carlo design, the template for this page.
- Li, Z., Kovachki, N., Azizzadenesheli, K., Liu, B., Bhattacharya, K., Stuart, A., & Anandkumar, A. (2021). Fourier neural operator for parametric partial differential equations. International Conference on Learning Representations. https://arxiv.org/abs/2010.08895
- Kovachki, N., Li, Z., Liu, B., Azizzadenesheli, K., Bhattacharya, K., Stuart, A., & Anandkumar, A. (2023). Neural operator: learning maps between function spaces with applications to PDEs. Journal of Machine Learning Research, 24(89), 1–97. https://jmlr.org/papers/v24/21-1524.html
- Briggs, W. L., Henson, V. E., & McCormick, S. F. (2000). A Multigrid Tutorial (2nd ed.). SIAM. 10.1137/1.9780898719505
- Trottenberg, U., Oosterlee, C. W., & Schüller, A. (2001). Multigrid. Academic Press.
- Jones, P. W. (1999). First- and second-order conservative remapping schemes for grids in spherical coordinates. Monthly Weather Review, 127(9), 2204–2210. https://doi.org/10.1175/1520-0493(1999)127<2204:FASOCR>2.0.CO;2
- Ullrich, P. A., & Taylor, M. A. (2015). Arbitrary-order conservative and consistent remapping and a theory of linear maps: Part I. Monthly Weather Review, 143(6), 2419–2440. 10.1175/MWR-D-14-00343.1
- Kress, R. (2014). Linear Integral Equations (3rd ed., Vol. 82). Springer. 10.1007/978-1-4614-9593-2
- Duffy, D. G. (2015). Green’s Functions with Applications (2nd ed.). Chapman. 10.1201/b18159
- Lindgren, F., Rue, H., & Lindström, J. (2011). An explicit link between Gaussian fields and Gaussian Markov random fields: the stochastic partial differential equation approach. Journal of the Royal Statistical Society: Series B, 73(4), 423–498. 10.1111/j.1467-9868.2011.00777.x
- Stockie, J. M. (2011). The mathematics of atmospheric dispersion modeling. SIAM Review, 53(2), 349–372. 10.1137/10080991X
- Hawkes, A. G. (1971). Spectra of some self-exciting and mutually exciting point processes. Biometrika, 58(1), 83–90. 10.1093/biomet/58.1.83
- Daley, D. J., & Vere-Jones, D. (2003). An Introduction to the Theory of Point Processes, Volume I: Elementary Theory and Methods (2nd ed.). Springer. 10.1007/b97277
- Lewis, P. A. W., & Shedler, G. S. (1979). Simulation of nonhomogeneous Poisson processes by thinning. Naval Research Logistics Quarterly, 26(3), 403–413. 10.1002/nav.3800260304
- Ogata, Y. (1981). On Lewis’ simulation method for point processes. IEEE Transactions on Information Theory, 27(1), 23–31. 10.1109/TIT.1981.1056305
- Fischer, W., & Meier-Hellstern, K. (1993). The Markov-modulated Poisson process (MMPP) cookbook. Performance Evaluation, 18(2), 149–171. 10.1016/0166-5316(93)90035-S