Skip to content

refactor: consolidate oversampled-PSF helpers (convolver + operate/image) #360

Description

@Jammy2211

Overview

The oversampled-PSF series refactor (PyAutoMind/issued/oversampling_refactor_followup.md, Refactor Agent verdict: too-large score 11 → conservative cut). Behaviour-preserving: the invariant is that both test suites (PyAutoArray, PyAutoGalaxy) and the ground-truth-pinned tests pass unchanged; API guard: none-expected. Effective autonomy: safe (refactor cap).

Scope (this PR)

  • convolver.py: consolidate the four _convolved_*_over_sampled_{np,jax}_from bodies into shared scatter/convolve/bin helpers (np pair + jax pair each share ~80% of their logic, differing only in trailing dims and kernel choice).
  • operate/image.py (PyAutoGalaxy): extract the thrice-duplicated s>1 evaluation-grid switch into one helper.
  • .gitignore: add test_autoarray/output/ (test-run artifacts leaked into a commit once today).

Deferred (recorded, not done)

  • The convolver/ package split (state / real-space / FFT / over-sample modules): high churn for zero behaviour value right now; revisit if the file keeps growing. The np/jax/FFT method-variant duplication that predates the series is likewise left for that split.
  • Dataset validation-helper placement and mapper matrix parameterization: already minimal after review.

🤖 Generated with Claude Code

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