Skip to content

docs: Correct the critical-curve default in plotting helpers - #748

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/plot-utils-critical-curves-docstrings
Nov 23, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/plot-utils-critical-curves-docstrings

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Both caustic and critical-curve plotting helpers now document the packaged marching_squares default. They describe the per-call JAX compilation cost and the automatic ±3 arcsec seed window that can miss group and cluster curves. Both link to the profiling campaign.

API Changes

None. Only the two helper docstrings changed.

Verification

  • All six tests in test_autogalaxy/plot/mat_wrap/test_visuals.py passed.
  • Targeted Heart smoke selected the import check, autogalaxy_workspace/scripts/guides/galaxies.py, which passed.
  • The scoped Heart dev-ship gate passed for PyAutoGalaxy and PyAutoLens. The shift acknowledgement covers the workspace-manifest mismatch and missing release rehearsal.
  • Independent ship review returned CLEAN.
  • Both updated descriptions agree with packaged YAML. The module AST matches main after removing the two docstrings.
Reproduce the witness from the PyAutoGalaxy checkout
python3 - <<'PY'
import ast
import re
import subprocess
from pathlib import Path

path = Path("autogalaxy/util/plot_utils.py")
base = ast.parse(subprocess.check_output(["git", "show", f"origin/main:{path}"], text=True))
head = ast.parse(path.read_text())
config = Path("autogalaxy/config/visualize/general.yaml").read_text()
default = re.search(r"^\s*critical_curves_method:\s*(\w+)", config, re.M)[1]
link = "https://github.com/PyAutoLabs/autolens_profiling/blob/main/wiki/campaigns/lens/critical_curves/critical_curves.md"
for name in ["_critical_curves_from", "_caustics_from"]:
    for tree in (base, head):
        fn = next(n for n in tree.body if getattr(n, "name", "") == name)
        doc = ast.get_docstring(fn)
        method = re.search(r'`{2}"(\w+)"`{2} \*\(default\)\*', doc)[1]
        if tree is base:
            before = method
        else:
            assert method == default == "marching_squares"
            assert all(t in doc for t in ("recompiles on every call", "±3 arcsec", "group and cluster", link))
            print(f"{name}: {before} -> {method}; config, limitations and campaign link match")
        del fn.body[0]
assert ast.dump(base) == ast.dump(head)
print("Executable AST identical to origin/main")
PY

Closes #747.

@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Nov 23, 2026
@Jammy2211
Jammy2211 merged commit 1ba51f3 into main Nov 23, 2026
5 checks passed
@Jammy2211
Jammy2211 deleted the feature/plot-utils-critical-curves-docstrings branch November 23, 2026 10:15
@pyautolabs-bot pyautolabs-bot Bot removed the pending-release PR queued for the next release build label Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: Correct the critical-curve default in plotting helpers

1 participant