STScI Logo

Running JWPSF v3.0
Instructions For Running JWPSF

The installation instructions are in the file Install_v3.1.pdf which is included along in the expansion of jwpsf_v3.1.tar.

You no longer need to be in a special directory to run the program. Paths have been set up so that you can run from anywhere. After doing the setup toy will be in the directory jwpsf which is a suitable place to run. The directory Results, where the PSF images go, will then be a subdirectory of this.

Start the program with the command

The program jwpsf models Point Spread Functions for the James Webb Space Telescope. It is currently based on plausible descriptions of the aperture and the optical path difference. These are supplied in the default files pupil.fits and instrument specific optical path difference (OPD) files which can be replaced by other models or real data when they become available. pupil.fits corresponds to 18 hexagonal segments fitted into a 1024 by 1024 grid with inter-segment gaps of two pixels. The real size of these gaps has yet to be established. The support spiders are represented by gaps 15 pixels wide. The 1024 pixels correspond to 6.5 meters.

The optical path difference (OPD) files represent modeled mirror misalignment and aberrations. They include effects for the full optical path of each expressed in microns. For each of the instruments NIRCam, NIRSpec, MIRI, and TFI, the files are the results of a series of 10 Monte Carlo realizations using the same error budget known as Revision S and amounting to about 150 nm total RMS error to match Level 2 requirements. For critical applications where small variations of the PSF are important it would probably be advisable to use all 10 OPD files in turn and see what differences appear.

When you start the program, a menu appears. In the first column you are initially asked to specify an instrument. Subsequently you may select a source spectrum and either an instrument specific filter or a wavelength range, plus some PSF parameters.

Clicking on the "specify spectrum" offers you a spectral type or a file name. Choosing spectral type gives you a wide selection of stellar types for which we include files from the HST library of Kurucz spectral models.

Specifying a file name allows you to use any other file. The file structure is basically it two columns it a FITS table containing wavelengths and matching fluxes. For current testing just use one of the supplied spectra.

Specifying a filter follows a similar pattern. You are offered a list of supplied filter names which will reference a set of files included with the program, or you may specify your own file. The supplied files are currently idealized top-hat shape filters approximating the proposed imaging filter set for NIRCam, NIRSpec and MIRI.each Again, for now use the supplied filters.

Instead of using a source filter you may set a wavelength range. This will model a flat transmission between two wavelengths sampled evenly at the number of bands you choose. In this case you need not select a source spectrum and a uniform flux distribution is assumed.

You also have the option "set PSF parameters". You may leave these at the default values. The fundamental pixel size will be that for the chosen instrument. The calculation, by default, will oversample by a factor of 4, and the size of the pixels in the output image will be 1/4 of the physical pixel value.

The second column of the menu allows you to review the results of the first column selections. You may make changes before beginning the actual PSF calculation.

When you are satisfied with your selections, click on "create the PSF". You will be asked to select the pupil image and the phase map image. The supplied pupil image is probably the only one you will wish to use. Each instrument has 10 phase map or OPD images which are not meaningfully different. They derive from repeated Monte-Carlo simulations with the same input parameters. Using different cases allows you to estimate the variability of the PSFs or the reliability of the model.

Finally you are required to provide a file name for the PSF that will be calculated. This will be a FITS image. (The extension .fits is added automatically if you don't specify it yourself.) The calculation will then proceed and may take several minutes after which the PSF will be displayed and the result saved either in the new default "Results" directory or wherever you choose to place it.

All the displayed graphs may be inspected and manipulated by facilities provide by matplotlib. A row of buttons is displayed at the lower edge of the plot. Clicking on the third one allows you to drag the plot around using the mouse. Clicking on the fourth icon sets up a rectangular zoom. Drag a rectangle about any portion of the graph and it will be redisplayed with the rectangle occupying the full graph window. At any time, clicking on the first icon causes the display to revert to the original graph.

At this point you may "QUIT" or begin another calculation.