Skip to content

feat(weak): add weak-lensing simulator script (PyAutoLens#472) - #84

Merged
Jammy2211 merged 1 commit into
mainfrom
claude/list-admin-prompts-Mid1U
May 4, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
claude/list-admin-prompts-Mid1U

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Workspace half of the step-1 weak-lensing work (linked to PyAutoLens#472 / library PR #473). Adds a runnable simulator example for weak-lensing shear catalogues, mirroring the structure of imaging/simulator.py.

Scripts Changed

  • scripts/weak/__init__.py — new sub-package init.
  • scripts/weak/simulator.py — new. Builds an Isothermal Tracer, draws 200 uniform-random source-galaxy positions inside [-3, +3] arcsec, and uses al.SimulatorShearYX(noise_sigma=0.3, seed=1) to produce a noisy WeakDataset. Saves the dataset and tracer to dataset/weak/simple/ as JSON. Visualization is left as # TODO(2_visualization.md) placeholders to be filled in by the next prompt in the series.

Upstream PR

Test Plan

  • python scripts/weak/simulator.py — confirm the script runs end-to-end and writes dataset/weak/simple/dataset.json + tracer.json.
  • (author note) sandbox has no numpy/autolens runtime, so the script was not executed here. Please run before merging.

🤖 Generated with Claude Code


Generated by Claude Code

scripts/weak/simulator.py simulates a weak-lensing shear catalogue from
an Isothermal lens galaxy using al.SimulatorShearYX. Mirrors the
imaging/simulator.py structure but produces a catalogue (positions +
shear + noise map) rather than a 2D image.

Visualization placeholders (TODO(2_visualization.md)) are left in place
for the follow-up prompt that adds matplotlib.quiver-based shear plots.
@Jammy2211
Jammy2211 force-pushed the claude/list-admin-prompts-Mid1U branch from 69b1494 to 31bd64c Compare May 4, 2026 11:42
@Jammy2211
Jammy2211 merged commit 7ca6360 into main May 4, 2026
5 checks passed
@Jammy2211
Jammy2211 deleted the claude/list-admin-prompts-Mid1U branch May 4, 2026 11:47
Jammy2211 added a commit that referenced this pull request Sep 17, 2026
…d validation grid

Ports the canonical fixed span from euclid_strong_lens_modeling_pipeline
catalogue/scripts/witt_wynne_util.py (#84): wrong-branch quartic roots filtered so
the 1-image verdict fires; on-axis / centre / e-out-of-range sources return a NaN
row with verdict -1; mass profile picked by class so an MGE light Basis is never
taken as the mass; guarded vector sum and sub-critical lens. Validation now runs a
q x shear x misalignment grid inside and outside the caustic and the Wrap Up
states the measured agreement instead of generalising five cases.

Closes #552

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Jammy2211 Jammy2211 removed the pending-release PR queued for the next release build label Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants