Skip to content

docs: align curvature diagonal floor documentation #443

Description

@Jammy2211

Overview

The likelihood-tier hazard profiler found a five-order-of-magnitude documentation/configuration mismatch in PyAutoArray's curvature-diagonal stabilization path. This task corrects the documentation to describe the caller-supplied value, the packaged 1.0e-3 default, and workspace overrides without changing numerical behavior.

Plan

  • Align the curvature helper docstring with the actual Settings/config path.
  • Clarify the corresponding Settings parameter documentation.
  • Run the PyAutoArray test suite and confirm no runtime behavior or public API changed.
Detailed implementation plan

Affected Repositories

  • PyAutoArray (primary)

Branch Survey

Repository Current Branch Dirty?
PyAutoArray (GitHub main) main clean remote; no local checkout

Suggested branch: feature/curvature-diag-doc-config-drift

Work Classification

Library

Implementation Steps

  1. Update autoarray/inversion/inversion/inversion_util.py so curvature_matrix_with_added_to_diag_from documents a caller-supplied positive diagonal value, the Settings path, the packaged 1.0e-3 default, and workspace overrides.
  2. Document the helper's value, no_regularization_index_list, and xp parameters and its returned matrix.
  3. Update autoarray/settings.py so no_regularization_add_to_curvature_diag_value states the packaged default and override behavior.
  4. Run python -m pytest test_autoarray/ -x.

Key Files

  • autoarray/inversion/inversion/inversion_util.py — stale 1.0e-8 claim and incomplete parameter docs.
  • autoarray/settings.py — configuration-facing parameter documentation.
  • autoarray/config/general.yaml — authoritative packaged 1.0e-3 value; reference only.

Original Prompt

Click to expand starting prompt

Align curvature-diagonal floor documentation with configuration

Type: bug
Target: autoarray
Repos:

  • PyAutoArray
    Difficulty: small
    Autonomy: safe
    Priority: normal
    Status: formalised
    Source: autolens_profiling#110 · finding likelihood.imaging-pixelization.curvature-floor-doc-config-drift

The tier-2 likelihood hazard scan proved that
curvature_matrix_with_added_to_diag_from documents a fixed 1.0e-8
diagonal addition while the packaged PyAutoArray configuration supplies
1.0e-3 through
Settings.no_regularization_add_to_curvature_diag_value. The ratio is
1e5, and workspaces may override the packaged setting.

Correct the public-facing source documentation so it describes the value
actually passed by the caller, names the packaged 1.0e-3 default and the
workspace override seam, and documents the helper's currently omitted
parameters. Do not change the configured value or any numerical behavior.

Acceptance:

  • No PyAutoArray source documentation claims that this helper always adds
    1.0e-8.
  • The helper and Settings documentation agree with
    autoarray/config/general.yaml.
  • The PyAutoArray test suite is green.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions