Documentation for STPSF
(Formerly WebbPSF, for versions < 2.0)
STPSF is a Python package that computes simulated point spread functions (PSFs) for NASA’s James Webb Space Telescope (JWST) and Nancy Grace Roman Space Telescope. STPSF transforms models of telescope and instrument optical state into PSFs, taking into account detector pixel scales, rotations, filter profiles, and point source spectra. It is rather a tool for transforming optical path difference (OPD) maps, created with observatory systems engineering models, into the resulting PSFs as observed with JWST’s or Roman’s instruments.

Sample PSFs for JWST’s instrument suite, all on the same angular scale and display stretch.

Sample PSFs for the filters in the Roman WFI on SCA01. Note that the prism and grism PSFs shown here are monochromatic.
Contributors: STPSF has been developed by Marshall Perrin, Marcio Meléndez, Shannon Osborne, Robel Geda, Brad Sappington, Charles-Philippe Lajoie, Joseph Long, Justin Otor, Jarron Leisenring, Neil Zimmerman, Keira Brooks, and Anand Sivaramakrishnan, with contributions from Alden Jurling, Lauren Chambers, Ewan Douglas, and others.
Getting Started with STPSF
See Using STPSF.
Quickstart Jupyter Notebook
This documentation is complemented by a Jupyter Notebook format quickstart tutorial. Downloading and running that notebook is a great way to get started using STPSF.
Getting Help
For help using or installing stpsf, you can contact the STScI JWST Help Desk at jwsthelp.stsci.edu, category STPSF/JWST Telescope.
Contents
Getting Started
Modeling JWST PSFs
- JWST Instrument Model Details
- More Examples for JWST
- JWST Using Wavefronts Measured On Orbit
- JWST Implementing Detector Effects in Simulations
- Matching PSF sims to in-flight JWST data
- Simulating IFU mode and Datacubes
- Large JWST PSF Calculations Using in-flight Simulations
- Visualizing the JWST Optical Budget
- JWST PSF Subtraction Using in-flight Simulations
- Plots of JWST Wavefronts Over Time
- Less Common Usage Options
Modeling Roman PSFs
Package Documentation
Developer Reference
How to cite STPSF
In addition to this documentation, STPSF is described in the following references. Users of STPSF are encouraged to cite one of these.
Perrin et al. 2014, “Updated point spread function simulations for JWST with STPSF”, Proc. SPIE. 9143,
Perrin et al. 2012, “Simulating point spread functions for the James Webb Space Telescope with STPSF”, Proc SPIE 8842, and
Perrin 2011, Improved PSF Simulations for JWST: Methods, Algorithms, and Validation, JWST Technical report JWST-STScI-002469.
In particular, the 2012 SPIE paper gives a broad overview, the 2014 SPIE paper presents comparisons to instrument cryotest data, and the Technical Report document describes in more detail the relevant optical physics, explains design decisions and motivation for STPSF’s architecture, and presents extensive validation tests demonstrating consistency between STPSF and other PSF simulation packages used throughout the JWST project.
Mailing List
If you would like to receive email announcements of future versions, please contact Marshall Perrin, or visit maillist.stsci.edu
to subscribe yourself to the “stpsf-users@maillist.stsci.edu” list.