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, angular_coordinate_unit=Unit('arcsec'))[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.
- Parameters:
- hdulist_or_filenamefits.hdulist or string
FITS file containing image to display.
- extint
FITS extension. default = 0
- vmin, vmaxfloat
min and max for image display scaling
- scalestr
‘linear’ or ‘log’, default is log
- cmapmatplotlib.cm.Colormap instance or None
Colormap to use. If not given, taken from user’s
poppy.conf.cmap_sequential
(Default: ‘gist_heat’).- titlestring, optional
Set the plot title explicitly.
- imagecropfloat
size of region to display (default is whole image)
- adjust_for_oversamplingbool
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.
- normalizestring
set to ‘peak’ to normalize peak intensity =1, or to ‘total’ to normalize total flux=1. Default is no normalization.
- crosshairsbool
Draw a crosshairs at the image center (0, 0)? Default: False.
- markcentroidbool
Draw a crosshairs at the image centroid location? Centroiding is computed with the JWST-standard moving box algorithm. Default: False.
- colorbarbool
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.)
- pixelscalestr or float
if str, interpreted as the FITS keyword name for the pixel scale in arcsec/pixels. if float, used as the pixelscale directly.
- axmatplotlib.Axes instance
Axes to display into.
- return_axbool
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.
- interpolationstring
Interpolation technique for PSF image. Default is None, meaning it is taken from matplotlib’s
image.interpolation
rcParam.- cube_sliceint or None
if input PSF is a datacube from calc_datacube, which slice of the cube should be displayed?
- angular_coordinate_unitastropy Unit
Coordinate unit to use for axes display. Default is arcseconds.