STScI Logo

Wide Field Infrared Survey Telescope
PSF Simulation

Point-spread function for a G0V star imaged at the Wide Field Instrument of WFIRST, viewed in six filters. (Intensity is shown in log scale. Axes are labeled in arcseconds.) Point-spread function for a G0V star imaged at the Wide Field Instrument of WFIRST, viewed in six filters.
(Intensity is shown in log scale. Axes are labeled in arcseconds.)

Introduction to WebbPSF for WFIRST

WebbPSF-WFIRST provides a customizable interface to perform point-spread function (PSF) simulations and calculations for the Wide-Field Instrument (WFI) planned for WFIRST. A simulated PSF provides a useful tool for predicting the observatory's performance at a particular combination of wavelength (or bandpass), field position, and pixel scale. PSFs are also an important input to simulate astronomical scenes. For example, WebbPSF-WFIRST PSFs are used by the Pandeia and STIPS toolkits developed at STScI.


PSFs are simulated in the far-field limit (Fraunhofer domain) using the same optical simulation library as the existing WebbPSF software. WebbPSF was developed to simulate JWST instrument PSFs, and its accuracy has been checked against ground test data for JWST (see the references listed below). The WebbPSF-WFIRST WFI model is based on the Cycle 7 WFIRST design revision, and it incorporates information from GSFC Instrument Reference Information files.

WebbPSF-WFIRST allows users to calculate PSFs both in the bandpasses defined in the Final Report of the WFIRST-AFTA Science Definition Team (Table 3-2) and for the monochromatic case (which can be useful as an input to other calculations). For broad-band PSFs, WebbPSF allows the user to select an input spectrum (e.g. a stellar spectral type or a galaxy spectral energy distribution) which then weights the individual monochromatic components of the PSF appropriately.

The software provides several built-in analysis tools to compute a radial profile, an encircled energy curve, or the difference image of two PSFs. All of these analysis tools work with standard FITS files with appropriate header keywords, and the PSF calculation results from WebbPSF can be written directly to FITS files for export to other tools.

Compared to the current WebbPSF instrument models for JWST, WebbPSF-WFIRST adds support for field-dependent PSF aberrations both within a single detector and among the eighteen detectors in the WFI focal plane. These are modeled as Zernike coefficients, using the instrument reference data from the Cycle 7 design revision.

Getting Started with WebbPSF-WFIRST

The WebbPSF package includes both JWST and WFIRST instrument models and is available for download and installation on the user's own computer. The instructions for installation for WebbPSF are the same whether you are using the JWST or WFIRST functionality, so users can refer to the WebbPSF installation documentation for installation options.

To aid users interested in getting started with STScI’s simulation tools for WFIRST, including WebbPSF, we have written tutorial jupyter notebooks, available from a github repository . This repository also includes alternative instructions for installing STScI’s simulation tools WebbPSF and Pandeia in a self-contained installation using Docker. This is the suggested option for users that are less familiar with using python.

For those following the local installation instructions, after WebbPSF is installed users of a scientific Python distribution like Ureka or Anaconda can either clone the above repository, or simply download the notebook file to a folder and launch "ipython notebook" (or "jupyter notebook") in that folder from the command line. Users that use the Docker installation option will have the notebooks installed within the Docker container.

Example calculation showing the high-spatial-frequency wavefront error map, the addition of field dependent aberrations, and the final PSF. Example calculation showing the assumed high-spatial-frequency wavefront error map due to the telescope assembly, the addition of field dependent aberrations in the instrument focal plane, and the calculated PSF (before sampling on the detector pixels).

Citing WebbPSF

A technical report (WFIRST-STScI-TR1703: WebbPSF for WFIRST) by Long & Perrin discusses the assumptions underlying WebbPSF-WFIRST, and compares its model PSFs to those calculated with alternative tools. Users are also encouraged to cite one of the following publications covering WebbPSF's JWST functionality:

Assumptions and Caveats

The WFIRST functionality of WebbPSF is still in continued development. The present implementation is made available to the community as a beta version.

The WFIRST Mission is not yet in development, and observatory designs continue to evolve. Hence, WebbPSF-WFIRST simulations may not accurately reflect the actual future observatory.

At this stage, the model for the WFI makes several approximations beyond the basic assumption of far-field diffraction-based PSF calculation:

Future Improvements

We are planning many additions and improvements for future WebbPSF-WFIRST versions, including the following:

Credits, Acknowledgements, and Feedback

WebbPSF is developed by Marshall Perrin, Robel Geda, and collaborators in support of STScI's involvement in both the JWST and WFIRST missions. Software development takes place on GitHub at Contributions of bug reports or code are welcome!

Users are encouraged to address questions, suggestions, and bug reports to with "WebbPSF-WFIRST question" in the subject line, where they will be directed to the appropriate members of the WebbPSF-WFIRST team at STScI.