You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix plotting test regressions and add missing optional dependencies
Plotting regressions (introduced by PR A1-A3):
1. conftest.py: also patch matplotlib.figure.Figure.savefig so PlotPatch
captures saves made via fig.savefig() (the new direct-matplotlib path).
2. utils.py save_figure(): add `structure` param; when format=="fits" delegate
to structure.output_to_fits() instead of fig.savefig() (matplotlib does not
support FITS as an output format).
3. array.py plot_array(): thread `structure` through to save_figure().
4. structure_plotters.py: add _zoom_array() helper that applies Zoom2D when
zoom_around_mask is set in config, matching the old MatPlot2D.plot_array
behaviour. Apply it in Array2DPlotter.figure_2d().
5. imaging_plotters.py / fit_imaging_plotters.py: import and apply _zoom_array
in _plot_array(); pass structure=array to plot_array() for FITS output.
6. grid.py: replace removed ndarray.ptp() with np.ptp() for NumPy 2.0 compat.
7. inversion.py _plot_rectangular(): guard against pixel_values=None (old
MatPlot2D code handled this implicitly).
Optional dependencies:
- Add numba and pynufft to [dev] extras in pyproject.toml so they are
installed by pip install -e ".[dev]" and CI picks them up automatically.
- Pin pynufft to latest release (2025.2.1) which works with scipy >= 1.12
(2022.2.2 used pinv2 which was removed in scipy 1.12).
https://claude.ai/code/session_01B9sVEV54XWCa2LJw1C8gvv
0 commit comments