Skip to content

Plot improvements: DPI config, Delaunay aspect ratio, tick rounding, source vmax#244

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

Plot improvements: DPI config, Delaunay aspect ratio, tick rounding, source vmax#244
Jammy2211 merged 1 commit intomainfrom
feature/plot-improvements-5

Conversation

@Jammy2211
Copy link
Copy Markdown
Collaborator

Summary

  • Add dpi key to visualize/general.yaml (default 150) so save_figure reads DPI from config rather than hardcoding 300, halving output file sizes with negligible quality loss
  • Fix Delaunay source-plane aspect ratio to match rectangular: pass extent to _plot_delaunay and call ax.set_aspect(x_range/y_range, adjustable="box")
  • Fix tick-label 1e-16 noise on both rectangular and Delaunay panels: after rounding, clamp values smaller than 1e-10 of scale to zero in _round_ticks so symmetric extents don't display scientific notation
  • Add vmin/vmax parameters to plot_mapper, forwarded to plot_inversion_reconstruction
  • In subplot_of_mapper, compute recon_vmax from the reconstructed image and pass to both source-plane panels (Zoom and No-Zoom) so they share a consistent colorbar scale

Test plan

  • Run scripts/imaging/visualization.py — check fit.png and inversion_0_0.png source-plane panels share colorbar with Data (Source Scale)
  • Check Delaunay source-plane aspect ratio matches other panels in subplot
  • Check tick labels have no scientific notation artifacts on symmetric extents
  • Verify output PNG file sizes are reduced vs DPI=300 baseline

🤖 Generated with Claude Code

…source vmax

- Add `dpi` key to `visualize/general.yaml` (default 150) so save_figure reads
  DPI from config rather than hardcoding 300
- Fix Delaunay source-plane aspect ratio to match rectangular: pass extent to
  _plot_delaunay and call ax.set_aspect(x_range/y_range, adjustable="box")
- Fix tick-label 1e-16 noise: after rounding, clamp values < 1e-10 of scale to
  zero in _round_ticks so symmetric extents don't show scientific notation
- Add vmin/vmax parameters to plot_mapper, forwarded to
  plot_inversion_reconstruction
- In subplot_of_mapper, compute recon_vmax from the reconstructed image and
  pass to both source-plane panels so Zoom and No-Zoom share a colorbar scale

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Jammy2211 Jammy2211 merged commit 2044037 into main Mar 31, 2026
0 of 8 checks passed
@Jammy2211 Jammy2211 deleted the feature/plot-improvements-5 branch March 31, 2026 10:01
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