Overview of STPSF
The current version of STPSF for Roman implements the imaging mode in all filters as well as the Prism and Grism modes (i.e. undispersed PSF) for the Roman Wide Field Instrument (WFI). It also includes a prototype coronographic mode for the Coronograph Instrument, although development of this mode is limited and not representative of the actual Coronograph configuration. The software also provides a suite of tools for quantifying PSF properties such as full width at half maximum (FWHM), encircled energy, Strehl ratio, etc.
Note
STPSF supports PSF simulations for both the James Webb Space Telescope and the Nancy Grace Roman Space Telescope. For Roman, the Wide Field Instrument (WFI) is fully supported while only an early and preliminary version of the Coronagraph Instrument is implemented. The Coronagraph model has not been actively updated or developed since circa 2017 and does not reflect the current state of the instrument. As of STPSF version 2.0, only a prototype implementation for the shaped pupil coronagraph mode is available.
Why STPSF
PSF simulations are useful for informing the types of science that will be possible with any given telescope as well as for developing ancillary processing and analysis tools that will support the mission. As such, STPSF simulations are based on various observatory design parameters and as-built telescope and instrument properties. STPSF simulations are a key building block in higher-level observatory simulators, including the STIPS Space Telescope Imaging Product Simulator, Pandeia the Exposure Time Calculator, and the Roman I-Sim Roman WFI Image Simulator.
How to work with STPSF
At a high level, STPSF simulates point spread functions by (1) specifying the pupil and incoming aberrated wavefront and (2) propagating the resulting wavefront through the optical system under the assumption of plane-wave Fraunhofer diffraction, which is implemented using Fast Fourier transform(s). The tool incorporates relevant properties of the instrument, such filter bandpasses, pupil plane masks (for coronagraphic imaging) and detector pixel scale. A more detailed discussion of the algorithms can be found in the readthedocs documentation for STPSF and the readthedocs documentation for the Poppy software.
Upon the instantiation of a WFI object, the software automatically populates the instrument model with the appropriate filters, pupils, aberration interpolators, etc., and it is straightforward to then generate a PSF, as shown below. By default, PSFs are polychromatic, where the wavelength sampling is done over the bandwidth of the selected filter, but the user may override the calculation to produce monochromatic PSFs if desired. Moreover, the software will automatically update the field-dependent aberrations and the pupil mask upon selecting a different detector, filter, or pixel position.
import stpsf import matplotlib.pyplot as plt plt.rcParams['figure.figsize'] = (8, 10) wfi = stpsf.WFI() wfi.filter = 'F106' wfi.detector = 'SCA10' wfi.detector_position = (1048, 1048) wfi.calc_psf(display=True)
Figure of Example PSF Calculations
Example PSF calculation for Roman using STPSF.
Attributes of the WFI object can be checked for a complete list of available filters, detectors, and pupil masks:
print("WFI Filter List:") print(wfi.filter_list) print("WFI Detector List:") print(wfi.detector_list) print("WFI Pupil Mask List:") print(wfi.pupil_mask_list)
More examples are given in the STPSF Tutorials article as well as in the readthedocs documentation.
Finally, STPSF also implements the GriddedPSFModel class from Photutils that allows the user to generate a large number of individual PSFs effectively by interpolating PSFs from a grid of models, i.e. without having to perform a full PSF calculation at each location. We refer the interested user to the PSF Grids documentation on readthedocs.
Roman-specific Input Data
STPSF for Roman uses the same core functionalities as for JWST; only the telescope and instrument models that specify the actual optical system are different. The optical system is specified using Roman-specific data, which include the filter transmission curves, the pupil masks (which vary with detector and filters), as well as the field-dependent aberrations. These data originate from the Cycle 9 instrument reference information, which were generated and delivered by the Roman team at Goddard Space Flight Center (GSFC).
Below, we show the filter transmission curves as well as the entrance pupil as a function of detector and filter.
Figure of Roman WFI Transmission Curves
Transmission curves for Roman WFI.
Entrance Pupil Variation Animation
Animation showing the variation of the entrance pupil as a function of detector and filter.
The field-dependent aberrations used in STPSF are provided in the forms of Noll Zernike coefficients at five field points for each of the 18 detectors. STPSF interpolates these Zernike coefficients both in position and wavelength to calculate the total wavefront error at a specific position on any given detector, which is then used to calculate the PSF. Below, we show the variation of three Zernikes (defocus, 0-degree and 45-degree astigmatism; Z4, Z5, Z6 respectively) over all 18 detectors at 0.48 μm.
Figure illustrating the variation of the wavefront error across the WFI focal plane
Examples of the variation of the first three Zernikes over the WFI focal plane array, as taken from the Cycle 9 reference data. The reference data include Zernikes up to Z22.
Modifiable parameters pertaining to the instrumentation include:
- the desired WFI detector
- PSF location
- filter
- pupil mask
For input spectrum, STPSF can:
- take a custom input
- assume a flat spectrum
- assume a stellar spectrum
The STPSF Tutorials article includes more information on how these options work in practice. The PSF simulation process is amenable to both usage in notebooks and batch scripting to serve as input for another purpose. For example, STPSF is the underlying PSF generator for the STIPS Space Telescope Imaging Product Simulator, Roman I-Sim Roman I-Sim - The Roman Image Simulator, and Pandeia the Exposure Time Calculator.
STPSF also offers instrument-agnostic tools for calculating and visualizing commonly-sought properties of existing PSFs, such as the full width at half maximum (FWHM) or radial profile. See the Detailed API Reference for a full list of available properties.
Development
Users interested in contributing to the ongoing development of STPSF may clone or fork from the main Github repository. Pull requests with code enhancements from the community are encouraged.
For additional questions not answered in this article, please contact the Roman Help Desk.
References
In addition to this documentation, STPSF (formerly WebbPSF) is described in the following references. Users are encouraged to cite one of these publications:
- Perrin et al. 2014, “Updated point spread function simulations for JWST with WebbPSF”, Proc. SPIE. 9143,
Perrin et al. 2012, “Simulating point spread functions for the James Webb Space Telescope with WebbPSF”, Proc SPIE 8842, and
Perrin 2011, "Improved PSF Simulations for JWST: Methods, Algorithms, and Validation", JWST Technical report JWST-STScI-002469.
Additionally, this page uses data from the Cycle 9 instrument reference information, which were generated and delivered by the Roman team at Goddard Space Flight Center (GSFC).