Skip to content

API reference

Generated by scripts/gen_api_docs.py from the docstrings (make docs regenerates it) — do not edit by hand. Each subpackage has its own page (the sections below); objects are documented in the module that defines them, and nefi/__init__.py re-exports the most common ones (nefi.InverseProblem, nefi.Solver, nefi.invert, nefi.from_forward, ...). See DESIGN.md for the contracts and paper_mapping.md for the paper → code map.

nefi

  • nefi — nefi — Neural-Field Inversion.
  • nefi.auto — Adaptive defaults — from your differentiable forward model to a ready-to-solve problem.
  • nefi.cli — nefi command-line interface.
  • nefi.config — Config helpers: dataclass <-> dict / YAML, and stable config hashing.
  • nefi.domain — Physical domain: extents, resolution and normalized coordinate grids.
  • nefi.errors — Exception hierarchy for nefi.
  • nefi.measurement — Observed data container.
  • nefi.priors — The prior catalogue: what you physically know about the unknown → heads, losses, hints.
  • nefi.problem — The inverse problem: domain + field + operator + losses + measurement (+ post-processing).
  • nefi.registry — A tiny registry so every component is constructible from config ({"type": name, ...}).

nefi.autotune

  • nefi.autotune — Auto-tuning: detect and fix the common failure modes of a per-measurement inversion.
  • nefi.autotune.acquisition — Acquisition / identifiability report: what the measurement can and cannot determine.
  • nefi.autotune.convergence — Fit-quality driven budget and learning rate: does the fit reach the noise floor, and when?
  • nefi.autotune.gauge — Gauge / null-space detection and repair: transformations of the unknown the data cannot see.
  • nefi.autotune.orchestrate — One-call auto-tuning: noise → gauges → acquisition → budget / learning rate → regularization → (held-out search), every decision logged and reported.
  • nefi.autotune.regularization — Regularization strength by the discrepancy principle (Morozov), with a GradNorm fallback.
  • nefi.autotune.search — Held-out hyper-parameter search: let the measurement itself choose the configuration.

nefi.baselines

  • nefi.baselines — Baseline parameterizations and solvers (NeTMY App. E.2, NeFTY App. F.2).
  • nefi.baselines.admm — ADMM with an ℓ1 + box proximal split — the ADMM baseline (NeTMY App. E.2; Boyd et al. 2011).
  • nefi.baselines.deep_decoder — Untrained convolutional decoder prior — the DeepDecoder baseline (Heckel & Hand 2018).
  • nefi.baselines.direct — Non-iterative reference reconstructions (FBP, Wiener, ...) reported as a regular Result.
  • nefi.baselines.gaussian_splat — Explicit Gaussian-splat parameterization — the GaussianSplat baseline (NeTMY App. E.2).
  • nefi.baselines.lbfgs — L-BFGS curricula — the quasi-Newton free-density reference (NeTMY App. E.2, §5.3).
  • nefi.baselines.thermography — Classical pulsed-thermography heuristics: PPT and TSR (NeFTY App. F.4).

nefi.bench

  • nefi.bench — Benchmarking: scene/data generators, protocols, ablations, reports.
  • nefi.bench.ablation — Component ablations (NeTMY Tab. 3 / App. E.6, NeFTY Tab. 3 / Tab. 8).
  • nefi.bench.base — Benchmark primitives: ground-truth scene generators and inverse-crime-safe data generators.
  • nefi.bench.protocol — Benchmark protocol: paired, seeded, inverse-crime-safe comparisons with confidence intervals.
  • nefi.bench.report — Report writers (markdown / CSV / JSON), confidence intervals and operator runtime tables.
  • nefi.bench.sweep — One-axis hyperparameter sweeps (NeTMY Tab. 10: learning rate, hidden width, PE octaves).

nefi.diagnostics

nefi.fields

nefi.instances

nefi.losses

nefi.metrics

nefi.operators

nefi.physics

  • nefi.physics — Physics zoo: reusable differentiable forward models for many physical systems.
  • nefi.physics.elliptic — Variable-coefficient elliptic PDEs −∇·(σ∇u) + κu = f with an implicit-function adjoint.
  • nefi.physics.magnetostatics — Magnetostatics of planar sources imaged on a parallel plane (NV / SQUID / Hall microscopy).
  • nefi.physics.optics — Scalar coherent optics: angular-spectrum propagation, thin phase objects, inline holography.
  • nefi.physics.reaction_diffusion — Gray–Scott reaction–diffusion with spatially varying reaction parameters.
  • nefi.physics.scattering — 2-D scalar diffraction tomography: Born / Rytov linearized scattering and Lippmann–Schwinger.
  • nefi.physics.timestep — Generic explicit time integration with optional per-block gradient checkpointing.
  • nefi.physics.wave — Scalar acoustic wave equation: differentiable time-domain simulation and wave-family operators.

nefi.solve

  • nefi.solve — Optimization: curriculum, solver, results, callbacks, post-processing, ensembles.
  • nefi.solve.balancing — Adaptive loss balancing (GradNorm-style) as a solver callback.
  • nefi.solve.batched — Batched multi-measurement solving: N independent problems in one optimization loop.
  • nefi.solve.callbacks — Solver callbacks: logging, progress bars, checkpoints, plotting.
  • nefi.solve.curriculum — Optimization curriculum: multiscale stages, frequency annealing, learning-rate schedules.
  • nefi.solve.ensemble — Multi-seed ensembles: cheap uncertainty maps for per-measurement inversion.
  • nefi.solve.postprocess — Post-processing applied once after optimization.
  • nefi.solve.refine — Reconstruction-side edge refinement: a short, physics-constrained sharpening stage.
  • nefi.solve.result — Result container with save / load and a compact summary.
  • nefi.solve.solver — The per-measurement optimizer: runs a :class:Curriculum on an :class:InverseProblem.

nefi.utils

nefi.viz

  • nefi.viz — nefi.viz — figures, animations, dashboards and shareable reports for neural-field inversion.
  • nefi.viz.fields — Field viewers: 1-D lines, 2-D images, 3-D slices / mosaics / projections / voxels, and the standard reconstruction figure :func:compare_fields (GT | measurement | reconstruction(s) | signed error, metrics in the panel titles).
  • nefi.viz.hints — Display hints: how an instance wants its measurement and its fields drawn.
  • nefi.viz.interactive — Interactive 3-D viewer: drag-to-rotate isosurfaces, voxels and slices in the browser.
  • nefi.viz.isosurface — Isosurfaces of 3-D fields: threshold rules, volume-matched iso-levels, display transforms, marching-cubes meshes and the shaded static renderings of gallery_3d.png / voxels.png.
  • nefi.viz.measurement — Measurement viewers: spectra, time-series frames, sinograms, receiver traces, k-space masks, signals, sparse point observations — and :func:plot_fit (data vs prediction vs residual with the noise floor).
  • nefi.viz.multiphysics — The multi-physics gallery: one smoke run per registered instance, one compact tile per physical system (GT | measurement | reconstruction, headline metric and wall-clock), a single overview figure, per-instance figures and a JSON manifest.
  • nefi.viz.performance — Performance dashboards: per-step time, scaling with grid size, memory by gradient mode, wall-clock breakdowns and benchmark tables with confidence intervals.
  • nefi.viz.qualitative — Qualitative comparison figures: the scenes × methods grid of a paper, failure-mode panels and a one-call baselines panel.
  • nefi.viz.report — Shareable reports: one self-contained HTML file (figures embedded as base64, metrics and timing tables, config hash, environment) or a Markdown page with relative image links.
  • nefi.viz.style — House style for nefi figures: palette, per-quantity colormaps, rc settings, sizes, saving.
  • nefi.viz.training — Training-dynamics figures: loss history with stage boundaries and the annealing schedule, per-stage summaries, the coarse→fine multiscale view and snapshot animations.
  • nefi.viz.volume — 3-D field views: depth mosaics, cross-sections through the anomaly, projections and voxel comparisons — the building blocks of the 3-D layout of :func:~nefi.viz.compare_fields, the gallery's 3-D rows and gallery_3d.png.