Detailed API Reference

webbpsf Package

WebbPSF: Simulated Point Spread Functions for the James Webb Space Telescope

WebbPSF produces simulated PSFs for the James Webb Space Telescope, NASA’s next flagship infrared space telescope. WebbPSF can simulate images for any of the four science instruments plus the fine guidance sensor, including both direct imaging and coronagraphic modes.

Developed by Marshall Perrin and collaborators at STScI, 2010-2018.

Documentation can be found online at https://webbpsf.readthedocs.io/

Functions

display_ee([hdulist_or_filename, ext, ...])

Display Encircled Energy curve for a PSF

display_profiles([hdulist_or_filename, ext, ...])

Produce two plots of PSF radial profile and encircled energy

display_psf(hdulist_or_filename[, ext, ...])

Display nicely a PSF from a given hdulist or filename

display_psf_difference([...])

Display nicely the difference of two PSFs from given files

enable_adjustable_ote(instr)

Set up a WebbPSF instrument instance to have a modifiable OTE wavefront error OPD via an OTE linear optical model (LOM).

instrument(name)

This is just a convenience function, allowing one to access instrument objects based on a string.

measure_centroid([HDUlist_or_filename, ext, ...])

Measure the center of an image via center-of-mass

measure_ee([hdulist_or_filename, ext, ...])

measure encircled energy vs radius and return as an interpolator

measure_fwhm(hdulist_or_filename[, ext, ...])

Improved version of measuring FWHM, without any binning of image data.

measure_radial([hdulist_or_filename, ext, ...])

measure azimuthally averaged radial profile of a PSF.

measure_sharpness([HDUlist_or_filename, ext])

Compute image sharpness, the sum of pixel squares.

measure_strehl([HDUlist_or_filename, ext, ...])

Estimate the Strehl ratio for a PSF.

radial_profile([hdulist_or_filename, ext, ...])

Compute a radial profile of the image.

restart_logging([verbose])

Restart logging using the same settings as the last WebbPSF session, as stored in the configuration system.

setup_logging([level, filename])

Allows selection of logging detail and output locations (screen and/or file)

setup_sim_to_match_file(filename_or_HDUList)

Setup a webbpsf Instrument instance matched to a given

show_notebook_interface(instrumentname)

Show Jupyter notebook widget interface

specFromSpectralType(sptype[, return_list, ...])

Get synphot Spectrum object from a user-friendly spectral type string.

system_diagnostic()

return various helpful/informative information about the current system.

Classes

Conf()

Configuration parameters for webbpsf.

FGS()

A class modeling the optics of the FGS.

JWInstrument(*args, **kwargs)

Superclass for all JWST instruments

MIRI()

A class modeling the optics of MIRI, the Mid-InfraRed Instrument.

NIRCam()

A class modeling the optics of NIRCam.

NIRISS([auto_pupil])

A class modeling the optics of the Near-IR Imager and Slit Spectrograph

NIRSpec()

A class modeling the optics of NIRSpec, in imaging mode.

RomanCoronagraph([mode, pixelscale, ...])

Roman Coronagraph Instrument

SpaceTelescopeInstrument([name, pixelscale])

A generic Space Telescope Instrument class.

UnsupportedPythonError

WFI()

WFI represents the Roman mission's Wide Field Imager.

Class Inheritance Diagram

digraph inheritance9c0c4a6055 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "Conf" [URL="../api/webbpsf.Conf.html#webbpsf.Conf",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Configuration parameters for `webbpsf`."]; "ConfigNamespace" -> "Conf" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ConfigNamespace" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="A namespace of configuration items. Each subpackage with"]; "FGS" [URL="../api/webbpsf.FGS.html#webbpsf.FGS",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A class modeling the optics of the FGS."]; "JWInstrument" -> "FGS" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Instrument" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="A generic astronomical instrument, composed of"]; "JWInstrument" [URL="../api/webbpsf.JWInstrument.html#webbpsf.JWInstrument",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Superclass for all JWST instruments"]; "SpaceTelescopeInstrument" -> "JWInstrument" [arrowsize=0.5,style="setlinewidth(0.5)"]; "MIRI" [URL="../api/webbpsf.MIRI.html#webbpsf.MIRI",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A class modeling the optics of MIRI, the Mid-InfraRed Instrument."]; "JWInstrument" -> "MIRI" [arrowsize=0.5,style="setlinewidth(0.5)"]; "NIRCam" [URL="../api/webbpsf.NIRCam.html#webbpsf.NIRCam",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A class modeling the optics of NIRCam."]; "JWInstrument" -> "NIRCam" [arrowsize=0.5,style="setlinewidth(0.5)"]; "NIRISS" [URL="../api/webbpsf.NIRISS.html#webbpsf.NIRISS",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A class modeling the optics of the Near-IR Imager and Slit Spectrograph"]; "JWInstrument" -> "NIRISS" [arrowsize=0.5,style="setlinewidth(0.5)"]; "NIRSpec" [URL="../api/webbpsf.NIRSpec.html#webbpsf.NIRSpec",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A class modeling the optics of NIRSpec, in **imaging** mode."]; "JWInstrument" -> "NIRSpec" [arrowsize=0.5,style="setlinewidth(0.5)"]; "RomanCoronagraph" [URL="../api/webbpsf.RomanCoronagraph.html#webbpsf.RomanCoronagraph",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Roman Coronagraph Instrument"]; "RomanInstrument" -> "RomanCoronagraph" [arrowsize=0.5,style="setlinewidth(0.5)"]; "RomanInstrument" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled"]; "SpaceTelescopeInstrument" -> "RomanInstrument" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SpaceTelescopeInstrument" [URL="../api/webbpsf.SpaceTelescopeInstrument.html#webbpsf.SpaceTelescopeInstrument",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A generic Space Telescope Instrument class."]; "Instrument" -> "SpaceTelescopeInstrument" [arrowsize=0.5,style="setlinewidth(0.5)"]; "UnsupportedPythonError" [URL="../api/webbpsf.UnsupportedPythonError.html#webbpsf.UnsupportedPythonError",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "WFI" [URL="../api/webbpsf.WFI.html#webbpsf.WFI",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="WFI represents the Roman mission's Wide Field Imager."]; "RomanInstrument" -> "WFI" [arrowsize=0.5,style="setlinewidth(0.5)"]; }