Skip to content

docs: align curvature diagonal floor documentation #443

Closed

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.

Activity

  1. Jammy2211 commented on Aug 13, 2026

    @Jammy2211
    CollaboratorAuthor

    Library PR Created

    • docs: align curvature diagonal floor documentation #444
    • Commit: 7cdfb4350d5057438c11211487bd338e1a63d140
    • CI: GitHub Actions run 31743635821 succeeded on Python 3.12 and 3.13
    • Review surface: mergeable, one commit, two documentation-only files, no review threads
    • Release gate: pending-release

    Workspace impact

    None. This changes documentation only: no public API, configured value, executable statement, or runtime behavior changed. The task is parked at the manual merge checkpoint; no release was performed.

  2. Jammy2211 commented on Aug 13, 2026

    @Jammy2211
    CollaboratorAuthor

    Shipped — 2026-08-13

    PRs

    Summary

    The documentation/configuration drift is fixed and merged at 61844927ce4e6dd060847adb2cf925910f69e93a. The helper and Settings docs now state the packaged 1.0e-3 default, workspace override seam, and absolute scale dependence; configuration and numerical behavior are unchanged.

    Validation

    GitHub Actions run 31743635821 succeeded on Python 3.12 and 3.13. No release was performed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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