Python:
Python 2.6 or higher is required. Python 2.7 is required for the GUI (see below) and strongly recommended overall. WebbPSF is not yet Python 3 compatible.
Python modules:
Beyond the usual numpy/scipy/matplotlib core modules, the following are required:
These are optional but highly recommended:
Additional requirement for the GUI:
ttk is not included by default on some installations of Python, for instance Mac OS 10.6’s default of Python 2.6. You may wish to either upgrade to a more current Python, or else compile and install ttk for your platform. WebbPSF was developed using Python 2.7, which includes ttk by default, but it ought to work fine on any installations of Python 2.5 or 2.6 provided ttk is available. Alternatively, you can just skip using the GUI; the optical modeling classes themselves have no dependency on these widgets.
As of version 0.2.8, WebbPSF and its underlying optical library poppy are both installable from the Python Package Index via the standard toolchain using pip or easy_install.
Invoke pip in the usual manner:
$ pip install webbpsf
[... progress report ...]
Successfully installed webbpsf
You should now be able to do import webbpsf in a Python session.
Future versions may be installed with pip install --upgrade webbpsf when they become available.
However, this installs only the program code. You still must download and install the data files, as described below.
If you do not wish to use PYPI, or do not have pip or easy_install available on your system, you can just install the source file directly:
Download the following file: webbpsf-0.2.7.tar.gz
Untar webbpsf-0.6.x.tar.gz into a temporary working directory.
Run python setup.py install in that directory. This will install webbpsf into your Python path.
If you lack the filesystem permissions to write into the system python directory (for instance, on a machine you don’t have root on), you can do python setup.py install --user to install locally in your home directory.
You should now be able to do import webbpsf in a Python session.
As of version 0.2.8, the webbpsf source code repository is hosted at GitHub: webbpsf, as is the repository for poppy. Users may clone, fork, and pull diffs in the usual manner. Pull requests with code enhancements welcomed!
Pysynphot is an optional dependency, but is highly recommended.
To install or update pysynphot, do the following. (See also http://stsdas.stsci.edu/pysynphot/ and https://trac6.assembla.com/astrolib). If you already have pysynphot installed, it will probably work fine without this update, but computations may be slower if you have a version earlier than 0.8. WebbPSF has most recently been tested using pysynphot v 0.8.3
WebbPSF includes its own normalized copies of the new JWST instrumental throughputs from the development CDBS at STScI. If you have JWST throughput files available in your $PYSYN_CDBS directory (likely true only for internal users at STScI), those will be used in preference to the WebbPSF internal files, but this is not required.
Webbpsf is installed centrally on the WITServ computers for use by all members of the Webb instrument teams.
The directory /witserv/data10/software contains shared software tools, currently a handful of Python modules, WebbPSF, and a copy of CDBS.
The file /witserv/data10/software/README.txt gives a little bit of documentation, but briefly, it should be enough to add the line:
source /witserv/data10/software/setup.tcsh
to your shell startup files on witserv* (assuming you’re using tcsh), and then you should be able to run webbpsfgui from the command line, or start a python session and import webbpsf.
Prerelease access to updated versions of the CDBS files may be available; contact Marshall if interested.