STDPSFGrid#
- class photutils.psf.STDPSFGrid(filename)[source]#
Bases:
objectClass to read and plot “STDPSF” format ePSF model grids.
STDPSF files are FITS files that contain a 3D array of ePSFs with the header detailing where the fiducial ePSFs are located in the detector coordinate frame.
The oversampling factor for STDPSF FITS files is assumed to be 4.
- Parameters:
- filenamestr
The name of the STDPDF FITS file. A URL can also be used.
Examples
>>> from photutils.psf import STDPSFGrid >>> psfgrid = STDPSFGrid('STDPSF_ACSWFC_F814W.fits') >>> fig = psfgrid.plot_grid()
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='viridis', dividers=True, divider_color='darkgray', divider_ls='-', figsize=None)[source]#
Plot the grid of ePSF models.
- Parameters:
- ax
matplotlib.axes.AxesorNone, optional The matplotlib axes on which to plot. If
None, then the currentAxesinstance 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). Ifdeltas=True, thevminis set to-vmax. Ifdeltas=Falsethevminis set tovmax/ 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
Trueto show the differences between each ePSF and the average ePSF.- cmapstr or
matplotlib.colors.Colormap, optional The colormap to use. The default is ‘viridis’.
- 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.
- ax
- Returns:
- fig
matplotlib.figure.Figure The matplotlib figure object. This will be the current figure if
ax=None. Usefig.savefig()to save the figure to a file.
- fig
Notes
This method returns a figure object. If you are using this method in a script, you will need to call
fig.show()to display the figure. If you are using this method in a Jupyter notebook, the figure will be displayed automatically.When 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.