Capability index: GeoNumerics
Layers: GeoStack · GeoNumerics · GeoML · GeoModels.
Every public name in the libraries geostack builds on, each listed
once under the shortest module path that exports it, with the first
sentence of its docstring. Search this page before writing a
loader, a model, a training step or a helper in a script or a
notebook: if what you need is here, use it; if it is almost here,
extend it where it lives. Regenerate with make capabilities after
changing a public API (tests/test_capabilities.py checks it is
current).
This page is the GeoNumerics layer. It imports no other layer.
Listed at gaussx 0.8.4, gridax 0.4.0, spectraldiffx 0.1.2, functax 0.0.15, argminax 0.0.11, integrix 0.0.13, geophysix 0.0.11, radiomax 0.0.14, tracerax 0.2.0.
Upstream: gaussx¶
Structured linear algebra and Gaussian primitives on lineax.
gaussx¶
| Name | Kind | What it does |
|---|---|---|
AbstractIntegrator | class | Protocol for Gaussian integral approximation. |
AbstractLikelihood | class | Base class for likelihood functions with optional analytical ELL. |
AbstractLogdetStrategy | class | Protocol for a log-determinant strategy. |
AbstractPreconditioner | class | Protocol for preconditioners that produce an approximate inverse. |
AbstractSketch | class | A random sketching matrix S ∈ ℝ^(d × M), sampled once. |
AbstractSmoother | class | A smoother u ← S(u, b) for A u = b on one level. |
AbstractSolveStrategy | class | Protocol for a linear-solve strategy. |
AbstractSolverStrategy | class | Protocol for a solver strategy that pairs a solve and a log-determinant. |
AnalyticalPsiStatistics | class | Protocol for kernels with closed-form Ψ statistics. |
AssumedDensityFilter | class | KL-optimal Gaussian projection of g(x) via moment matching. |
AutoSolver | class | Automatic solver selection from the operator’s type, size and tags. |
BBMMSolver | class | CG solve and SLQ logdet with BBMM’s defaults (Gardner et al. 2018). |
BYM2GMRF | class | The BYM2 pair (b, u*) (Riebler et al., 2016), with its exact density. |
BernoulliLikelihood | class | Bernoulli likelihood with logit link. |
BinomialLikelihood | class | Binomial likelihood with logit link. |
BlockDiag | class | Block-diagonal operator A = blockdiag(A_1, …, A_D), one block per slice. |
BlockTriDiag | class | Block-tridiagonal operator A with a symmetric off-diagonal band. |
CGSolver | class | Conjugate-gradient solve with a stochastic log-determinant. |
CUR | class | CUR decomposition A ≈ C U R, with C = A_:,J and R = A_I,:. |
CallableLikelihood | class | A factorised likelihood from a per-site log density. |
CapacitanceSolver | class | Solve a base system subject to homogeneous point constraints. |
Chandrupatla | class | Chandrupatla’s hybrid inverse-quadratic / bisection root finder. |
ColumnID | class | Column interpolative decomposition A ≈ A_:,J X. |
ComposedSolver | class | Mix-and-match a solve and a log-determinant from different strategies. |
ConstantSDE | class | State-space form of the constant kernel k(τ) = σ_k². |
ConstrainedGMRF | class | A GaussianMRF conditioned on hard linear constraints A_c x = e. |
CosineSDE | class | State-space form of the cosine kernel k(τ) = σ_k² cos(ω₀ τ). |
CubatureIntegrator | class | Third-order spherical-radial cubature on 2 D_x equally weighted points. |
DAREResult | class | Output of dare: the steady-state covariance Σ_x,∞ and gain G_∞. |
DenseFallbackWarning | class | Warning emitted when a structured primitive materialises an operator. |
DenseLogdet | class | Exact log-determinant by gaussx’s structural dispatch. |
DenseSolver | class | Exact solver strategy through gaussx structural dispatch. |
DiagonalSplit | class | A system A = base + diag(diagonal), read back into its two parts. |
DiagonalizedOperator | class | Linear operator A = W⁻¹ diag(γ) W given by a transform pair. |
EigenDecomposition | class | Precomputed eigendecomposition A = V diag(γ) V⁻¹ of a square matrix. |
EmissionModel | class | Linear observation (emission) model with a dense observation operator H. |
FITCPreconditioner | class | Nyström-plus-diagonal (“FITC”) preconditioner of A = K_XX + Λ. |
FifthOrderCubatureIntegrator | class | Fifth-order fully symmetric cubature on 2 D_x² + 1 points. |
FilterState | class | Output of kalman_filter: the filtered and predicted moments of x_t. |
GaussHermiteIntegrator | class | Gauss-Hermite integrator: a tensor-product rule on order^D_x points. |
GaussianExpFam | class | Gaussian 𝒩(μ, Σ) held by its natural parameters (Λ μ, −½ Λ). |
GaussianLikelihood | class | Gaussian likelihood with isotropic noise, with a closed-form ELL. |
GaussianMRF | class | Gaussian Markov random field x ~ 𝒩(μ, Λ⁻¹) with a structured precision Λ. |
GaussianSites | class | Time-varying Gaussian likelihood sites in natural parameterization. |
GaussianSketch | class | Gaussian sketch: i.i.d. entries S_ij ~ 𝒩(0, 1/d). |
GaussianState | class | Gaussian belief as a pair of mean and covariance operator. |
HeteroscedasticGaussianLikelihood | class | Heteroscedastic Gaussian likelihood with input-dependent noise. |
IndefiniteSLQLogdet | class | Stochastic log |det(A + σ I)| for symmetric, possibly indefinite, A. |
InformationDiagnostics | class | Output of information_diagnostics. |
IntegratedWienerSDE | class | State-space form of the p-times integrated Wiener process. |
InterpolatedOperator | class | Structured kernel interpolation A = W_interp K_ℐℐ W_interpᵀ ≈ K_XX. |
IntrinsicGMRF | class | Improper Gaussian field x ~ 𝒩(μ, (τ R)⁺) on the complement of ker R. |
JacobiPreconditioner | class | Diagonal preconditioner M⁻¹ = diag(1 / |diag(A)|). |
KeyedSolver | class | Bind a PRNG key to a strategy’s stochastic log-determinant (gh-384). |
Kronecker | class | Kronecker product A = A_1 ⊗ … ⊗ A_D, applied one factor at a time. |
KroneckerSum | class | Kronecker sum A_1 ⊕ A_2 = A_1 ⊗ I + I ⊗ A_2 of two square operators. |
KroneckerSumSqrt | class | Symmetric square root S of A_1 ⊕ A_2 from the factor eigenvectors. |
LOOResult | class | Result of leave_one_out_cv: the LOO log-likelihood and predictives. |
LOVECache | class | Cached rank-k Lanczos approximation Q diag(θ)⁻¹ Qᵀ of Σ_y⁻¹. |
LSMRSolver | class | LSMR iterative least-squares solver (Fong & Saunders 2011). |
LaplaceModel | class | The latent Gaussian model of a Laplace fit, with the maps one Newton step needs. |
LaplaceResult | class | The Gaussian approximation 𝒩(x̂, Λ_x|y⁻¹) at the mode. |
LinearGaussianPosterior | class | Posterior 𝒩(x_a, P_a) of linear_gaussian_update. |
LinearizedSDE | class | Linear surrogate dx(t) = (F_c,t x(t) + c_t) dt + L_c db(t) of an SDE. |
LineaxSolver | class | A lineax solver as a gaussx solve strategy. |
LowRankUpdate | class | Low-rank update A = A₀ + U D Vᵀ of a base operator, with D = diag(d). |
LowerBlockTriDiag | class | Lower block-bidiagonal operator L, the block Cholesky factor of A. |
MINRESSolver | class | MINRES solver for symmetric, possibly indefinite, systems. |
MaskedOperator | class | Masked view A = A₀[m_r, m_c] of a square base operator A₀. |
MaternSDE | class | State-space form of the Matérn kernel of order p, smoothness p + ½. |
MomentMatchResult | class | Tilted log-normaliser and its derivatives with respect to the cavity mean. |
MonteCarloIntegrator | class | Monte Carlo moment matching: sample, propagate, take empirical moments. |
MultigridLevel | class | One level of a hierarchy: A_ℓ, its transfers and its smoother. |
MultigridPreconditioner | class | One V-cycle as the preconditioner M⁻¹ ≈ A⁻¹. |
MultigridSolver | class | CG preconditioned by a V-cycle over the caller’s levels. |
NegativeBinomialLikelihood | class | Negative-binomial likelihood with log link (NB2, a gamma-Poisson mixture). |
NystromLogdet | class | Nyström-preconditioned SLQ log-determinant of K + σ² I (Wenger et al., 2022). |
NystromPreconditioner | class | Randomized Nyström preconditioner for K + σ² I. |
OperatorPreconditioner | class | Use an externally supplied approximate inverse as a preconditioner. |
OrthonormalSketch | class | Gaussian sketch with orthonormal rows, S Sᵀ = I_d. |
PartialCholeskyPreconditioner | class | Preconditioner from a pivoted partial Cholesky factor. |
PeriodicSDE | class | State-space form of the periodic (MacKay) kernel, as J + 1 harmonics. |
PoissonLikelihood | class | Poisson likelihood with log link. |
PreconditionedCGSolver | class | CG with a pivoted partial Cholesky preconditioner. |
PredictionCache | class | Cached training solve α = Σ_y⁻¹ y (and factor L_y) for amortized predictions. |
ProductSDE | class | Product of two SDE kernels, by Kronecker composition. |
PropagationResult | class | Output moments of a Gaussian pushed through a nonlinear map g. |
QuasiPeriodicSDE | class | Quasi-periodic kernel: a Matérn factor times a periodic factor. |
RootDecomposition | class | Tall factor R of a root decomposition, A ≈ R Rᵀ. |
RowSamplingSketch | class | Weighted row-sampling sketch. |
SDEKernel | class | Abstract state-space form of a kernel k(τ): a linear SDE. |
SDEParams | class | Continuous-time matrices (F_c, L_c, H, Q_c, Σ_x,∞) of a linear SDE. |
SLQLogdet | class | Stochastic log-determinant by stochastic Lanczos quadrature (SLQ). |
SLRResult | class | Linear-Gaussian surrogate produced by statistical linear regression. |
SRHTSketch | class | Subsampled randomized Hadamard transform sketch. |
SitePosterior | class | 𝒩(μ_f|y, Σ_f|y) for a covariance-form prior and diagonal sites. |
SketchAndPrecondLSMR | class | Sketch-and-precondition LSMR for tall least squares (Rokhlin & Tygert, 2008). |
SoftmaxLikelihood | class | Softmax (categorical) likelihood for multi-class classification. |
SolveInfo | class | How a solve ended, from linear_solve_with_info. |
SparseCholeskyFactor | class | Sparse Cholesky factor on a static symbolic pattern. |
SparseCholeskySolver | class | Exact solve / logdet / diag_inv through a sparse Cholesky factor. |
SparseOperator | class | Sparse matrix A with a static SparsityPattern and traced values. |
SparseSignSketch | class | Sparse sign sketch (sparse Johnson-Lindenstrauss transform). |
SparsityPattern | class | Static, hashable sparsity pattern of an M × N matrix A. |
SpectralFunction | class | f(A) = W⁻¹ diag(f(γ)) W for a symmetric A with a factored eigenbasis. |
StudentTLikelihood | class | Student-t likelihood for robust regression. |
SumOfKroneckers | class | Sum of Kronecker products ∑_j A_j ⊗ B_j, applied term by term. |
SumOfKroneckersSqrt | class | Lazy Lanczos square root A^½ of a SumOfKroneckers covariance. |
SumSDE | class | Sum of independent SDE kernels, stacked block-diagonally. |
SymbolicCholesky | class | Symbolic Cholesky factor of a symmetric sparsity pattern. |
TaylorIntegrator | class | First- or second-order Taylor expansion of g about the mean. |
Toeplitz | class | Symmetric Toeplitz matrix A = toeplitz(t) from its first column t. |
ToeplitzCholesky | class | Circulant-embedding sample factor L, N × M, with L Lᵀ = toeplitz(t). |
UDLDecomposition | class | Banded factorisation Λ_x = U D Uᵀ of a block-tridiagonal precision. |
UnscentedIntegrator | class | Unscented transform: 2 D_x + 1 deterministic sigma points. |
UpperBlockTriDiag | class | Upper block-bidiagonal operator U, the transpose of a LowerBlockTriDiag. |
WeightedJacobi | class | Weighted Jacobi: u ← u + ω D⁻¹ (b − A u), sweeps times. |
add_jitter | function | Diagonal jitter A + β I for numerical stability. |
ar1_precision | function | Precision of a stationary AR(1) process with marginal precision τ. |
as_diagonalized | function | Express an operator as one DiagonalizedOperator, if possible. |
as_linear_operator | function | Wrap a raw matvec callable as a tagged lineax operator. |
besag_structure | function | Validate a graph Laplacian as a Besag (ICAR) structure matrix. |
block_diagonal_tag | constant | block_diagonal_tag |
block_tridiagonal_tag | constant | block_tridiagonal_tag |
blr_diag_update | function | Damped BLR step on the natural parameters of a diagonal Gaussian. |
blr_full_update | function | Damped BLR step on the natural parameters of a full-rank Gaussian. |
build_prediction_cache | function | Solve Σ_y α = y and cache the result. |
bym2_precision | function | Joint precision Λ of the BYM2 pair (b, u*) (Riebler et al., 2016). |
cavity_distribution | function | EP cavity distribution: remove a fraction α of a site from the marginal. |
cavity_from_marginal | function | Cavity distribution: the marginal with one site divided out. |
cholesky | function | Lower Cholesky factor L of an operator, structured where A is. |
cholesky_logdet | function | Log-determinant log det A from a Cholesky factor L of A = L Lᵀ. |
circulant | function | (Block-)circulant operator C from its first column c. |
circulant_from_symbol | function | (Block-)circulant operator C = DFT⁻¹ diag(γ) DFT from its symbol γ. |
collapsed_elbo | function | Collapsed ELBO (Titsias bound) for sparse GP regression. |
column_id | function | Randomized column interpolative decomposition (Voronin & Martinsson, 2017). |
compose_solver | function | One strategy from a solver, a preconditioner and a log-determinant. |
compute_psi_statistics | function | Compute Ψ statistics, dispatching to analytical or numerical. |
conditional | function | Conditional p(x_A ∣ x_B = b) of a joint Gaussian 𝒩(μ, Σ) from observed entries. |
conditional_interpolate | function | Two-filter fusion at t from a filtered state and a backward message. |
conditional_variance | function | Predictive variance: the Schur-complement diagonal plus a variational term. |
cost_expectation | function | Expected cost of a prediction under an uncertain state. |
cov_transform | function | Covariance propagation through a linear map, J Σ Jᵀ. |
create_grid | function | Regular grid axes g_d = linspace(lo_d, hi_d, N_d), one per dimension. |
cubature_points | function | Spherical-radial cubature points and weights, 2 D_x of them. |
cur | function | Randomized CUR decomposition (Voronin & Martinsson, 2017, §4). |
cvi_update_sites | function | Damped natural-gradient update of CVI sites. |
damped_natural_update | function | Damped update in natural-parameter space. |
dare | function | Steady-state Kalman filter covariance and gain (the filtering DARE). |
diag | function | Diagonal diag(A) of an operator, with structural dispatch. |
diag_conditional_variance | function | Diagonal of the Schur complement, max([K_XX]_nn − [A_X K_ZX]_nn, 0). |
diag_inv | function | Diagonal of the inverse, diag(A⁻¹), without forming A⁻¹. |
diagonal_tag | constant | diagonal_tag |
discrepancy_step_size | function | Adaptive EKI tempering step: the data misfit controller. |
discrete_lyapunov_solve | function | Solve the discrete Lyapunov equation X − A X Aᵀ = B by diagonalising A. |
discretize_mfd | function | Discretise a linear SDE by matrix-fraction decomposition. |
discretize_mfd_sequence | function | Vectorised gaussx.discretize_mfd over a stack of steps Δt_1:T. |
eig | function | Eigenvalues and eigenvectors of A, with structural dispatch. |
eigh_generalized | function | Generalised eigenproblem A v = γ B v, A symmetric and B symmetric PSD. |
eigvals | function | Eigenvalues of A only, with structural dispatch. |
eki_step | function | One ensemble Kalman inversion (EKI) update. |
elbo | function | Evidence lower bound (ELBO) from a likelihood and a precomputed KL. |
enkf_analysis | function | Stochastic (perturbed-observation) ensemble Kalman analysis step. |
ensemble_covariance | function | Empirical covariance from an ensemble as a low-rank operator. |
ensemble_cross_covariance | function | Cross-covariance between two ensembles with the same members. |
ensemble_kalman_gain | function | Kalman gain from an ensemble and its image in observation space. |
ensemble_rts_step | function | One backward step of the ensemble Rauch-Tung-Striebel smoother. |
ep_tilted_moments | function | Moments of the scalar EP tilted distribution, elementwise over a batch. |
estimate_spectral_bounds | function | Estimate the extreme eigenvalues (γ_min, γ_max) of a symmetric operator. |
etkf_analysis | function | ETKF analysis ensemble, without forming the (|ℰ|, |ℰ|) transform. |
etkf_transform | function | Ensemble Transform Kalman Filter (ETKF) analysis weights. |
euclidean_distance | function | Pairwise Euclidean distances ‖aₙ − bₘ‖₂. |
expectation_to_mean_chol | function | Mean μ and Cholesky factor of Σ from the expectation parameters. |
expectation_to_natural | function | Natural parameters (Λ μ, −½ Λ) from the expectation parameters. |
expectations_to_ssm | function | Marginals of a chain from its expectation parameters (𝔼[x], 𝔼[x xᵀ]). |
expected_log_likelihood | function | Unified expected log-likelihood with analytical dispatch. |
fem_matrices | function | Lumped mass C̃ and stiffness G of P1 elements on a triangle mesh. |
fem_projector | function | Observation matrix A of P1 interpolation: (A w)_k = ∑_i ψ_i(s_k) w_i. |
fifth_order_cubature_points | function | Fifth-order fully symmetric cubature points and weights. |
fisher_info | function | Fisher information of the mean μ, which is the precision Λ = Σ⁻¹. |
frobenius_norm | function | Frobenius norm ‖A‖_F of an operator, with structural dispatch. |
galerkin_levels | function | A hierarchy with Galerkin coarse operators A_ℓ₊₁ = R_ℓ A_ℓ P_ℓ. |
gaspari_cohn | function | Gaspari-Cohn (1999) fifth-order compactly supported taper. |
gauss_hermite_points | function | Tensor-product Gauss-Hermite points and weights for a standard Gaussian. |
gauss_kl | function | KL(first ‖ second): KL[q(f_ℐ) ‖ p(f_ℐ)] with p(f_ℐ) = 𝒩(0, K_ℐℐ). |
gauss_newton_operator | function | Matrix-free Gauss-Newton precision of a residual function. |
gauss_newton_precision | function | Gauss-Newton precision J_rᵀ J_r, optionally plus a prior precision. |
gaussian_entropy | function | Entropy of a multivariate normal 𝒩(μ, Σ), independent of the mean. |
gaussian_expected_log_lik | function | Expected Gaussian log-likelihood under q(x), the data term of an ELBO. |
gaussian_kl | function | KL(first ‖ second): KL[p ‖ q] between two multivariate normals. |
gaussian_log_prob | function | Multivariate normal log-density log 𝒩(x; μ, Σ) of a structured covariance. |
gaussian_taper | function | Gaussian localization taper ρ(r) = exp(−r² / (2 L²)). |
generalized_variance_scale | function | Generalized variance of an intrinsic GMRF (Sørbye & Rue, 2014). |
ggn_diagonal | function | Diagonal of the generalized Gauss-Newton matrix J_hᵀ J_h. |
gradient_expectation | function | Expected gradient of a scalar map under a Gaussian, via Stein’s lemma. |
grid_coupling_indices | function | Flat indices of masked-out grid cells adjacent to the masked-in region. |
grid_data | function | Inducing inputs X_ℐ, the Cartesian product of the grid axes. |
hadamard_transform | function | Unnormalized Walsh-Hadamard transform along the last axis. |
haversine_distance | function | Pairwise great-circle (haversine) distances on a sphere. |
hutchinson_hessian_diag | function | Stochastic Hessian diagonal by Hutchinson with Rademacher probes. |
iid_precision | function | Precision Λ = τ I of n independent effects with variance 1 / τ. |
infinite_horizon_filter | function | Infinite-horizon Kalman filter with the fixed steady-state gain G_∞. |
infinite_horizon_smoother | function | Infinite-horizon RTS smoother with the fixed steady-state gain G_smooth,∞. |
inflate_multiplicative | function | Multiplicative ensemble inflation about the sample mean. |
inflate_rtpp | function | Relaxation to prior perturbations (RTPP). |
inflate_rtps | function | Relaxation to prior spread (RTPS). |
information_diagnostics | function | Averaging kernel, DOFS and information content of a linear retrieval. |
interpolation_operator | function | The interpolation matrix W as a matrix-free operator, B × G. |
inv | function | Lazy inverse A⁻¹ of an operator, structured where A is. |
inv_quad_logdet | function | Joint inverse-quadratic and log-determinant via shared BBMM CG. |
is_block_diagonal | function | Check whether operator carries the block-diagonal tag. |
is_block_tridiagonal | function | Check whether operator carries the block-tridiagonal tag. |
is_diagonal | function | Re-exported from lineax. |
is_eigen_reducible | function | Whether a sum of Kronecker products has the exact two-term reduction. |
is_kronecker | function | Check whether operator carries the Kronecker tag. |
is_kronecker_sum | function | Check whether operator carries the Kronecker sum tag. |
is_low_rank | function | Check whether operator carries the low-rank tag. |
is_lower_triangular | function | Re-exported from lineax. |
is_negative_semidefinite | function | Re-exported from lineax. |
is_positive_semidefinite | function | Re-exported from lineax. |
is_symmetric | function | Re-exported from lineax. |
is_upper_triangular | function | Re-exported from lineax. |
joseph_update | function | Joseph-form posterior covariance of a Kalman update, stable for any gain. |
kalman_filter | function | Kalman filter forward pass for a linear-Gaussian state-space model. |
kalman_gain | function | Kalman gain of a linear-Gaussian observation of the state x. |
kernel_expectations | function | Kernel expectations Ψ₀, Ψ₁ and Ψ₂ for an uncertain input. |
kl_divergence | function | KL(first ‖ second): KL[q ‖ p] in the Bregman form on natural parameters. |
kl_standard_normal | function | KL(first ‖ second): KL[𝒩(μ, Σ) ‖ 𝒩(0, I)] from the standard normal. |
kronecker_mll | function | Exact marginal log-likelihood log p(y) of a Kronecker-structured GP. |
kronecker_posterior_predictive | function | Posterior mean and variance of a Kronecker GP at grid test inputs. |
kronecker_sum_sample | function | Sample from 𝒩(0, A_1 ⊕ A_2) through the factor eigendecompositions. |
kronecker_sum_solve | function | Solve a shifted Kronecker-sum system in tensor (unvectorised) form. |
kronecker_sum_tag | constant | kronecker_sum_tag |
kronecker_tag | constant | kronecker_tag |
laplace_model | function | Collect and check the pieces of the latent Gaussian model of a Laplace fit. |
laplace_result | function | The Gaussian approximation and the Laplace log-marginal at a mode. |
leave_one_out_cv | function | LOO-CV via the bordered-system identity, without refitting N times. |
ledoit_wolf_shrinkage | function | Ledoit-Wolf shrinkage of an ensemble covariance, without forming it. |
lift_known_values | function | Lift prescribed values to the right-hand side of A x = b. |
linear_gaussian_update | function | Matrix-free posterior of a linear-Gaussian observation. |
linear_solve | function | Solve A x = b through the unified front door. |
linear_solve_with_info | function | Solve A x = b as linear_solve does, and report how the solve ended. |
linearize_sde | function | Optimal linear drift of a nonlinear SDE along a Gaussian path. |
localization_matrix | function | Pairwise Gaspari-Cohn taper ρ(d(aₙ, bₘ); c). |
localized_kalman_gain | function | Ensemble Kalman gain with Hadamard (Schur-product) localization. |
log_likelihood_expectation | function | Expected log-likelihood of a callable under a Gaussian, by integration. |
log_marginal_likelihood | function | GP log marginal likelihood, by way of gaussx.gaussian_log_prob. |
log_partition | function | Log-partition of a Gaussian in natural form, normaliser included. |
logdet | function | Log-determinant log ∣det A∣ with structural dispatch on the operator type. |
love_cache | function | Precompute a Lanczos approximation of Σ_y⁻¹ for fast GP variances. |
love_residual | function | Relative solve residual of a LOVE cache for one cross-covariance. |
love_variance | function | Approximate the variance reduction k_X*ᵀ Σ_y⁻¹ k_X* from a LOVE cache. |
love_variance_error_bound | function | Upper bound on the variance over-estimate of a LOVE cache. |
low_rank_plus_diag | function | Build A = diag(a) + U D Vᵀ, a low-rank update of a diagonal base. |
low_rank_plus_identity | function | Build A = c I + U D Vᵀ, a low-rank update of a scaled identity. |
low_rank_tag | constant | low_rank_tag |
lower_triangular_tag | constant | lower_triangular_tag |
masked_moment_inputs | function | Make masked observation channels inert in a moment-matched update. |
masked_obs_covariance | function | Observation-error covariance with masked entries marginalised out. |
matern_spde_params | function | SPDE parameters (κ, τ, α) of a Matérn field. |
matheron_update | function | Posterior draws of x_A ∣ x_B = β from joint prior draws, by Matheron’s rule. |
mean_chol_to_expectation | function | Expectation parameters (𝔼[x], 𝔼[x xᵀ]) from the mean and Cholesky factor. |
mean_chol_to_natural | function | Natural parameters (Λ μ, −½ Λ) from the mean and the Cholesky factor of Σ. |
mean_cov_to_natural | function | Natural parameters (Λ μ, −½ Λ) from the mean and covariance, in operator form. |
mean_expectation | function | Expectation of a map under a Gaussian: 𝔼[g(x)], x ~ 𝒩(μ_x, Σ_x). |
meanfield_kalman_filter | function | Mean-field Kalman filter over L = D_x / d independent state blocks. |
meanfield_rts_smoother | function | Mean-field RTS smoother over L = D_x / d independent state blocks. |
mixture_quantile | function | Invert a CDF at one or more quantile levels by bracketed root finding. |
mixture_quantile_gaussian_approx | function | Quantiles of the Gaussian matched to an ensemble’s first two moments. |
moment_match | function | EP moment matching: tilted log-normaliser and its first two derivatives. |
moment_transform | function | Moment triple of (x, g(x)) for a Gaussian x. |
natural_to_expectation | function | Expectation parameters (𝔼[x], 𝔼[x xᵀ]) from the natural parameters. |
natural_to_mean_chol | function | Mean μ and Cholesky factor of Σ from the natural parameters (Λ μ, −½ Λ). |
natural_to_mean_cov | function | Mean μ and covariance Σ from the natural parameters, in operator form. |
naturals_to_ssm | function | Gauss-Markov chain (F_t, Σ_η,t, μ_x,0, Σ_x,0) from its natural parameters. |
negative_semidefinite_tag | constant | negative_semidefinite_tag |
newton_update | function | Convert a Newton step into the natural parameters of a site. |
nonlinear_kalman_filter | function | Moment-matched nonlinear Kalman filter (EKF, UKF, CKF, GHKF, …). |
nonlinear_kalman_predict | function | One moment-matched predict step through the dynamics f. |
nonlinear_kalman_update | function | One moment-matched update step through the observation map h. |
nonlinear_rts_smoother | function | Moment-matched nonlinear Rauch-Tung-Striebel smoother. |
nonlinear_rts_step | function | One moment-matched RTS backward step. |
oilmm_back_project | function | Back-project latent GP predictions to the observation space. |
oilmm_project | function | Project multi-output data to independent latent GPs via OILMM. |
pairwise_marginals | function | Joint Gaussian p(x_t, x_t+1) of each pair of consecutive states. |
parallel_kalman_filter | function | Parallel Kalman filter via jax.lax.associative_scan. |
parallel_rts_smoother | function | Parallel RTS smoother via reverse jax.lax.associative_scan. |
positive_semidefinite_tag | constant | positive_semidefinite_tag |
predict_mean | function | Predictive mean of a GP at the test inputs, from a prediction cache. |
predict_variance | function | Predictive variance of a GP at the test inputs, from a prediction cache. |
predictive_variance_sbpv | function | Simulation-based predictive variance (SBPV), unbiased and consistent. |
predictive_variance_spv | function | Stochastic predictive variance (SPV) by Rademacher diagonal probes. |
process_noise_covariance | function | Model-noise covariance Σ_η,t of a step, from the stationary covariance. |
product_operator | function | Lazy product A B, applied right to left. |
project | function | Projection A_X = K_Xℐ K_ℐℐ⁻¹ onto the inducing inputs via Cholesky solves. |
pseudo_logdet | function | Log pseudo-determinant: the log of the product of the non-zero eigenvalues. |
qb | function | Randomized QB factorisation A ≈ Q B with B = Qᵀ A. |
quadratic_form | function | Quadratic form xᵀ A⁻¹ x through a single solve. |
randomized_eigh | function | Partial eigendecomposition of a symmetric operator by Rayleigh-Ritz. |
randomized_nystrom | function | Randomized Nyström approximation  = U diag(γ̂) Uᵀ of a PSD A. |
randomized_svd | function | Truncated SVD A ≈ U diag(s) Vᵀ by randomized QB. |
range_finder | function | Orthonormal basis Q for the dominant range of A. |
riemannian_psd_correction | function | Riemannian gradient correction for PSD precision updates. |
root_decomposition | function | Root decomposition of an SPD operator: a tall factor R with A ≈ R Rᵀ. |
root_inv_decomposition | function | Inverse-root decomposition: a tall factor R⁻ with A⁻¹ ≈ R⁻ (R⁻)ᵀ. |
row_kron | function | Row-wise Kronecker (face-splitting) product A • B of two sparse operators. |
rp_cholesky | function | Randomly pivoted partial Cholesky of a PSD matrix A. |
rts_interpolate | function | Smoothed marginal at an unobserved step t from filtered and smoothed states. |
rts_sample | function | Joint draws of the state path x_1:T from p(x_1:T | y_1:T). |
rts_smoother | function | Rauch-Tung-Striebel backward smoother for kalman_filter output. |
rw1_structure | function | Structure matrix R = D₁ᵀ W D₁ of a first-order random walk. |
rw2_structure | function | Structure matrix R = D₂ᵀ D₂ of a second-order random walk. |
safe_cholesky | function | Cholesky factor with adaptive diagonal jitter for near-singular matrices. |
sample_joint_conditional | function | Joint draws of a partitioned Gaussian, and conditional draws from them. |
sample_mvn | function | Draw samples from 𝒩(μ, Σ), dispatching on the structure of Σ. |
sandwich | function | The sandwich A Σ Aᵀ of two operators, keeping compatible structure. |
scaled_operator | function | Lazy scalar multiple c A, applied after the matvec. |
schur_complement | function | Schur complement K_XX − K_XZ K_ZZ⁻¹ K_ZX, kept as a low-rank update. |
sde_autocovariance | function | Stationary autocovariance k(τ) of an SDE kernel at each lag τ. |
sde_kl_divergence | function | Drift path-KL between a linear and a nonlinear SDE along a Gaussian path. |
selected_inverse | function | The band of Σ = Λ⁻¹ for a symmetric positive-definite BlockTriDiag. |
sigma_point_kalman_update | function | One moment-matched update from evaluations the caller already has. |
sigma_points | function | Scaled unscented sigma points and weights, 2 D_x + 1 of them. |
site_evidence_correction | function | The correction from the pseudo-observation marginal to the site evidence. |
site_log_evidence | function | log Z of a Gaussian-site posterior, from its system A = K_XX + diag(d). |
site_mean_var_from_natural | function | Mean and variance of a site from its natural parameters. |
site_natural_from_tilted | function | Site natural parameters that turn the cavity into the tilted moments. |
site_posterior | function | The Gaussian posterior of diagonal sites under a covariance-form prior. |
sites_to_precision | function | Block-diagonal precision of the sites, as a BlockTriDiag. |
sketch_and_solve | function | Approximate least squares from a sketch. |
soar_taper | function | Second-order auto-regressive (SOAR) taper ρ(r) = (1 + |r| / L) exp(−|r| / L). |
solve | function | Solve A x = b with structural dispatch on the operator type. |
solve_columns | function | Solve A X = B column by column, with structured dispatch per column. |
solve_matrix | function | Solve A X = B with one factorisation for the whole matrix right-hand side. |
solve_rows | function | Solve A xᵢ = bᵢ for each row bᵢ of a matrix B, with one solve per row. |
solve_with_known_values | function | Solve A x = b on the unknowns, with x prescribed on the known set. |
sparse_cholesky | function | Sparse Cholesky factorisation of a symmetric positive-definite operator. |
sparse_conditional | function | Sparse-GP conditional q(f_X) = ∫ p(f_X ∣ f_ℐ) q(f_ℐ) df_ℐ, per output r. |
spde_precision | function | SPDE precision Λ_α = τ² K (C̃⁻¹ K)^(α−1) with K = κ² C̃ + G. |
spde_precision_grid | function | SPDE precision on a regular grid: a function of a Kronecker sum. |
spingp_log_likelihood | function | Log marginal likelihood log p(y_1:T) of a zero-mean SpInGP prior. |
spingp_posterior | function | Posterior mean μ_x|y and precision Λ_x|y of x_1:T under SpInGP. |
split_diagonal | function | Read A = K + diag(d) back into its kernel part K and its diagonal d. |
sqrt | function | Principal matrix square root A^½ with structural dispatch, lazy where possible. |
sqrt_inv_matmul | function | Inverse square root times a matrix, A^−½ B, by contour quadrature. |
sqrt_matmul | function | Square root times a matrix, A^½ B, by contour quadrature. |
ssm_to_expectations | function | Expectation parameters (𝔼[x], 𝔼[x xᵀ]) of a chain from its marginals. |
ssm_to_naturals | function | Natural parameters (Λ_x μ_x, −½ Λ_x) of a Gauss-Markov chain. |
stable_squared_distances | function | Squared Euclidean distances between two point sets, centred and widened. |
statistical_linear_regression | function | Moment-match a nonlinear conditional to a linear-Gaussian surrogate. |
submatrix | function | Sub-matrix A[I, J] of an operator, without forming the full matrix. |
sufficient_stats | function | Sufficient statistics (x, x xᵀ) of a Gaussian, over any batch axes. |
sum_of_kroneckers_sample | function | Sample from 𝒩(0, K) with a matrix-free Lanczos square root. |
sum_operator | function | Lazy sum A = A_1 + … + A_D, applied one summand at a time. |
svd | function | Singular value decomposition of A, with structural dispatch. |
svd_low_rank_plus_diag | function | Build A = diag(a) + U diag(s) Vᵀ from a truncated SVD. |
svgp_variance_adjustment | function | SVGP variance adjustment operator Q = K_ℐℐ⁻¹ Σ_ℐ K_ℐℐ⁻¹ − K_ℐℐ⁻¹. |
symbolic_cholesky | function | Symbolic analysis of a sparse Cholesky factorisation (host, cached). |
symmetric_tag | constant | symmetric_tag |
symmetrize | function | Symmetric part of the trailing two axes, removing round-off asymmetry. |
theta_design | function | Integration points and log-weights over hyperparameters θ. |
tikhonov_augment | function | Observation augmentation for Tikhonov-regularised EKI (TEKI). |
to_mean_cov | function | Mean μ and covariance Σ of a Gaussian in natural form. |
toeplitz_sample | function | Draw from 𝒩(0, toeplitz(t)) by circulant embedding and the FFT. |
trace | function | Trace tr(A) of an operator, with structural dispatch. |
trace_and_diag | function | Joint stochastic estimate of tr(A) and diag(A) from one probe pass. |
trace_correction | function | Trace term of the Titsias collapsed ELBO, the Nyström approximation error. |
trace_product | function | Trace of a product of two operators, tr(A B), with structural dispatch. |
tridiagonal_solve | function | Solve a tridiagonal system A x = b from its three bands. |
tridiagonal_solve_batched | function | Solve independent tridiagonal systems over leading batch axes. |
tridiagonal_tag | constant | tridiagonal_tag |
udl_decomposition | function | Factorise a symmetric block-tridiagonal precision as Λ_x = U D Uᵀ. |
udl_from_ssm_params | function | Build the UDLDecomposition of a Gauss-Markov chain’s precision. |
udl_to_ssm_params | function | Read the equivalent Gauss-Markov chain off a UDLDecomposition. |
uncertain_bgplvm_predict | function | Multi-output uncertain GP prediction for a Bayesian GP-LVM. |
uncertain_gp_predict | function | Predictive mean and variance of a GP at an uncertain input. |
uncertain_gp_predict_mc | function | Monte Carlo GP prediction at an uncertain input, by total variance. |
uncertain_svgp_predict | function | Predictive mean and variance of an SVGP at an uncertain input. |
uncertain_vgp_predict | function | Predictive mean and variance of a dense VGP at an uncertain input. |
unit_diagonal_tag | constant | unit_diagonal_tag |
unwhiten | function | Unwhiten a variational mean: μ_ℐ = L_ℐℐ μ_z. |
unwhiten_covariance | function | Unwhiten a variational covariance: Σ_ℐ = L_ℐℐ Σ_z L_ℐℐᵀ. |
upper_triangular_tag | constant | upper_triangular_tag |
variational_elbo_gaussian | function | Uncollapsed (SVGP) ELBO for a Gaussian likelihood. |
variational_elbo_mc | function | Monte Carlo ELBO for non-conjugate likelihoods. |
vb_mean_correction | function | Low-rank VB correction of the Laplace mean (Van Niekerk & Rue, 2024). |
whitened_svgp_predict | function | Whitened SVGP prediction: per-input means μ_n and variances σ²_n. |
woodbury_solve | function | Solve (A + U D Uᵀ) x = b by the Woodbury identity, without the operator. |
Upstream: gridax¶
Structured grids, masks and the finite-volume operators on them.
gridax¶
| Name | Kind | What it does |
|---|---|---|
ArakawaCGrid1D | class | 1-D Arakawa C-grid topology (no metric). |
ArakawaCGrid2D | class | 2-D Arakawa C-grid topology (no metric). |
ArakawaCGrid3D | class | 3-D Arakawa C-grid topology (no metric). |
BC | class | The boundary condition of each face of a grid. |
CField | class | An array with named dims, static labels and a stagger per axis. |
CartesianAGrid1D | class | 1-D Cartesian collocated grid. |
CartesianAGrid2D | class | 2-D Cartesian collocated grid. |
CartesianAGrid3D | class | 3-D Cartesian collocated grid. |
CartesianCGrid1D | class | 1-D Cartesian Arakawa C-grid (uniform spacing). |
CartesianCGrid2D | class | 2-D Cartesian Arakawa C-grid (uniform spacing). |
CartesianCGrid3D | class | 3-D Cartesian Arakawa C-grid (uniform spacing). |
CoastGhosts | class | The dry points one side of a coast, and where the water is from them. |
CollocatedGrid1D | class | 1-D collocated topology: Nx points, no ghost ring. |
CollocatedGrid2D | class | 2-D collocated topology: [Ny, Nx] points, no ghost ring. |
CollocatedGrid3D | class | 3-D collocated topology: [Nz, Ny, Nx] points, no ghost ring. |
CurvilinearGrid1D | class | 1-D curvilinear C-grid with a uniform metric. |
CurvilinearGrid2D | class | 2-D curvilinear C-grid with a uniform metric. |
CurvilinearGrid3D | class | 3-D curvilinear C-grid with a uniform metric. |
Dirichlet | class | A value at the wall. |
Extrapolation | class | Extrapolate the polynomial through the first interior nodes. |
GridOps | class | The canonical functions with a grid and a mask filled in. |
LossyConversionWarning | class | A conversion that averages, so the way back does not give the field again. |
Mask1D | class | Unified Arakawa C-grid mask for a 1-D Cartesian domain. |
Mask2D | class | Unified Arakawa C-grid mask for a 2-D Cartesian domain. |
Mask3D | class | Unified Arakawa C-grid mask for a 3-D Cartesian domain. |
Neumann | class | A gradient ∂φ/∂n along the outward normal. |
Outflow | class | Zero gradient by copy: every layer holds the nearest interior node. |
Periodic | class | Wrap around: φ(−k) = φ(N+1−k), the node one period away. |
Reflective | class | Even symmetry about the wall: φ(−k) = φₖ. |
Robin | class | A mixed condition at the wall, a φ + b ∂φ/∂n = c. |
Slip | class | The tangential velocity at a solid wall, from no-slip to free-slip. |
SphericalAGrid2D | class | 2-D collocated grid on a sphere. |
SphericalCGrid2D | class | 2-D Arakawa C-grid on a sphere. |
SphericalCGrid3D | class | 3-D Arakawa C-grid on a sphere. |
Sponge | class | Relax the ghost layers towards a background value. |
StaggerMismatchError | class | Fields on different points of the grid met in one operation. |
StencilCapability1D | class | Directional count of contiguous wet neighbours for each 1-D grid cell. |
StencilCapability2D | class | Directional count of contiguous wet neighbours for each 2-D grid cell. |
StencilCapability3D | class | Directional count of contiguous wet neighbours for each 3-D grid cell. |
StretchedCGrid1D | class | 1-D Cartesian C-grid with irregular axes. |
StretchedCGrid2D | class | 2-D Cartesian C-grid with irregular axes. |
StretchedCGrid3D | class | 3-D Cartesian C-grid with irregular axes. |
Wall | class | A solid wall: one condition for the normal component, one for the others. |
advect | function | The finite-volume tendency of a tracer, -∇·(q u), at T. |
advect_momentum | function | The advection of momentum in vector-invariant form, at U and V. |
advect_vertical | function | The vertical part of the tendency of a tracer, -∂(w q)/∂z, at T. |
agrid_from | function | The collocated grid of a georeferenced raster. |
apply_mask | function | A field with fill on the dry points of its point. |
arakawa_jacobian | function | The Arakawa (1966) Jacobian J(a, b) = ∂ₓa ∂_y b - ∂_y a ∂ₓb, at T. |
area_mean | function | Area-weighted mean over the interior T cells. |
area_sum | function | Area-weighted sum over the interior T cells. |
area_weights | function | The T-cell areas of a 2-D grid: grid.area() in a chosen namespace. |
available_potential_energy | function | Available potential energy at T-points. |
avg_x_bwd_1d | function | Backward average in x, 1-D: U (or X) → T (or V) points. |
avg_x_bwd_2d | function | Backward average in x, 2-D: U (or X) → T (or V) points. |
avg_x_bwd_3d | function | Backward average in x, 3-D: U (or X) → T (or V) points. |
avg_x_fwd_1d | function | Forward average in x, 1-D: T (or V) → U (or X) points. |
avg_x_fwd_2d | function | Forward average in x, 2-D: T (or V) → U (or X) points. |
avg_x_fwd_3d | function | Forward average in x, 3-D: T (or V) → U (or X) points. |
avg_xbwd_ybwd_2d | function | Four-point average, bwd in x and bwd in y, 2-D: X → T points. |
avg_xbwd_ybwd_3d | function | Four-point average, bwd in x and bwd in y, 3-D: X → T points on every z-level. |
avg_xbwd_yfwd_2d | function | Four-point average, bwd in x and fwd in y, 2-D: U → V points. |
avg_xbwd_yfwd_3d | function | Four-point average, bwd in x and fwd in y, 3-D: U → V points on every z-level. |
avg_xfwd_ybwd_2d | function | Four-point average, fwd in x and bwd in y, 2-D: V → U points. |
avg_xfwd_ybwd_3d | function | Four-point average, fwd in x and bwd in y, 3-D: V → U points on every z-level. |
avg_xfwd_yfwd_2d | function | Four-point average, fwd in x and fwd in y, 2-D: T → X points. |
avg_xfwd_yfwd_3d | function | Four-point average, fwd in x and fwd in y, 3-D: T → X points on every z-level. |
avg_y_bwd_2d | function | Backward average in y, 2-D: V (or X) → T (or U) points. |
avg_y_bwd_3d | function | Backward average in y, 3-D: V (or X) → T (or U) points. |
avg_y_fwd_2d | function | Forward average in y, 2-D: T (or U) → V (or X) points. |
avg_y_fwd_3d | function | Forward average in y, 3-D: T (or U) → V (or X) points. |
avg_z_bwd_3d | function | Backward average in z, 3-D: W → T points. |
avg_z_fwd_3d | function | Forward average in z, 3-D: T → W points. |
bernoulli_potential | function | The Bernoulli potential K + g h, at T. |
biharmonic | function | The biharmonic diffusion of a tracer, -κ₄ ∇²(∇²f), at T. |
collocate | function | A field of a C-grid, on its collocated grid (grid.collocated()). |
combine | function | Apply an element-wise function to fields on the same point. |
coriolis | function | The Coriolis tendencies (+f v, -f u), at U and V. |
count_contiguous | function | Count contiguous wet cells from each point along one axis (n-D). |
curl | function | The vertical curl of a horizontal vector (the relative vorticity), at X. |
diff_x_bwd_1d | function | Backward difference in x, 1-D: U (or X) → T (or V) points. |
diff_x_bwd_2d | function | Backward difference in x, 2-D: U (or X) → T (or V) points. |
diff_x_bwd_3d | function | Backward difference in x, 3-D: U (or X) → T (or V) points. |
diff_x_fwd_1d | function | Forward difference in x, 1-D: T (or V) → U (or X) points. |
diff_x_fwd_2d | function | Forward difference in x, 2-D: T (or V) → U (or X) points. |
diff_x_fwd_3d | function | Forward difference in x, 3-D: T (or V) → U (or X) points. |
diff_y_bwd_2d | function | Backward difference in y, 2-D: V (or X) → T (or U) points. |
diff_y_bwd_3d | function | Backward difference in y, 3-D: V (or X) → T (or U) points. |
diff_y_fwd_2d | function | Forward difference in y, 2-D: T (or U) → V (or X) points. |
diff_y_fwd_3d | function | Forward difference in y, 3-D: T (or U) → V (or X) points. |
diff_z_bwd_3d | function | Backward difference in z, 3-D: W → T points. |
diff_z_fwd_3d | function | Forward difference in z, 3-D: T → W points. |
difference | function | The difference of a field along an axis, at dst. |
diffuse | function | The harmonic diffusion of a tracer, ∇·(κ∇f), at T. |
diffuse_vertical | function | The vertical diffusion of a tracer, ∂(κ ∂f/∂z)/∂z, at T. |
diffusive_fluxes | function | The fluxes whose divergence is :func:diffuse, κ δₓf and κ δ_y f. |
dilate_mask | function | Binary dilation by 1 cell with an n-D cross structuring element. |
divergence | function | The horizontal divergence of a vector, at T. |
embed | function | A field from its interior, with fill on the ghost ring. |
enstrophy | function | Enstrophy (pointwise). |
fill_ghosts | function | Fill the ghost ring of a field, or of every field of a state. |
geostrophic_velocity | function | The geostrophic velocity of a free surface, at U and V. |
grad_perp | function | The rotated gradient of a streamfunction, (u, v) = (−∂_yψ, ∂ₓψ). |
gradient | function | The horizontal gradient of a scalar: (∂ₓf, ∂_yf). |
h_from_pooled | function | Inverse of :func:pool_bool for binary inputs. |
interior | function | A field without its ghost ring. |
interpolate | function | The value at each point of dst, from the points of src around it. |
kinetic_energy | function | The kinetic energy per unit mass, at T. |
laplacian | function | The horizontal Laplacian of a scalar, at its own points. |
make_sponge | function | n-D linear sponge ramp: 0 at every wall, 1 in the interior. |
masked_mean | function | Mean over axis, excluding dry cells. |
masked_moments | function | (mean, std) in one call — see :func:masked_mean, :func:masked_std. |
masked_std | function | Standard deviation over axis, excluding dry cells, floored at eps. |
mc | function | Monotonized Central (MC) flux limiter. |
minmod | function | Minmod flux limiter. |
okubo_weiss | function | Okubo-Weiss parameter (pointwise). |
okubo_weiss_parameter | function | The Okubo–Weiss parameter σₙ² + σₛ² - ζ² of a flow, at T. |
pool_bool | function | n-D average-pool of a binary mask with one-sided zero padding. |
potential_enstrophy | function | Potential enstrophy (pointwise). |
potential_vorticity | function | Potential vorticity (pointwise). |
pv_flux | function | The flux of a vorticity by a velocity, (q u, q v), at U and V. |
qg_potential_vorticity | function | The quasi-geostrophic potential vorticity, at T. |
reconstruct | function | The advective flux q̂ u on the faces along axis. |
rusanov_flux | function | Local Lax--Friedrichs (Rusanov) numerical flux at faces along axis. |
select | function | One region of a field, by name, read-only. |
shear_strain | function | The shear strain δₓv + δ_y u, at X. |
smooth_abs | function | Smooth approximation of |x| with a nonzero gradient at the origin. |
smooth_clamp | function | Smooth approximation of max(x, x_min) (a soft lower clamp). |
smooth_max | function | Smooth approximation of the elementwise max(x, y). |
ssh_to_streamfn | function | Convert sea surface height to streamfunction. |
stagger | function | A field of a collocated grid, on its C-grid (grid.staggered()). |
strain_magnitude_squared | function | Squared strain magnitude (pointwise). |
strain_rate_squared | function | The squared strain rate σₙ² + σₛ², at T. |
streamfn_to_ssh | function | Convert streamfunction to sea surface height. |
stretching_term | function | Cross-layer stretching term for multi-layer QG models. |
superbee | function | Superbee flux limiter. |
sw_potential_vorticity | function | The shallow-water potential vorticity (ζ + f) / h, at X. |
t_point_coordinates | function | Coordinates of every T point of a Cartesian grid, one row per point. |
tensor_strain | function | The normal (tensor) strain δₓu - δ_y v, at T. |
to_dimarray | function | The data, dims and labels of a field as a pipekit_array.DimArray. |
to_right | function | A field on left faces (MITgcm’s U, on the west one) as one on right faces. |
upwind_flux | function | Compute upwind flux with automatic stencil fallback near boundaries. |
van_leer | function | Van Leer flux limiter. |
vertical_velocity | function | The vertical velocity of a non-divergent flow, at W. |
volume_mean | function | Volume-weighted mean over the interior T cells, (∑ V x) / (∑ V). |
volume_sum | function | Volume-weighted sum over the interior T cells. |
volume_weights | function | The T-cell volumes of a 3-D grid, area times Δz (xp as in :func:area_weights). |
vortex_force | function | The vortex force, (+q v, -q u), at U and V. |
vorticity_flux_upwind | function | Dissipative upwind vortex-force fluxes on a C-grid. |
gridax.analysis¶
| Name | Kind | What it does |
|---|---|---|
Extrapolate | function | Re-exported from typing. |
difference | function | Finite-difference derivative along one axis; a NaN propagates. |
remap_axis | function | Interpolate values along axis from source_coords to target_coords. |
remap_axis_columns | function | Interpolate every column of values onto target_coords. |
gridax.fields¶
| Name | Kind | What it does |
|---|---|---|
abs | function | abs of the array namespace, element by element (gridax.combine). |
clip | function | clip of the array namespace, element by element (gridax.combine). |
cos | function | cos of the array namespace, element by element (gridax.combine). |
exp | function | exp of the array namespace, element by element (gridax.combine). |
log | function | log of the array namespace, element by element (gridax.combine). |
maximum | function | maximum of the array namespace, element by element (gridax.combine). |
minimum | function | minimum of the array namespace, element by element (gridax.combine). |
sign | function | sign of the array namespace, element by element (gridax.combine). |
sin | function | sin of the array namespace, element by element (gridax.combine). |
sqrt | function | sqrt of the array namespace, element by element (gridax.combine). |
tanh | function | tanh of the array namespace, element by element (gridax.combine). |
where | function | where of the array namespace, element by element (gridax.combine). |
gridax.pipekit¶
| Name | Kind | What it does |
|---|---|---|
ApplyMask | class | Zero a field on the dry points of its stagger (jnp.where, NaN-safe). |
AvailablePE | class | ½ g′ (h − H)² at T-points. T → T. |
Coriolis | class | Coriolis tendencies on a β-plane, (U, V) → (U, V). |
Curl | class | Relative vorticity ζ = δₓv / Δx − δ_y u / Δy at X-points. (U, V) → X. |
DIFFERENCES | constant | (('x', 'T', 'U'), ('x', 'U', 'T'), ('x', 'V', 'X'), ('x',... |
Difference | class | Difference between staggered points, δ / Δ. |
Divergence | class | ∇·(u, v) at T-points: δₓu / Δx + δ_y v / Δy. (U, V) → T. |
DomainIntegral | class | ∑_interior x ΔA over the T-cells (area_sum). T → [*batch]. |
DomainMean | class | Area-weighted interior mean ⟨x⟩ (area_mean). T → [*batch]. |
Enstrophy | class | ½ ζ² at X-points. (U, V) → X. |
ExplicitStep | class | One explicit step s ↦ s + Δt Φ(s) of ∂ₜs = F(s), for a dict state. |
FVXOperator | class | Base for finitevolX pipekit operators. |
FillGhosts | class | Fill the ghost ring with a boundary condition. x → x. |
GHOST_FILLERS | constant | {'periodic': BC(faces={'x': (Periodic(), Periodic()), 'y'... |
GradPerp | class | Rotated gradient (u, v) = (−∂_y ψ, ∂ₓψ) of a streamfunction. T → (U, V). |
GridOperator | class | An FVXOperator on a 2-D Cartesian C-grid. |
INTERPOLATIONS | constant | (('T', 'U'), ('T', 'V'), ('T', 'X'), ('U', 'T'), ('U', 'V... |
Interp | class | Interpolation between staggered points (a two- or four-point mean). |
KineticEnergy | class | ½ (ū² + v̄²) at T-points (velocities averaged to T). (U, V) → T. |
Laplacian | class | Five-point Laplacian ∇²h at T-points. T → T. |
LinComb | class | Linear combination y = ∑ᵢ cᵢ xᵢ (coefficients are learnable leaves). |
MASK_KINDS | constant | {'T': 'default', 'U': 'default', 'V': 'default', 'X': 'st... |
OkuboWeiss | class | W = σₙ² + σ_s² − ζ² at T-points (W < 0: vortex cores). (U, V) → T. |
Pick | class | Select one output of a tuple-valued node: (a, b, …) → [index]. |
PotentialVorticity | class | Shallow-water PV q = (ζ + f) / h at X-points. (U, V, T, T) → X. |
QGPotentialVorticity | class | Single-layer QG PV q = (∇²ψ + β (y − y₀)) / f₀ at T-points. T → T. |
RelativeVorticity | class | ζ = δₓv / Δx − δ_y u / Δy at X-points. (U, V) → X. |
SCHEMES | constant | {'euler': <function euler_step>, 'heun': <function heun_s... |
STRAIN_COMPONENTS | constant | {'shear': <function shear_strain>, 'tensor': <function te... |
Strain | class | A strain component: shear σ_s (X), tensor σₙ (T) or σ_s² + σₙ² (T). |
TotalEnergy | class | E = ∑_interior (KE + APE) ΔA (area_sum), one value per leading index. |
graph_halo | function | The halo of a graph: how many cells around a point its result reads. |
over_leading | function | Lift fn on [*core] arrays to [*batch, *core] arrays. |
gridax.schemes¶
| Name | Kind | What it does |
|---|---|---|
Adaptive | class | A scheme, and what it does at the edges of the array and at a coast. |
Biased | class | Stencils that lean to one side, whatever the velocity. |
Centred | class | Symmetric stencils, of any even order. |
Scheme | class | Which values an operation reads around its output, and how it weighs them. |
TVD | class | Second-order TVD: first-order upwind plus a limited anti-diffusive correction. |
Tier | class | One stencil width of a scheme, as a face-value reconstruction. |
Upwind | class | Linear upwind-biased face values of cell averages, of any odd order. |
WENO | class | WENO face values of cell averages, of any odd order from 3 on. |
gridax.solvers¶
| Name | Kind | What it does |
|---|---|---|
BoundaryCondition | function | Re-exported from typing. |
CapacitanceSolver | class | Re-exported from spectraldiffx. |
DirichletHelmholtzSolver2D | class | Re-exported from spectraldiffx. |
KnownValueLifting | class | Pre/post-processing wrapper for the lifting trick. |
MixedBCHelmholtzSolver2D | class | Re-exported from spectraldiffx. |
MixedBCHelmholtzSolver3D | class | Re-exported from spectraldiffx. |
MultigridSolver | class | Geometric multigrid V-cycle solver for the variable-coefficient Helmholtz equation:: |
NeumannHelmholtzSolver2D | class | Re-exported from spectraldiffx. |
RegularNeumannHelmholtzSolver2D | class | Re-exported from spectraldiffx. |
SolveDomain | class | Derived masks for the lifting trick. |
SpectralHelmholtzSolver1D | class | Re-exported from spectraldiffx. |
SpectralHelmholtzSolver2D | class | Re-exported from spectraldiffx. |
SpectralHelmholtzSolver3D | class | Re-exported from spectraldiffx. |
StaggeredDirichletHelmholtzSolver2D | class | Re-exported from spectraldiffx. |
boundary_ring | function | Wet cells adjacent to at least one dry cell (the inner ring). |
build_capacitance_solver | function | Pre-compute the capacitance matrix and return a ready-to-use solver. |
build_multigrid_solver | function | Build a multigrid solver with precomputed level hierarchies. |
check_dtype | function | Raise if JAX would silently downcast x from float64 to float32. |
coast_ring | function | Dry cells adjacent to at least one wet cell (the coast ring). |
dct | function | Re-exported from spectraldiffx. |
dct1_eigenvalues | function | Re-exported from spectraldiffx. |
dct1_eigenvalues_ps | function | Re-exported from spectraldiffx. |
dct2_eigenvalues | function | Re-exported from spectraldiffx. |
dct2_eigenvalues_ps | function | Re-exported from spectraldiffx. |
dct3_eigenvalues | function | Re-exported from spectraldiffx. |
dct3_eigenvalues_ps | function | Re-exported from spectraldiffx. |
dct4_eigenvalues | function | Re-exported from spectraldiffx. |
dct4_eigenvalues_ps | function | Re-exported from spectraldiffx. |
dctn | function | Re-exported from spectraldiffx. |
dst | function | Re-exported from spectraldiffx. |
dst1_eigenvalues | function | Re-exported from spectraldiffx. |
dst1_eigenvalues_ps | function | Re-exported from spectraldiffx. |
dst2_eigenvalues | function | Re-exported from spectraldiffx. |
dst2_eigenvalues_ps | function | Re-exported from spectraldiffx. |
dst3_eigenvalues | function | Re-exported from spectraldiffx. |
dst3_eigenvalues_ps | function | Re-exported from spectraldiffx. |
dst4_eigenvalues | function | Re-exported from spectraldiffx. |
dst4_eigenvalues_ps | function | Re-exported from spectraldiffx. |
dstn | function | Re-exported from spectraldiffx. |
fft_eigenvalues | function | Re-exported from spectraldiffx. |
fft_eigenvalues_ps | function | Re-exported from spectraldiffx. |
helmholtz_operator | function | The rectangular Helmholtz operator (∇² − λ) as a gaussx operator. |
idct | function | Re-exported from spectraldiffx. |
idctn | function | Re-exported from spectraldiffx. |
idst | function | Re-exported from spectraldiffx. |
idstn | function | Re-exported from spectraldiffx. |
make_spectral_preconditioner | function | Return a spectral-solve preconditioner for PCG. |
masked_face_dirichlet_laplacian | function | Masked Helmholtz operator (∇² − λ)·p with p = 0 on every coast face. |
masked_helmholtz_operator | function | The masked Helmholtz operator of :func:masked_laplacian as a gaussx operator. |
masked_laplacian | function | Apply the masked discrete Helmholtz operator (∇² − λ)·ψ. |
masked_neumann_laplacian | function | Masked Helmholtz operator (∇² − λ)·p with zero flux through every coast face. |
modify_rhs_1d | function | Re-exported from spectraldiffx. |
modify_rhs_2d | function | Re-exported from spectraldiffx. |
modify_rhs_3d | function | Re-exported from spectraldiffx. |
multigrid_levels | function | The C-grid multigrid hierarchy of a mask, as gaussx.MultigridLevel\ s. |
project_zero_mean | function | Remove the wet mean of u on each connected wet component. |
solve_helmholtz_2d | function | Re-exported from spectraldiffx. |
solve_helmholtz_3d | function | Re-exported from spectraldiffx. |
solve_helmholtz_dct | function | Re-exported from spectraldiffx. |
solve_helmholtz_dct1 | function | Re-exported from spectraldiffx. |
solve_helmholtz_dct1_1d | function | Re-exported from spectraldiffx. |
solve_helmholtz_dct1_3d | function | Re-exported from spectraldiffx. |
solve_helmholtz_dct2_1d | function | Re-exported from spectraldiffx. |
solve_helmholtz_dct2_3d | function | Re-exported from spectraldiffx. |
solve_helmholtz_dst | function | Re-exported from spectraldiffx. |
solve_helmholtz_dst1_1d | function | Re-exported from spectraldiffx. |
solve_helmholtz_dst1_3d | function | Re-exported from spectraldiffx. |
solve_helmholtz_dst2 | function | Re-exported from spectraldiffx. |
solve_helmholtz_dst2_1d | function | Re-exported from spectraldiffx. |
solve_helmholtz_dst2_3d | function | Re-exported from spectraldiffx. |
solve_helmholtz_fft | function | Re-exported from spectraldiffx. |
solve_helmholtz_fft_1d | function | Re-exported from spectraldiffx. |
solve_helmholtz_fft_3d | function | Re-exported from spectraldiffx. |
solve_poisson_2d | function | Re-exported from spectraldiffx. |
solve_poisson_3d | function | Re-exported from spectraldiffx. |
solve_poisson_dct | function | Re-exported from spectraldiffx. |
solve_poisson_dct1 | function | Re-exported from spectraldiffx. |
solve_poisson_dct1_1d | function | Re-exported from spectraldiffx. |
solve_poisson_dct1_3d | function | Re-exported from spectraldiffx. |
solve_poisson_dct2_1d | function | Re-exported from spectraldiffx. |
solve_poisson_dct2_3d | function | Re-exported from spectraldiffx. |
solve_poisson_dst | function | Re-exported from spectraldiffx. |
solve_poisson_dst1_1d | function | Re-exported from spectraldiffx. |
solve_poisson_dst1_3d | function | Re-exported from spectraldiffx. |
solve_poisson_dst2 | function | Re-exported from spectraldiffx. |
solve_poisson_dst2_1d | function | Re-exported from spectraldiffx. |
solve_poisson_dst2_3d | function | Re-exported from spectraldiffx. |
solve_poisson_fft | function | Re-exported from spectraldiffx. |
solve_poisson_fft_1d | function | Re-exported from spectraldiffx. |
solve_poisson_fft_3d | function | Re-exported from spectraldiffx. |
wet_components | function | Label the 4-connected wet components of a concrete mask (construction time). |
gridax.stencils¶
| Name | Kind | What it does |
|---|---|---|
Bias | function | Re-exported from typing. |
Data | function | Re-exported from typing. |
METHODS | constant | ('central', 'forward', 'backward') |
Method | function | Re-exported from typing. |
difference_coeffs | function | The coefficients of a stencil on offsets, exact, from the Taylor conditions. |
difference_offsets | function | The offsets of one stencil, in units of the grid step. |
interior | function | Create an array shaped like like, zero everywhere except the interior. |
nonuniform_coeffs | function | Stencil coefficients for points at arbitrary distances, on any backend. |
optimal_weights | function | The linear (optimal) weights that blend sub-stencils into the full one. |
smoothness_matrix | function | The Jiang–Shu smoothness indicator of one sub-stencil, as a matrix. |
staggered_average | function | The staggered average (point-value interpolation) of h along axis. |
staggered_difference | function | The staggered first difference of h along axis, no metric applied. |
weno_stencils | function | The full stencil of WENO of order and its sub-stencils, as offsets. |
Upstream: spectraldiffx¶
Pseudospectral differentiation, filters and PDE solvers.
spectraldiffx¶
| Name | Kind | What it does |
|---|---|---|
ChebyshevDerivative1D | class | 1D Chebyshev derivative operator using the precomputed differentiation matrix. |
ChebyshevDerivative2D | class | 2D Chebyshev derivative operators on [−Lx, Lx] × [−Ly, Ly]. |
ChebyshevDerivative3D | class | 3D Chebyshev derivative operators on [−Lz, Lz] × [−Ly, Ly] × [−Lx, Lx]. |
ChebyshevFilter1D | class | 1D Chebyshev spectral filter for smoothing and numerical stabilisation. |
ChebyshevFilter2D | class | 2D Chebyshev spectral filter on [−Lx, Lx] × [−Ly, Ly]. |
ChebyshevGrid1D | class | 1D Chebyshev grid on the domain [-L, L]. |
ChebyshevGrid2D | class | 2D Chebyshev grid on [-Lx, Lx] × [-Ly, Ly]. |
ChebyshevGrid3D | class | 3D Chebyshev grid on [-Lz, Lz] × [-Ly, Ly] × [-Lx, Lx]. |
ChebyshevHelmholtzSolver1D | class | 1D Chebyshev-collocation Helmholtz/Poisson solver with Dirichlet or Neumann BCs. |
ChebyshevHelmholtzSolver2D | class | 2D Chebyshev-collocation Helmholtz/Poisson solver with Dirichlet BCs. |
ChebyshevPoissonSolver1D | class | 1D Chebyshev Poisson solver: d²u/dx² = f on [−L, L]. |
ChebyshevPoissonSolver2D | class | 2D Chebyshev Poisson solver: ∇²u = f with Dirichlet BCs. |
ChebyshevTransform1D | class | Forward/inverse 1D Chebyshev transform. |
ChebyshevTransform2D | class | Forward/inverse 2D Chebyshev transform (tensor product of 1D). |
FourierGrid1D | class | Fourier grid setup for periodic domain. |
FourierGrid2D | class | 2D Fourier grid for doubly periodic domain. |
FourierGrid3D | class | 3D Fourier grid for triply periodic domain. |
SpectralDerivative1D | class | 1D Spectral derivative operator using the Fast Fourier Transform (FFT). |
SpectralDerivative2D | class | 2D Spectral derivative operators for doubly periodic rectangular domains. |
SpectralDerivative3D | class | 3D Spectral derivative operators for triply periodic domains. |
SpectralFilter1D | class | 1D Spectral filter for smoothing and numerical stabilization. |
SpectralFilter2D | class | 2D Spectral filter for doubly periodic domains. |
SpectralFilter3D | class | 3D Spectral filter for triply periodic domains. |
SphericalDerivative1D | class | 1D spectral derivative operator on Gauss-Legendre latitude grid. |
SphericalDerivative2D | class | 2D pseudo-spectral derivative operators on the sphere. |
SphericalDivergenceInversionSolver | class | Divergence-inversion solver on the sphere. |
SphericalFilter1D | class | 1D spectral filter on the Gauss–Legendre latitude grid. |
SphericalFilter2D | class | 2D spectral filter on the full sphere lat-lon grid. |
SphericalGrid1D | class | Gauss-Legendre grid for the latitude (colatitude) direction. |
SphericalGrid2D | class | Full sphere latitude-longitude pseudo-spectral grid. |
SphericalHarmonicTransform | class | Full 2D Spherical Harmonic Transform (SHT). |
SphericalHelmholtzDecomposition | class | Helmholtz decomposition of a horizontal vector field on the sphere. |
SphericalHelmholtzSolver | class | Spectral Helmholtz solver on the sphere: (∇² − α) φ = f. |
SphericalPoissonSolver | class | Spectral Poisson solver on the sphere: ∇²φ = f. |
SphericalVorticityInversionSolver | class | Vorticity-inversion solver on the sphere. |
build_capacitance_solver | function | Pre-compute the capacitance factorisation and return a solver. |
cheb_dealias_product | function | Compute the dealiased pointwise product a·b on a Chebyshev grid. |
chebyshev_antiderivative_coeffs | function | Indefinite integral of a Chebyshev series, vanishing at x = −L. |
chebyshev_derivative_coeffs | function | Differentiate a Chebyshev series in coefficient space (last axis). |
chebyshev_integral_coeffs | function | Definite integral ∫_{−L}^{L} u(x) dx from Chebyshev coefficients. |
clenshaw_curtis_integrate_1d | function | Integrate a 1D nodal field over [−L, L] using Clenshaw–Curtis. |
clenshaw_curtis_integrate_2d | function | Integrate a 2D nodal field over [−Lx, Lx] × [−Ly, Ly]. |
clenshaw_curtis_weights | function | Clenshaw–Curtis quadrature weights on Gauss–Lobatto nodes of [−L, L]. |
Upstream: functax¶
Function approximation: bases, quadrature rules, interpolation.
functax¶
| Name | Kind | What it does |
|---|---|---|
FunctaxError | class | Base class for every exception raised by functax. |
GeometryError | class | Raised when an axis, grid or point set is malformed. |
MissingExtraError | class | Raised when a module or a plan needs an optional extra that is missing. |
NonlinearSchemeError | class | Raised when a linear-only operation meets a plan whose fit is nonlinear in y. |
OutsideDomainError | class | Raised under outside="raise" when a target lies outside the domain. |
PolicyError | class | Raised when an interpolation policy names an option that does not exist. |
ValidationError | class | Raised when an argument fails validation. |
functax.diffops¶
| Name | Kind | What it does |
|---|---|---|
curl2d | function | The scalar curl (vorticity) ∂u₁/∂x₀ − ∂u₀/∂x₁ of a planar field. |
divergence | function | The divergence ∇ · u = ∑_d ∂u_d/∂x_d of a vector field. |
gradient | function | The gradient ∇f of a scalar field. |
jacobian_field | function | The Jacobian [J_u]_kd = ∂u_k/∂x_d of a vector field. |
laplace_beltrami | function | The Laplace–Beltrami operator ∇²_S f of a field on the unit sphere. |
laplacian | function | The Laplacian ∇²f = ∑_d ∂²f/∂x_d² of a scalar field. |
surface_grad | function | The surface gradient ∇_S f of a field on the unit sphere. |
surface_grad_enu | function | The east and north components of the surface gradient, at a (λ, φ). |
functax.filter¶
| Name | Kind | What it does |
|---|---|---|
BOUNDARIES | constant | ('reflect', 'mirror', 'nearest', 'wrap', 'constant') |
bilateral_filter | function | Smooth x with weights that fall with distance and with value difference. |
box_filter | function | The moving average of x over a centred box window. |
box_kernel | function | The size equal weights 1/size of a centred moving average. |
correlate1d | function | Correlate x with 1-D weights along one axis. |
fft_filter | function | Correlate x with a full kernel through the FFT. |
gaussian_filter | function | Smooth x with a separable Gaussian, one 1-D pass per filtered axis. |
gaussian_kernel | function | The 2r + 1 weights of a sampled Gaussian, normalised to sum to 1. |
local_moments | function | The windowed mean μ and variance σ² of x over a box window. |
median_filter | function | The median of the valid values in every centred window. |
percentile_filter | function | The q-th percentile of the valid values in every centred window. |
sliding_windows | function | Every window centred on every cell, flattened along a new last axis. |
window_map | function | Reduce every window of x to one value per cell. |
functax.geometry¶
| Name | Kind | What it does |
|---|---|---|
AffineGrid | class | A regular 2-D grid given by an affine transform and a shape. |
Axis | class | One strictly monotone coordinate axis, optionally periodic or in time. |
CurvilinearGrid | class | A 2-D grid whose node coordinates are given per node, such as a swath. |
Metric | constant | Metric |
Points | class | Scattered sites, with the metric their distances use. |
RectilinearGrid | class | A tensor-product grid with one Axis per dimension. |
cartesian_to_tangent | function | 3-D vectors w to their east and north components (w · e_east, w · e_north). |
chebyshev_nodes | function | The Chebyshev nodes of degree N on [a, b], from b down to a. |
chord_distance | function | The straight-line distance through the sphere between every pair. |
ecef_to_lonlat | function | Earth-centred, Earth-fixed coordinates to geodetic (λ, φ) and height. |
enu_basis | function | The local east, north and up unit vectors at each point. |
fibonacci_sphere | function | The Fibonacci lattice: n near-uniform points on the unit sphere. |
from_pixel | function | Map fractional pixel (row, col) to coordinates (x, y): the inverse of to_pixel. |
gauss_legendre_grid | function | The Gauss–Legendre grid on the sphere, with its quadrature weights. |
geodesic_distance | function | The great-circle distance between every pair. |
healpix_grid | function | HEALPix pixel centres, each weighted by the equal pixel area. |
icosphere | function | The subdivided icosahedron, a quasi-uniform triangle mesh of the sphere. |
latlon_grid | function | The regular cell-centred lon/lat grid, weighted by exact cell areas. |
local_tangent_plane | function | Project points onto the tangent plane at origin, as (east, north). |
lonlat_to_ecef | function | Geodetic (λ, φ) and height to Earth-centred, Earth-fixed coordinates. |
lonlat_to_unit | function | Lift longitude and latitude onto the unit sphere. |
mesh_vertex_areas | function | The lumped (barycentric) vertex areas of a triangle mesh. |
pairwise_distance | function | The distance from every source to every target, in their shared metric. |
pixel_centres | function | The x and y of every pixel centre of a grid, each of shape (rows, cols). |
rotation_to_pole | function | The rotation Q with Q e_up(centre) = (0, 0, 1). |
slice_transform | function | The transform of the slice [row0::row_step, col0::col_step] of a raster. |
spherical_polygon_area | function | The signed area of a spherical polygon with great-circle edges. |
tangent_to_cartesian | function | East and north components (u, v) to the tangent vector u e_east + v e_north. |
to_pixel | function | Map coordinates (x, y) to fractional pixel (row, col), centres at integers. |
unit_to_lonlat | function | Longitude and latitude of vectors on (or off) the unit sphere. |
window | function | The row and column slices of the pixels that cover bounds. |
functax.interp¶
| Name | Kind | What it does |
|---|---|---|
Akima | class | Akima’s local cubic, as SciPy’s Akima1DInterpolator(method="akima"). |
BSpline | class | A B-spline of order k on every axis: (k + 1)ᴰ taps, after the prefilter. |
BSplineBasis | class | The centred B-spline of order k (degree k): k + 1 taps per axis. |
BandedPrefilter | class | c = B⁻¹ y per axis: the B-spline prefilter, separable on a grid. |
Basis | class | A local basis on one axis: S relative taps, and weights from the offsets. |
Binning | class | Aggregate scattered samples into grid cells: Hᵀ y, normalised for the mean. |
BinningPlan | class | A plan from N samples to M cells: the sums, means or counts per cell. |
BrownianBridge | class | The Brownian bridge between the knots of one axis, cell by cell. |
Chebyshev | class | The Chebyshev series of samples on Chebyshev nodes, read at arbitrary points. |
ChebyshevFit | class | c = Π C y: the first D_c Chebyshev coefficients of samples on Chebyshev nodes. |
ChebyshevInterpolant | class | A fitted Chebyshev series f̂(x) = ∑ₖ cₖ Tₖ(ξ(x)), read at targets by clenshaw. |
ComposedPlan | class | outer @ inner: H_outer H_inner 𝒮_inner, one plan with the product stencil. |
Conservative | class | First-order conservative remapping: each target cell’s area-weighted mean. |
Cubic | class | Keys cubic convolution on every axis: 4ᴰ taps per target, no prefilter. |
CubicBasis | class | Keys cubic convolution: taps i − 1 … i + 2, weights W(1 + t) … W(2 − t). |
CubicSpline | class | The interpolating C² cubic spline, as scipy.interpolate.CubicSpline. |
Delaunay | class | Linear interpolation on a triangulation of the sources: D + 1 taps per target. |
DerivativePlan | class | A plan whose read-out holds basis derivatives: ∂ᵐf̂/∂x_dᵐ at the targets. |
Fit | class | c = 𝒮(y), applied once per field before the read-out. |
Fourier | class | Band-limited Fourier resampling from N to M nodes of one periodic axis. |
FourierReadout | class | H y = (M/N) Re(F_M⁻¹ S F_N y), band-limited resampling by two FFTs. |
GaussianPlan | class | A plan read as a Gaussian posterior: f(X_*) ∣ y ~ 𝒩(H 𝒮(y), Σ_{*∣y}). |
HermiteFit | class | [y; d] from y: the values in increasing-knot order and their slopes. |
HermiteGeometry | class | What a 1-D series plan’s Hermite read-out was built from. |
Identity | class | The fit of every local scheme: c = y. |
Interpolant | class | A fitted field f̂(x) = ∑ₛ wₛ(t(x)) c_{iₛ(x)}, read at any targets. |
InverseDistance | class | Inverse-distance weighting of the Q nearest scattered sources. |
Kernel | class | k(x, x′): the (M, N) cross-kernel of M targets and N sources. |
KernelCovariance | class | Σ_{∣y} = K_* − H A⁻¹ Hᵀ, the posterior covariance of a kernel fit. |
KernelReadout | class | The dense read-out of a kernel scheme: f̂(X_*) = K_X c + P_ b. |
KernelSolve | class | [c; b] = A⁻¹ [y; 0], the saddle-point system of a kernel and a tail. |
Kriging | class | Kriging: the best linear unbiased predictor under a covariance k and a drift. |
Linear | class | Linear on every axis: 2ᴰ taps per target, weights ∏_d (1 − t_d or t_d). |
LinearBasis | class | Linear: taps i and i + 1, with weights 1 − t and t. |
LocalGeometry | class | What a local plan was built from: the source, the target coordinates, the bases. |
LocalScheme | class | A scheme with one local basis per axis and the identity fit. |
Nearest | class | Nearest neighbour on every axis: one tap per target, weight 1. |
NearestBasis | class | Nearest neighbour: one tap, the closer of i and i + 1, with weight 1. |
NonlinearDerivativePlan | class | ∂ᵐf̂/∂xᵐ of a nonlinear series plan: it reads, but has no fixed operator. |
NonlinearPlan | class | A plan whose fit depends on y: no fixed operator or adjoint, but linearize. |
Pchip | class | Monotone piecewise cubic Hermite (Fritsch-Carlson), as SciPy’s PCHIP. |
Plan | class | f̂(X_*) = H 𝒮(y), fitted once, applied to many fields. |
Policies | class | Outside the domain, at missing samples, and at the edges. |
Polyharmonic | class | The polyharmonic spline φ(r) = ±rᵖ for odd p, ±rᵖ log r for even p. |
PosteriorCovariance | class | Σ_{*∣y}, the (M, M) posterior covariance of the field at M targets. |
RBF | class | Radial basis function interpolation: f̂(x) = ∑ⱼ cⱼ k(x, xⱼ) + ∑ₚ bₚ pₚ(x). |
RadialKernel | class | k(x, x′) = φ(‖x − x′‖), Euclidean in the coordinates as given. |
ReadGeometry | class | What a plan’s stencil was built from, so Plan.derivative can rebuild it. |
Readout | class | c ↦ f̂(X_*): the read-out of a plan, from coefficients to target values. |
Scheme | class | An interpolation scheme: configuration, frozen into a Plan by plan. |
SeriesInterpolant | class | A 1-D series field f̂ read at targets chosen inside the trace. |
SeriesScheme | class | A scheme on one axis with a cubic Hermite read-out and its own slopes. |
Steffen | class | Steffen’s monotone cubic: no overshoot between knots, by construction. |
Stencil | class | A sparse read-out H: row k reads S source values at flat indices. |
Tensor | class | One local scheme per source axis, as one tensor stencil. |
TransposedStencil | class | f̂ = diag(w) Hᵀ y: a sampling stencil H used backwards, scaled per cell. |
Wendland | class | The compact Wendland kernel φ(r) = ψ(r/ρ), zero for r ≥ ρ. |
WindowedPlan | class | plan[window]: the rows of a grid target inside a window, sources unchanged. |
bspline | function | The centred B-spline βᵏ of degree k at x. |
check_outside | function | Enforce outside="raise" on the host; no-op for every other policy. |
clenshaw | function | The Chebyshev series f(x) = ∑ₖ cₖ Tₖ(ξ(x)) by Clenshaw’s recurrence. |
compose | function | H = H_outer H_inner: apply inner first, then outer, as one stencil. |
index_positions | function | The fractional index position u of each target, so node j sits at u = j. |
locate | function | The cell index i, the offset t ∈ [0, 1) and the inside flag of each target. |
locate_curvilinear | function | The cell (i, j), the offset (s, t) and the inside flag of targets on a swath. |
overlap_weights_1d | function | The (M, N) overlap lengths |cⱼ ∩ Cᵢ| of every target and source cell. |
plan_key | function | sha256 hex of the scheme, the policies and both geometries’ bytes. |
remap_taps | function | Bring tap indices back onto [0, N − 1] by a boundary rule. |
spline_poles | function | The poles zₚ of the order-k B-spline prefilter, as in scipy.ndimage. |
tensor_stencil | function | H = H₁ ⊗ … ⊗ H_D: one local basis per source axis, read at the targets. |
functax.project¶
| Name | Kind | What it does |
|---|---|---|
Variational | class | c = argmin_c (Hc − y)ᵀΛ_ε(Hc − y) + β‖Lc‖₂², the variational smoothing fit. |
fill_gaps | function | The image with its holes filled: ∇²x = 0 (Laplace) or ∇⁴x = 0 (biharmonic). |
galerkin | function | c = (ΦᵀWΦ)⁻¹ ΦᵀW y, the Galerkin projection with quadrature weights W. |
least_squares | function | c = argmin_c ‖Φc − y‖₂² + β‖c‖₂², the ridge least-squares coefficients. |
functax.quad¶
| Name | Kind | What it does |
|---|---|---|
CurveRule | class | A rule on a curve L: ∫_L g ds ≈ ∑ₖ Δsₖ g(xₖ), with the unit normal nₖ. |
Rule | class | A quadrature rule as data: nodes xₙ and weights wₙ, ∫ g dx ≈ ∑ₙ wₙ g(xₙ). |
SphereRule | class | A rule on a sphere of radius R: ∫_{S²} g dA ≈ ∑_q w_q g(u_q). |
cell_area | function | The cell-area rule of a grid: ∫ g dA ≈ ∑ₖ |Cₖ| g(xₖ) over its cells Cₖ. |
clenshaw_curtis | function | The n-point Clenshaw–Curtis rule on [a, b], at the Chebyshev extreme points. |
gauss_legendre | function | The n-point Gauss–Legendre rule on an interval [a, b]. |
polyline | function | A rule along a polyline: n nodes per segment, arc-length weights and normals. |
simpson | function | The composite Simpson rule on given nodes, as scipy.integrate.simpson. |
sphere_fibonacci | function | The Fibonacci rule: n near-uniform points of equal weight 4πR²/n. |
sphere_gauss_legendre | function | The Gauss–Legendre × uniform-longitude rule on the sphere, exact to a degree. |
sphere_healpix | function | The HEALPix rule: 12 N_side² pixel centres of equal weight 4πR²/Q. |
sphere_latlon | function | The cell-centred lon/lat rule: equiangular cells weighted by their exact areas. |
trapezoid | function | The composite trapezoid rule on given nodes, uniform or not. |
functax.transform¶
| Name | Kind | What it does |
|---|---|---|
ChebyshevTransform1D | class | The forward and inverse Chebyshev transform on N Chebyshev nodes. |
ChebyshevTransform2D | class | The tensor-product Chebyshev transform on an (N_y, N_x) grid of nodes. |
SphericalHarmonicTransform | class | Dense, differentiable spherical-harmonic analysis and synthesis on a grid. |
SphericalWaveletTransform | class | Scale-discretised (needlet) wavelet analysis and synthesis on the sphere. |
nonuniform_irfft | function | A truncated real Fourier series evaluated at points of [0, 1)^d. |
nonuniform_rfft | function | The truncated Fourier coefficients of a field sampled at points of [0, 1)^d. |
Upstream: argminax¶
Optimisation with uncertainty at the minimum: solvers, curvature.
argminax¶
| Name | Kind | What it does |
|---|---|---|
ArgminaxError | class | Base class for every exception raised by argminax. |
MissingExtraError | class | Raised when a function needs an optional extra that is not installed. |
ValidationError | class | Raised when an argument fails validation. |
argminax.adjoint¶
| Name | Kind | What it does |
|---|---|---|
KStep | class | Differentiate a minimiser through its last k iterate updates only. |
OneStep | class | Differentiate a minimiser through its last iterate update only. |
safe_implicit_adjoint | function | optx.ImplicitAdjoint whose linear solve never raises; safe inside NUTS. |
to_optimistix_adjoint | function | Return the optimistix adjoint that implements an adjoint spec. |
argminax.curvature¶
| Name | Kind | What it does |
|---|---|---|
Laplace | class | The Gaussian 𝒩(x̂, Σ_x∣y) at a minimum, with Σ_x∣y = Λ_x∣y⁻¹ never formed. |
VarianceEstimate | class | A probed estimate of the marginal variances, with its standard error. |
gauss_newton | function | Build the Laplace posterior at a minimum from whitened residuals. |
low_rank | function | Return a low-rank form of the covariance of a whitened posterior. |
marginal_variance | function | Return the marginal variances diag(Σ_x∣y) of a Laplace posterior. |
push_forward | function | Map a posterior in whitened coordinates back to physical ones. |
sample_by_perturbation | function | Draw from a Gauss–Newton posterior by perturbing its residuals. |
argminax.diagnose¶
| Name | Kind | What it does |
|---|---|---|
TraceEstimate | class | A scalar diagnostic and its standard error. |
averaging_kernel | function | Return the averaging kernel J_x̂ = ∂x̂/∂x of a Laplace posterior, lazily. |
degrees_of_freedom | function | Return the degrees of freedom for signal, the trace of the averaging kernel. |
evidence | function | Return the Laplace evidence log p(y) at a minimum. |
information_content | function | Return the information content of the measurement, in nats. |
optimize_prior_precision | function | Return the isotropic prior precision δ that maximises the Laplace evidence. |
argminax.solve¶
| Name | Kind | What it does |
|---|---|---|
CovarianceLaplaceResult | class | The Gaussian at the mode of a GP with prior covariance K_XX. |
DualSolution | class | The result of an observation-space solve. |
GaussNewtonCG | class | Gauss–Newton or Levenberg–Marquardt, each step by a matrix-free inner CG. |
LaplaceModeResult | class | The Gaussian 𝒩(x̂, Λ_x∣y⁻¹) at the mode, with gaussx’s LaplaceResult fields. |
Reparametrised | class | A bound on the state, imposed by solving in an unconstrained variable u. |
SiteFixedPoint | class | The fixed point s* = T(s*, args) of a site update, and how the loop ended. |
SiteLaplaceResult | class | The mode of a latent GP and the Newton site naturals there. |
TolerantLinearSolver | class | Wrap a lineax solver so a capped, stagnant or non-finite solve returns a value. |
dual_solve | function | Solve the 3D-Var increment in observation space. |
incremental_dual_solve | function | Incremental 3D-Var in observation space, for a nonlinear forward model. |
laplace_mode | function | Mode and Gaussian approximation of a latent Gaussian model, in precision form. |
laplace_mode_covariance | function | Laplace approximation of a GP with prior covariance K_XX, by damped Newton. |
laplace_mode_sites | function | Laplace approximation by damping the site naturals, given a posterior-mean map. |
site_fixed_point | function | Iterate s ← T(s, args) over Gaussian sites to a fixed point, differentiably. |
Upstream: integrix¶
Integration: rules, cumulative scans, time marching, expectations.
integrix¶
| Name | Kind | What it does |
|---|---|---|
IntegrixError | class | Base class for every exception raised by integrix. |
ValidationError | class | Raised when an argument fails validation. |
integrix.adapt¶
| Name | Kind | What it does |
|---|---|---|
GaussKronrod | class | Adaptive Gauss–Kronrod quadrature to a tolerance, with an error estimate. |
Romberg | class | Romberg integration of a smooth integrand on a finite interval. |
TanhSinh | class | Tanh–sinh (double-exponential) quadrature, for singular ends and infinite limits. |
cumulative_adaptive | function | ∫ from x₀ to each node xₖ of f, each interval integrated adaptively. |
integrix.adjoint¶
| Name | Kind | What it does |
|---|---|---|
Checkpointed | class | The checkpointed adjoint: store every k-th state, recompute between them. |
Truncated | class | The truncated adjoint: gradients flow through the carry of the last k steps. |
checkpointed_scan | function | jax.lax.scan that stores the carry only every k steps for reverse mode. |
scan_for | function | The scan that runs a loop under an adjoint. |
to_diffrax_adjoint | function | Map an adjoint spec onto a diffrax.AbstractAdjoint. |
truncated_scan | function | jax.lax.scan with gradients truncated to the trailing k steps. |
integrix.expect¶
| Name | Kind | What it does |
|---|---|---|
Expectation | class | An estimate of 𝔼[f] with its standard error. |
effective_sample_size | function | ESS = (∑ₛ wₛ)² / ∑ₛ wₛ² from log weights, along the last axis. |
importance | function | Self-normalised importance sampling: Î = ∑ₛ wₛ f(xₛ) / ∑ₛ wₛ, xₛ ~ q. |
log_gauss_hermite | function | log 𝔼[f(Q)] for a lognormal Q, by Gauss–Hermite quadrature in log Q. |
log_simpson | function | log ∫ₐᵇ f(q) dq by composite Simpson on a uniform grid in u = log q. |
monte_carlo | function | Plain Monte Carlo: Î = (1/S) ∑ₛ f(xₛ), with standard error σ̂/√S. |
pareto_smoothed_log_weights | function | Pareto-smoothed log importance weights and the tail shape k̂. |
qmc | function | Randomised quasi-Monte Carlo over [0, 1)^D, with an error from random shifts. |
integrix.march¶
| Name | Kind | What it does |
|---|---|---|
AB2Solver | class | Second-order Adams–Bashforth, run by integrix.march.run. |
AB3Solver | class | Third-order Adams–Bashforth as a diffrax solver, with an SSP-RK3 start. |
AbstractStepper | class | A fixed-step scheme whose history lives in the loop carry. |
DiffraxForwardModel | class | A forward model M: x(t₀) ↦ x(t₁) that one diffrax.diffeqsolve computes. |
ForwardEulerDfx | class | Forward Euler as a diffrax solver: yₙ₊₁ = yₙ + h F(tₙ, yₙ). |
IMEX_SSP2 | class | IMEX-SSP2(2,2,2) for a diffrax.MultiTerm of an explicit and an implicit term. |
LeapfrogRAFSolver | class | Leapfrog with a Robert–Asselin filter, run by integrix.march.run. |
RK2Heun | class | Heun’s method (RK2), with an embedded forward-Euler error estimate. |
RK3SSP | class | Third-order strong-stability-preserving Runge–Kutta (Shu–Osher). |
RK4Classic | class | The classical fourth-order Runge–Kutta method, fixed steps only. |
SSP_RK104 | class | Ketcheson’s ten-stage, fourth-order SSP Runge–Kutta, fixed steps only. |
SSP_RK2 | class | Second-order SSP Runge–Kutta, the same scheme as RK2Heun. |
SampledPath | class | û(t), a functax fit of samples (t_k, u_k), read as a diffrax path. |
SemiLagrangianSolver | class | Semi-Lagrangian advection as a diffrax solver. |
SemiLagrangianTerm | class | The characteristic equation Ẋ = u(t, X), as a diffrax term. |
SplitExplicitRKSolver | class | Split-explicit stepping as an AbstractStepper, for integrix.march.run. |
SplitExplicitTerms | class | The vector fields of a split-explicit model, passed to run as rhs. |
ab2_step | function | One second-order Adams–Bashforth step. |
ab3_step | function | One third-order Adams–Bashforth step. |
count_steps | function | K = ⌈T/Δt⌉, with a quotient within 10⁻⁹ K of a whole number taken as it. |
departure_points | function | The points x_d that the flow carries to the nodes x over one step. |
erk_step | function | One step of an explicit Runge–Kutta solver, unrolled from its tableau. |
euler_step | function | One forward-Euler step: yₙ₊₁ = yₙ + h f(yₙ). |
heun_step | function | One Heun (RK2) step, order 2, SSP with C = 1. |
imex_solver | function | A KenCarp3 IMEX solver whose implicit stage is matrix-free. |
imex_ssp2_step | function | One IMEX-SSP2(2,2,2) step, with the caller’s implicit solve. |
imex_stepsize_controller | function | An adaptive PID step-size controller for an IMEX solve. |
leapfrog_raf_step | function | One leapfrog step with a Robert–Asselin filter on the middle level. |
rk3_ssp_step | function | One third-order SSP Runge–Kutta step in Shu–Osher form, C = 1. |
rk4_step | function | One classical fourth-order Runge–Kutta step. |
run | function | March y₀ through n_steps constant steps of h from t₀. |
semi_lagrangian_step | function | One semi-Lagrangian step: the old field read at the departure points. |
split_explicit_step | function | One split-explicit barotropic/baroclinic step. |
stable_step | function | The largest stable forward-Euler step for advection and diffusion together. |
step_lengths | function | The K step lengths: Δt, and T − (K − 1) Δt for the last, on the host. |
integrix.rule¶
| Name | Kind | What it does |
|---|---|---|
Integral | class | The result of an integral: its value, an error estimate and diagnostics. |
integrate | function | Integrate values, or an integrand, against a rule’s weights. |
log_integrate | function | log I from log f: the log-sum-exp twin of integrate. |
weighted_mean | function | The mean of the values under a weight function, with one rule for both sums. |
integrix.scan¶
| Name | Kind | What it does |
|---|---|---|
cumulative | function | The running trapezoid integral of samples along one axis. |
Upstream: geophysix¶
Physical constants, the Earth’s shape, its air and its sea water.
geophysix¶
| Name | Kind | What it does |
|---|---|---|
BackendError | class | Re-exported from pipekit_ops. |
EarthError | class | Raised for a bad body, such as an unknown ellipsoid or sphere name. |
GeophysixError | class | Base class for every exception raised by geophysix. |
RangeError | class | Raised for a latitude out of range. |
UnitError | class | Raised for an unknown unit. |
geophysix.columns¶
| Name | Kind | What it does |
|---|---|---|
COLUMN_UNITS | constant | ('kg_m2', 'mol_m2', 'molecules_m2', 'ppm_m') |
column_from_mixing_ratio | function | The column of a gas from its dry-air mole fraction. |
convert | function | A gas column converted between ppm·m, mol m⁻², kg m⁻² and molecules m⁻². |
dry_air_column | function | The column of dry air above a point, from hydrostatic balance. |
mixing_ratio_from_column | function | The dry-air mole fraction of a gas from its column. |
geophysix.constants¶
| Name | Kind | What it does |
|---|---|---|
CH4 | constant | Gas(name='CH4', molar_mass=0.0160425) |
CO | constant | Gas(name='CO', molar_mass=0.0280101) |
CO2 | constant | Gas(name='CO2', molar_mass=0.0440095) |
Constants | class | One convention’s physical constants, SI throughout. |
Gas | class | A trace gas: its name and its molar mass M, kg mol⁻¹. |
H2O | constant | Gas(name='H2O', molar_mass=0.01801528) |
N2O | constant | Gas(name='N2O', molar_mass=0.0440128) |
STANDARD | constant | Constants(boltzmann=1.380649e-23, avogadro=6.02214076e+23... |
geophysix.earth¶
| Name | Kind | What it does |
|---|---|---|
Ellipsoid | class | An ellipsoid of revolution: semi-major axis a, flattening f, rotation Ω. |
GRS80 | constant | Ellipsoid(semi_major=6378137.0, flattening=0.003352810681... |
SPHERE | constant | Ellipsoid(semi_major=6371008.771415059, flattening=0.0, r... |
WGS84 | constant | Ellipsoid(semi_major=6378137.0, flattening=0.003352810664... |
cell_area | function | The area of each cell of a latitude-longitude grid on the ellipsoid. |
ecef_to_geodetic | function | Geodetic position of an Earth-centred, Earth-fixed point. |
geodetic_to_ecef | function | Earth-centred, Earth-fixed coordinates of a geodetic position. |
great_circle_distance | function | The great-circle distance between two points on a sphere of radius R. |
initial_azimuth | function | The initial bearing of the great circle from the first point to the second. |
meridian_degree_length | function | The length of one degree of latitude along the meridian at φ. |
meridional_radius | function | The meridional radius of curvature M(φ). |
parallel_degree_length | function | The length of one degree of longitude along the parallel at φ. |
parallel_radius | function | The radius of the parallel (the circle of latitude) at φ. |
prime_vertical_radius | function | The prime-vertical radius of curvature N(φ). |
sphere | function | A sphere of radius R: the ellipsoid with f = 0. |
geophysix.rotation¶
| Name | Kind | What it does |
|---|---|---|
beta | function | The meridional gradient of the Coriolis parameter. |
beta_plane | function | The Coriolis parameter on a β-plane. |
coriolis | function | The Coriolis parameter at each latitude. |
geophysix.seawater¶
| Name | Kind | What it does |
|---|---|---|
LINEAR_EOS | constant | LinearEOS(reference_density=1025.0, thermal_expansion=0.0... |
LinearEOS | class | The parameters of the linear equation of state of sea water. |
buoyancy | function | Buoyancy relative to the reference density. |
linear_density | function | Sea-water density from the linear equation of state. |
linear_density_anomaly | function | The density anomaly ρ − ρ₀ from the linear equation of state. |
linear_drho_dS | function | The haline derivative of the linear equation of state. |
linear_drho_dT | function | The thermal derivative of the linear equation of state. |
reduced_gravity | function | The reduced gravity across the interface of two layers. |
geophysix.thermo¶
| Name | Kind | What it does |
|---|---|---|
dry_air_density | function | The density of dry air from the ideal gas law. |
exner | function | The Exner function, the dimensionless pressure of dry air. |
hypsometric_thickness | function | The thickness of each layer between consecutive pressure levels. |
number_density | function | The number of molecules per unit volume of an ideal gas. |
potential_temperature | function | The potential temperature of dry air. |
pressure_velocity | function | Pressure velocity from vertical velocity, in hydrostatic balance. |
temperature_from_potential_temperature | function | Temperature from the potential temperature of dry air. |
vertical_velocity | function | Vertical velocity from pressure velocity, in hydrostatic balance. |
virtual_temperature | function | The virtual temperature of moist air. |
geophysix.wind¶
| Name | Kind | What it does |
|---|---|---|
wind_components | function | The eastward and northward wind from a speed and a bearing. |
wind_direction | function | The wind’s bearing, clockwise from north. |
wind_speed | function | The horizontal wind speed. |
Upstream: radiomax¶
Observation geometry and radiometry, on any array library.
radiomax¶
| Name | Kind | What it does |
|---|---|---|
RadiomaxError | class | Base class for every exception raised by radiomax. |
ValidationError | class | Raised for a bad argument: its shape, a dimension name or its value. |
radiomax.altimetry¶
| Name | Kind | What it does |
|---|---|---|
dry_troposphere_correction | function | Range correction for the dry gases of the troposphere, after Saastamoinen. |
dual_frequency_ionosphere_correction | function | Range correction for the ionosphere from two ranges at two frequencies. |
inverse_barometer | function | Height of the sea surface above its mean, under the air’s pressure. |
ionosphere_correction | function | Range correction for the ionosphere from its electron content. |
sea_surface_height | function | Sea surface height above the ellipsoid from an altimeter’s range. |
wet_troposphere_correction | function | Range correction for the water vapour of the troposphere. |
radiomax.geometry¶
| Name | Kind | What it does |
|---|---|---|
air_mass_factor | function | The plane-parallel two-way air mass, Sun to surface to sensor. |
apparent_position | function | Where a target at a height above a pixel appears on the ellipsoid. |
bowtie_detector_positions | function | The detector that sees each row of a scan once its overlap is removed. |
earth_intersection | function | The point where a ray from outside the Earth first meets the ellipsoid. |
earth_sun_distance | function | The distance from the Earth to the Sun. |
geostationary_lonlat | function | Longitude and latitude of a geostationary imager’s scan angles. |
geostationary_on_earth | function | Whether a geostationary imager’s line of sight meets the Earth. |
geostationary_scan_angles | function | Scan angles at which a geostationary imager sees a position. |
phase_angle | function | The angle at the pixel between the directions to the Sun and the sensor. |
relative_azimuth | function | The azimuth between the sensor and the Sun, folded to [0°, 180°]. |
scan_angles | function | The scan angle of every column of a whiskbroom swath. |
scan_pixel_growth | function | How much a whiskbroom’s pixel grows from nadir, over a spherical Earth. |
scattering_angle | function | The angle by which a photon from the Sun turns to reach the sensor. |
shell_air_mass | function | The one-way air mass of a spherical shell, for a ray from the surface. |
solar_angles | function | The Sun’s zenith and azimuth angles at each pixel. |
solar_declination | function | The Sun’s declination, its latitude on the celestial sphere. |
solar_zenith | function | The Sun’s zenith angle at each pixel. |
utc_day_seconds | function | UTC midnights since 2000-01-01, and the second of the UTC day. |
view_angles | function | The view zenith and azimuth of a satellite at each pixel. |
radiomax.radiometry¶
| Name | Kind | What it does |
|---|---|---|
apply_response | function | Band values of a spectrum, through a response matrix. |
apply_response_adjoint | function | The adjoint of apply_response, from bands back to the grid. |
band_average | function | The response-weighted average of a spectrum, per band. |
band_centre | function | The response-weighted mean wavelength of each band. |
band_irradiance | function | The solar irradiance of each band at 1 AU. |
box_response | function | Box responses: 1 within half a width of the centre, 0 outside. |
counts_to_radiance | function | Radiance at the sensor from digital counts. |
counts_to_reflectance | function | Reflectance from the counts of a product that stores scaled reflectance. |
equivalent_width | function | The width of a box as high as each band’s peak, with the same integral. |
gaussian_response | function | Gaussian responses with a peak of 1. |
per_cm_to_per_nm | function | A spectral density per cm⁻¹ as one per nm. |
per_nm_to_per_cm | function | A spectral density per nm as one per cm⁻¹. |
radiance_from_reflectance | function | Radiance from top-of-atmosphere reflectance, the inverse of reflectance. |
radiance_to_counts | function | Digital counts from radiance, the inverse of counts_to_radiance. |
reflectance | function | Top-of-atmosphere reflectance from radiance. |
response_coverage | function | The share of each band’s response that a grid covers. |
response_matrix | function | The matrix of tabulated responses on any grid, as an exact integral. |
sampled_response_matrix | function | The response matrix on the responses’ own grid, by a quadrature rule. |
trapezoid_weights | function | The weights of the composite trapezoid rule on a grid, uniform or not. |
triangle_response | function | Triangular responses, 1 at the centre and 0 half a width from it. |
radiomax.retrievals¶
| Name | Kind | What it does |
|---|---|---|
BandRatioTable | class | Published coefficients of a band ratio, for one sensor and one version. |
OCX_R2022 | constant | mappingproxy({'SeaWiFS': BandRatioTable(sensor='SeaWiFS',... |
band_ratio_chlorophyll | function | Chlorophyll-a from the largest of several blue reflectances over a green one. |
brdf_reflectance | function | Reflectance of a surface from its kernel weights. |
li_sparse_reciprocal | function | The LiSparse-Reciprocal kernel, shadows cast by sparse crowns. |
li_sparse_reciprocal_from_cosines | function | The LiSparse-Reciprocal kernel of the cosines of the zeniths. |
nadir_adjustment | function | The factor that takes an observed reflectance to nadir view. |
ross_thick | function | The RossThick kernel, volume scattering by a dense canopy of small leaves. |
ross_thick_from_cosines | function | The RossThick kernel of the cosines of the zeniths. |
split_window_features | function | The features whose weighted sum is a split-window land temperature. |
split_window_lst | function | Land-surface temperature from two thermal bands and their emissivities. |
split_window_sst | function | Sea-surface temperature from two thermal bands and the view angle. |
radiomax.sar¶
| Name | Kind | What it does |
|---|---|---|
beta0_to_sigma0 | function | Backscatter coefficient σ⁰ from the radar brightness β⁰. |
dn_to_backscatter | function | Backscatter from a SAR image’s digital numbers. |
gamma0_to_sigma0 | function | Backscatter coefficient σ⁰ from γ⁰. |
sigma0_to_beta0 | function | Radar brightness β⁰ from the backscatter coefficient σ⁰. |
sigma0_to_gamma0 | function | Backscatter γ⁰ from the backscatter coefficient σ⁰. |
radiomax.thermal¶
| Name | Kind | What it does |
|---|---|---|
PlanckLinear | class | A band’s inverse Planck function, with a linear correction. |
PlanckQuadratic | class | A band’s inverse Planck function, with a quadratic correction. |
brightness_temperature | function | The temperature of the black body that emits a given radiance. |
brightness_temperature_band | function | A band’s brightness temperature from its published coefficients. |
from_per_ghz | function | Radiance per cm⁻¹ of wavenumber from radiance per GHz of frequency. |
from_per_um | function | Radiance per cm⁻¹ of wavenumber from radiance per µm of wavelength. |
log_planck_radiance | function | The logarithm of Planck’s law, where the radiance itself underflows. |
planck_radiance | function | Planck’s law: the radiance of a black body per wavenumber. |
to_per_ghz | function | Radiance per GHz of frequency from radiance per cm⁻¹ of wavenumber. |
to_per_um | function | Radiance per µm of wavelength from radiance per cm⁻¹ of wavenumber. |
Upstream: tracerax¶
Lagrangian particles: advection, deposits, footprints, analysis.
tracerax¶
| Name | Kind | What it does |
|---|---|---|
TraceraxError | class | Base class for every exception raised by tracerax. |
ValidationError | class | Raised when an argument fails validation. |
tracerax.advect¶
| Name | Kind | What it does |
|---|---|---|
Accumulator | class | What a run sums: a run of many steps then stores sums and no trajectory. |
Box | class | A box [lower, upper), one interval per position column. |
ConstantDiffusivity | class | A diffusivity that is the same everywhere: K_i(t, x) = K_i. |
Deterministic | class | A deterministic step: one explicit Runge–Kutta step per particle. |
DeterministicSphere | class | A deterministic step on the sphere, as a ParticleStep. |
Diffusivity | class | A diagonal diffusivity K(t, x), one value per particle and axis. |
GriddedDiffusivity | class | A diffusivity read from fields, as GriddedVelocity reads a velocity. |
Inertial | class | An inertial step: a buoyant object at the sea surface, with a memory. |
Langevin | class | The Langevin step as a ParticleStep, with noise of shape (N, 3). |
RandomDisplacement | class | The random-displacement step as a ParticleStep, with noise (N, D). |
Result | class | What integrate returns. |
SlowManifold | class | The velocity of a small buoyant object at the sea surface, a Velocity. |
TurbulenceModel | class | A turbulence closure: σ(z) and τ_L(z) of the velocity fluctuation. |
Walls | class | Two reflecting walls in height, or a ground alone. |
displacement_step | function | One random-displacement step over each particle’s own duration. |
integrate | function | Run a particle step over a duration, forward or backward in time. |
langevin_step | function | One Markov-1 Langevin step over each particle’s own duration. |
tracerax.analysis¶
| Name | Kind | What it does |
|---|---|---|
RegionTime | class | The time each particle of a run spends in each region, an Accumulator. |
Regions | class | Regions as a label per cell. |
connectivity | function | The fraction of the particles of each region that end in each region. |
ftle | function | The finite-time Lyapunov exponent at each seed. |
visited_connectivity | function | The fraction of the particles of each region that ever visit each region. |
tracerax.bin¶
| Name | Kind | What it does |
|---|---|---|
Cells | class | Cells between edges, along one, two or three axes. |
Residence | class | The time the particles of a run spend in each cell, an Accumulator. |
column | function | The vertical column of a concentration. |
concentration | function | The concentration at one time, from the masses the particles carry. |
deposit | function | Deposit one weight per particle in the cells, losing none inside the edges. |
steady_concentration | function | The steady concentration of a continuous source, from one puff’s residence. |
tracerax.particles¶
| Name | Kind | What it does |
|---|---|---|
ParticleState | class | N particles in D = 2 or 3 dimensions. |
ParticleStep | class | A step: it moves every particle over its own duration. |
along_line | function | N particles at the middles of N equal pieces of a line. |
at_point | function | N particles at one point. |
in_box | function | N particles drawn uniformly in a box. |
release_times | function | N release times at the middles of N equal pieces of an interval. |
with_turbulent_velocity | function | The state with its velocity drawn from the turbulence at its heights. |
tracerax.velocity¶
| Name | Kind | What it does |
|---|---|---|
GriddedVelocity | class | A velocity on a grid, each component on its own staggered nodes. |
Velocity | constant | Velocity |
WeightedSum | class | A weighted sum of velocities, each on its own grid. |
cgrid_grids | function | The grids of the components of a C-grid, each on its own points. |
uniform | function | A velocity that is the same everywhere and at every time. |
uniform_in_space | function | A velocity that varies in time and not in space. |