The WebbPSF GUI provides an easy interface to most, but not quite all, of the functionality of WebbPSF. (Not all of the advanced settings in the options structure for webbpsf.JWInstrument are exposed in the GUI yet, and the programming API is better suited for scripting batch calculations.)
Essentially identical interfaces are implemented using two different widget programming toolkits, ttk and wxwidgets. The optical simulation functionality is identical. The ttk interface is more likely to work by default on an arbitrary Python installation, since ttk is part of the standard library. However, the wx interface provides better cross-platform integration (for instance, it will use standard Mac- or Windows-style buttons, styles, file dialog boxes, etc) and is more aesthetically pleasing.
By default, the wx interface will attempt to load first, and if wx is not present, then it will fall back to the ttk interface.
To start the GUI:
>>> import webbpsf >>> webbpsf.gui()
Above: wx interface on Mac OS
Above: ttk interface
The main window is divided into three regions:
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.
This will invoke a standard File Save dialog box allowing you to save your new PSF.
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, either for how the PSF is computed (which Fourier transform algorithm is used, etc) and also for the image display stretch used for the displayed PSFs.
Documentation last updated on August 15, 2014