Skip to content

feat: tangential/cross shear profiles + Kaiser-Squires map (weak series step 6) - #582

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/weak-viz-profiles
Jul 9, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/weak-viz-profiles

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Adds the two canonical cluster weak-lensing diagnostics to autolens/weak/plot/ — step 6 of the weak-lensing series (#581): the azimuthally averaged tangential/cross shear radial profile (plot_shear_profile, with model overlay when given a FitWeak; γ_x doubles as the B-mode null test) and a Kaiser-Squires convergence-map reconstruction (plot_convergence_map, E/B-mode maps from an FFT inversion of the gridded shear field). Both use only the public .ellipticities/.phis accessors, preserving the [γ₂, γ₁] storage encapsulation.

API Changes

Added only — no existing symbol removed, renamed or changed.

  • aplt.plot_shear_profile(obj, centre=, bins=, ax=, output_*) — binned γ_t/γ_x profiles of a WeakDataset or FitWeak.
  • aplt.plot_convergence_map(shear_yx, shape_native=, smoothing_sigma_pixels=, ...) — Kaiser-Squires E-mode map.
  • Library-internal: shear_tangential_cross_from, shear_profile_from, convergence_via_kaiser_squires_from in autolens.weak.plot.
    See full details below.

Test Plan

  • Full test_autolens/ suite: 352 passed (38 weak, 6 new).
  • SIS conventions: γ_t = |γ| (pure tangential), γ_x = 0 at 1e-6, binned γ_t matches θ_E/2r analytic.
  • KS: peak at lens centre, E ≫ B, zero-mean (mass-sheet), and an elliptical-lens axis-parity regression test (45° lens → 47.1° map axis) that the rotation-invariant SIS tests cannot provide.

Validation checklist (--auto run — plan was not pre-approved)

Full API Changes (for automation & release notes)

Added

  • autolens.weak.plot.shear_profile_plots.shear_tangential_cross_from(shear_yx, centre) — per-galaxy (γ_t, γ_x, r) about a centre.
  • autolens.weak.plot.shear_profile_plots.shear_profile_from(shear_yx, centre, bins, noise_map=) — binned profiles with standard errors.
  • autolens.weak.plot.shear_profile_plots.plot_shear_profile (exported as aplt.plot_shear_profile).
  • autolens.weak.plot.convergence_plots.convergence_via_kaiser_squires_from(shear_yx, shape_native, smoothing_sigma_pixels, extent=) — returns (e_mode, b_mode) aa.Array2D maps.
  • autolens.weak.plot.convergence_plots.plot_convergence_map (exported as aplt.plot_convergence_map).

Migration

  • None required — purely additive.

Companion workspace PR demos both plotters; merge this PR first (library-first gate). Closes #581 after both merge.

🤖 Generated with Claude Code

- autolens/weak/plot/shear_profile_plots.py: shear_tangential_cross_from /
  shear_profile_from (binned gamma_t with standard errors, gamma_x as the
  B-mode null test) + plot_shear_profile (WeakDataset or FitWeak, model
  overlay for fits); uses only the public .ellipticities/.phis accessors
- autolens/weak/plot/convergence_plots.py: convergence_via_kaiser_squires_from
  (irregular->grid binning, FFT KS inversion, E/B-mode maps, dependency-free
  Gaussian smoothing) + plot_convergence_map
- aplt re-exports; SIS-analytic unit tests (gamma_t = theta_E/2r, pure
  tangential null, KS peak at lens centre, E>>B)

Step 6 of the weak-lensing series (#581).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Jul 9, 2026
@Jammy2211
Jammy2211 merged commit 645cc8f into main Jul 9, 2026
4 checks passed
@Jammy2211
Jammy2211 deleted the feature/weak-viz-profiles branch July 9, 2026 10:28
@Jammy2211 Jammy2211 removed the pending-release PR queued for the next release build label Sep 4, 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.

feat: tangential/cross shear profile + Kaiser-Squires map (weak series step 6)

1 participant