display_psf

poppy.display_psf(HDUlist_or_filename, ext=0, vmin=1e-07, vmax=0.1, scale='log', cmap=None, title=None, imagecrop=None, adjust_for_oversampling=False, normalize='None', crosshairs=False, markcentroid=False, colorbar=True, colorbar_orientation='vertical', pixelscale='PIXELSCL', ax=None, return_ax=False, interpolation=None, cube_slice=None)[source]

Display nicely a PSF from a given hdulist or filename

This is extensively configurable. In addition to making an attractive display, for interactive usage this function provides a live display of the pixel value at a given (x,y) as you mouse around the image.

HDUlist_or_filename : fits.hdulist or string
FITS file containing image to display.
ext : int
FITS extension. default = 0
vmin, vmax : float
min and max for image display scaling
scale : str
‘linear’ or ‘log’, default is log
cmap : matplotlib.cm.Colormap instance or None
Colormap to use. If not given, taken from user’s poppy.conf.cmap_sequential (Default: ‘gist_heat’).
title : string, optional
Set the plot title explicitly.
imagecrop : float
size of region to display (default is whole image)
adjust_for_oversampling : bool
rescale to conserve surface brightness for oversampled PSFs? (Making this True conserves surface brightness but not total flux.) Default is False, to conserve total flux.
normalize : string
set to ‘peak’ to normalize peak intensity =1, or to ‘total’ to normalize total flux=1. Default is no normalization.
crosshairs : bool
Draw a crosshairs at the image center (0, 0)? Default: False.
markcentroid : bool
Draw a crosshairs at the image centroid location? Centroiding is computed with the JWST-standard moving box algorithm. Default: False.
colorbar : bool
Draw a colorbar on the image?
colorbar_orientation : ‘vertical’ (default) or ‘horizontal’
How should the colorbar be oriented? (Note: Updating a plot and changing the colorbar orientation is not supported. When replotting in the same axes, use the same colorbar orientation.)
pixelscale : str or float
if str, interpreted as the FITS keyword name for the pixel scale in arcsec/pixels. if float, used as the pixelscale directly.
ax : matplotlib.Axes instance
Axes to display into.
return_ax : bool
Return the axes to the caller for later use? (Default: False) When True, this function returns a matplotlib.Axes instance, or a tuple of (ax, cb) where the second is the colorbar Axes.
interpolation : string
Interpolation technique for PSF image. Default is None, meaning it is taken from matplotlib’s image.interpolation rcParam.
cube_slice : int or None
if input PSF is a datacube from calc_datacube, which slice of the cube should be displayed?