Skip to content

ARTS2D: use a noise-aware, regularized objective with explicit gain nuisances #139

Description

@joglekara

Problem

The limited-angle ARTS2D inverse objective is currently neither statistically weighted nor regularized, and it uses nonsmooth peak normalization that can let one resonant pixel rescale an entire angular trace.

Concrete issues:

  • tsadar/inverse/loss_function.py:388 hard-codes penalty_error = 0.0, so configured EDF/moment penalties never enter the loss.
  • The existing 2-D moment penalty exponentiates an already-positive physical EDF and contains incomplete/incompatible 2-D moment calculations.
  • The angular L2 objective divides squared residuals by one global amplitude scalar rather than a per-pixel variance; noiseE is not used to whiten the residual.
  • tsadar/core/thomson_diagnostic.py:183 scales every model row to the measured row maximum. amax is noisy and nonsmooth when the argmax switches, discards absolute angular-amplitude information, and couples a single unresolved spike to all wavelengths in the row.
  • The angular IRF also restores peaks; the physical convolution issue is tracked separately.

Proposed direction

  • Use a documented detector likelihood, initially Poisson plus read/background-subtraction noise or a justified measured covariance.
  • Replace measured-maximum normalization with explicit row/wing gain nuisance parameters. For Gaussian residuals, profile linear gains analytically (variable projection) and apply smooth calibration priors across angle.
  • Impose positivity by construction and regularize the physical EDF with radial/angular smoothness, entropy/KL to a baseline, and selected moment priors.
  • Choose regularization strength using held-out angles/pixels, simulation calibration, discrepancy principle, or evidence—not training loss alone.

Acceptance criteria

  • Configured regularizers are either applied and logged term-by-term or rejected explicitly; no silent no-op settings.
  • Residuals are whitened by the documented detector noise/covariance model, and whitened residual diagnostics are persisted.
  • Remove data-dependent amax scaling from the differentiable forward model; profile or fit amplitude nuisances with documented priors/identifiability constraints.
  • Add bad-pixel masks and a documented robust-contamination option if needed.
  • On calibrated synthetic data, recovered parameters have sensible uncertainty/coverage and are invariant to arbitrary overall intensity scaling when gain is nuisance.
  • Regularization and gain treatment are tested jointly with the grid-converged, area-preserving IRF work.

Related: #124 and the separate unresolved-resonance issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions