Skip to content

Plot improvements: critical curves once, plane_image_from, source vmax#409

Merged
Jammy2211 merged 1 commit intomainfrom
feature/plot-improvements-5
Mar 31, 2026
Merged

Plot improvements: critical curves once, plane_image_from, source vmax#409
Jammy2211 merged 1 commit intomainfrom
feature/plot-improvements-5

Conversation

@Jammy2211
Copy link
Copy Markdown
Collaborator

Summary

  • Compute critical curves / caustics once in PlotterImaging.fit_imaging() and pass down to subplot_fit, subplot_fit_log10, and subplot_tracer_from_fit, eliminating redundant recomputation
  • Move plane_image_from to tracer_plots.py; implement zoom_to_brightest for parametric sources by evaluating light profiles on a plain uniform grid (fit.mask.derive_grid.all_false) rather than a ray-traced grid, showing the source without lensing distortion
  • Add vmax to _plot_source_plane and pass source_vmax to Source Plane (Zoomed) and Source Plane (No Zoom) panels in subplot_fit, subplot_fit_log10, and subplot_tracer_from_fit so they share the same colorbar scale as the Data (Source Scale) panel

Test plan

  • Run scripts/imaging/visualization.py — verify fit.png source-plane panels use same vmax as Data (Source Scale)
  • Check tracer.png Source Plane (No Zoom) matches Source Model Image colorbar scale
  • Verify parametric source plane zoom shows correct centred image without lensing distortion
  • Confirm critical curves are computed only once per fit_imaging() call (no performance regression)

🤖 Generated with Claude Code

- Compute critical curves / caustics once in PlotterImaging.fit_imaging() and
  pass down to subplot_fit, subplot_fit_log10, and subplot_tracer_from_fit,
  eliminating redundant recomputation
- Move plane_image_from to tracer_plots.py; implement zoom_to_brightest by
  evaluating parametric source light profiles on a uniform grid
  (fit.mask.derive_grid.all_false) rather than a ray-traced grid
- Add vmax parameter to _plot_source_plane and pass source_vmax to Source
  Plane (Zoomed) and Source Plane (No Zoom) panels in subplot_fit,
  subplot_fit_log10, and subplot_tracer_from_fit so they share the same
  colorbar scale as the Data (Source Scale) panel

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Jammy2211 Jammy2211 merged commit b5d6389 into main Mar 31, 2026
8 checks passed
@Jammy2211 Jammy2211 deleted the feature/plot-improvements-5 branch April 2, 2026 11:44
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.

1 participant