(Deprecated) Graphical User Interface¶
The GUI is deprecated, no longer actively developed, and not a priority for support. It is not recommended for more than the most basic use cases. The functionality and the following documentation is maintained for the time being, but this will likely go away in the next major release.
The WebbPSF GUI provides an easy interface to much, but not all, of the functionality of WebbPSF. (Many advanced settings in the class attributes and
options structure for
webbpsf.JWInstrument are not exposed in the GUI. The programming API is also much better suited for scripting calculations.)
The GUI is mostly not actively developed any more, and is not recommended for more than basic use cases. It’s a nice way to play around, but we encourage almost everyone to use the Python API as their primary way of interacting with WebbPSF. The GUI may be deprecated in a future release.
Using the Graphical Interface¶
Once you have installed WebbPSF, you should have the launcher script
webbpsfgui available. (If not, verify that the WebbPSF installation directory is on your system
Alternatively, you may start the GUI from an interactive session:
>>> import matplotlib >>> matplotlib.use('TkAgg') >>> import webbpsf >>> webbpsf.gui()
The main window is divided into three regions:
The top region allows control of the source spectral type and position. (Selecting a source spectral type requires installing the optional dependency pysynphot.)
The central, main region allows selection of instrument and configuration of instrument options. The options available here largely correspond to attributes of the
The lower region contains options for the PSF calculation itself such as pixel sampling and wavelengths. These correspond to parameters of the
The GUI buttons invoke actions as follows:
This invokes a PSF calculation with the given options. Each wavelength will be displayed in turn as it is computed, and finally the summed broadband PSF. This resulting PSF is stored in memory for use by the next three buttons.
This button will redisplay the PSF if the window has closed or something else has been displayed.
This will display the PSF’s radial profile and encircled energy profile.
Save PSF As…¶
This will invoke a standard File Save dialog box allowing you to save your new PSF to a FITS file.
This will display a graphical representation of the optical train for the current instrument configuration.
The ‘More Options…’ button on the toolbar will bring up a window that allows you to select options controlling the computation of the PSF (e.g. which Fourier transform algorithm is used) or display of the PSF (e.g. which color map to use).
Matplotlib Back End Issues
On macOS, some users have encountered problems running the GUI due to incompatibilities with Matplotlib backends. If you see a severe error when trying to start the gui, try switching the backend to “TkAgg” rather than the default “MacOSX”. This needs to be done immediately after starting IPython, prior to any attempt to use the GUI, and ideally before even importing webbpsf:
import matplotlib matplotlib.use('TkAgg') import webbpsf