Skip to content

feat: PYAUTO_SMALL_DATASETS support for weak lensing catalogues (weak series step 9) #583

Description

@Jammy2211

Overview

Step 9 of the weak-lensing series: extend the PYAUTO_SMALL_DATASETS=1 smoke-mode mechanism to catalogue-shaped weak-lensing data so workspace-test smoke runs of scripts/weak/ are fast. Pixel datasets are capped to 15×15 by autoarray/util/dataset_util.py; catalogues have no pixels, so the lever is the galaxy count.

Plan

  • PyAutoArray: add SMALL_DATASETS_N_CATALOGUE = 25 and cap_catalogue_size_for_small_datasets(n) to autoarray/util/dataset_util.py (env-var logic stays centralised beside the pixel caps; reusable by other catalogue datasets, e.g. point).
  • PyAutoLens: SimulatorShearYX.via_tracer_random_positions_from caps n_galaxies through the new helper (explicit-grid via_tracer_from deliberately uncapped — a user-provided grid is never mutated).
  • Unit tests in both repos (env-var set/unset via monkeypatch).
  • Verification (no workspace commit needed — should_simulate adoption already shipped in feat: tangential/cross shear profile + Kaiser-Squires map (weak series step 6) #581/Feature/remove settings pixelization #244): run scripts/weak/modeling.py under PYAUTO_SMALL_DATASETS=1 and confirm a 25-galaxy catalogue regenerates on disk and the fit completes fast.
Details

Branch: feature/weak-small-datasets; worktree ~/Code/PyAutoLabs-wt/weak-small-datasets/ (PyAutoArray + PyAutoLens). Merge autoarray first (upstream).
Gotchas carried from prior work: env-var mutations can bite inside decorators — the weak path uses Grid2DIrregular, untouched by the existing Grid2D.uniform/Mask2D.circular caps, so the simulator cap is the only site. Smoke env vars are wired via PyAutoBuild config/build/env_vars.yaml; no os.environ mutation in scripts.
Autonomy: --auto continuation 2026-07-09, effective supervised (header safe, feature cap) — plan-to-issue, park at ship sign-off.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions