Grid#

class epsf.grid.EPSFGrid(x_grid, y_grid, grid)[source]#

Object to store an effective PSF Grid

An ePSF grid consists of a set of PSFs with their corresponding detector coordinates. It can then be called at the desired detector coordinate to generate an interpolated PSF.

To create a grid from a JWST1PASS FITS file, see EPSFGrid.from_fits().

Parameters:
  • x_grid (ndarray) – x coordinates of the ePSF grid. Should be 1D with shape (Npsf,).

  • y_grid (ndarray) – y coordinates of the ePSF grid. Should be 1D with shape (Npsf,).

  • grid (ndarray) – Array containing the grid of ePSF. Should be 3D with shape (Npsf, Npix, Npix).

classmethod from_fits(epsf_path)[source]#

Create EPSFGrid from a JWST1PASS FITS file.

The fits file should ave a single extension with the PSF grid as data. The grid positions should be stored in IPSFX0i and JPSFY0j where i and j are the x and y indices for each position.

Parameters:

epsf_path (str | Path) – Path to the JWST1PASS ePSF grid.

Return type:

EPSFGrid

plot()[source]#

Plot the ePSF grid as a mosaic.

Calls epsf.plot.plot_mosaic().

Returns:

Figure and Axes objects e plot

Return type:

tuple[Figure, Axes]