JWST POPPY:docs

Installation

POPPY may be installed from PyPI in the usual manner for Python packages:

% pip install poppy --upgrade

The source code is hosted in this repository on GitHub.

Requirements

  • The standard Python scientific stack: numpy, scipy, matplotlib
  • astropy, 0.4 or more recent, in particular its astropy.io.fits, astropy.io.ascii and astropy.config components.

The following are optional. The first, pysynphot, is recommended for most users. The other optional installs are only worth adding for speed improvements if you are spending substantial time running calculations.

  • pysynphot enables the simulation of PSFs with proper spectral response to realistic source spectra. Without this, PSF fidelity is reduced. See below for installation instructions for pysynphot.
  • psutil enables slightly better automatic selection of numbers of processes for multiprocess calculations.
  • pyFFTW. The FFTW library can speed up the FFTs used in coronagraphic simulations and slit spectroscopy. Since direct imaging simulations use a discrete matrix FFT instead, direct imaging simulation speed is unchanged. pyFFTW is recommended if you expect to perform many coronagraphic calculations, particularly for MIRI. (Note: POPPY previously made use of the PyFFTW3 package, which is different from pyFFTW. The latter is more actively maintained and supported today, hence the switch.)

Installing or updating pysynphot

Pysynphot is an optional dependency, but as noted above is highly recommended.

To install or update pysynphot, do the following. (See also http://stsdas.stsci.edu/pysynphot/ and https://trac6.assembla.com/astrolib). WebbPSF has most recently been tested using pysynphot 0.9.5 but is known to work well with earlier versions as well.

Pysynphot is now also available from PyPI:

%  pip install pysynphot

If this is your initial installation of pysynphot you need to install the CDBS files. See the pysynphot installation guide. The necessary files are available from https://trac6.assembla.com/astrolib; follow the download links for “throughput files” and “model spectra”. If you already have CDBS installed, then you’re all set and can skip this step.