ModelGridPlotMixin

class photutils.psf.ModelGridPlotMixin[source]

Bases: object

Mixin class to plot a grid of ePSF models.

Methods Summary

plot_grid(*[, ax, vmax_scale, peak_norm, ...])

Plot the grid of ePSF models.

Methods Documentation

plot_grid(*, ax=None, vmax_scale=None, peak_norm=False, deltas=False, cmap=None, dividers=True, divider_color='darkgray', divider_ls='-', figsize=None)[source]

Plot the grid of ePSF models.

Parameters:
axmatplotlib.axes.Axes or None, optional

The matplotlib axes on which to plot. If None, then the current Axes instance is used.

vmax_scalefloat, optional

Scale factor to apply to the image stretch limits. This value is multiplied by the peak ePSF value to determine the plotting vmax. The defaults are 1.0 for plotting the ePSF data and 0.03 for plotting the ePSF difference data (deltas=True). If deltas=True, the vmin is set to -vmax. If deltas=False the vmin is set to vmax / 1e4.

peak_normbool, optional

Whether to normalize the ePSF data by the peak value. The default shows the ePSF flux per pixel.

deltasbool, optional

Set to True to show the differences between each ePSF and the average ePSF.

cmapstr or matplotlib.colors.Colormap, optional

The colormap to use. The default is None, which uses the ‘viridis’ colormap for plotting ePSF data and the ‘gray_r’ colormap for plotting the ePSF difference data (deltas=True).

dividersbool, optional

Whether to show divider lines between the ePSFs.

divider_color, divider_lsstr, optional

Matplotlib color and linestyle options for the divider lines between ePSFs. These keywords have no effect unless show_dividers=True.

figsize(float, float), optional

The figure (width, height) in inches.

Returns:
figmatplotlib.figure.Figure

The matplotlib figure object. This will be the current figure if ax=None. Use fig.savefig() to save the figure to a file.

Note that when calling this method in a notebook, if you do not store the return value of this function, the figure will be displayed twice due to the REPL automatically displaying the return value of the last function call. Alternatively, you can append a semicolon to the end of the function call to suppress the display of the return value.