It is highly recommended that you begin by installing AstroConda (with Python 2.7) and then follow these installation instructions to install the Pandeia engine and the required reference files. Once Pandeia is set up, the following command will install this package:
pip install git+git://github.com/kvangorkom/pandeia-coronagraphy.git
Alternatively, follow these step-by-step instructions:
- If you don't already have Anaconda or Miniconda installed, download and install the Python 2.7 version here.
- Add the AstroConda channel to your Conda channels:
conda config --add channels http://ssb.stsci.edu/astroconda
- Create a conda environment with the STScI software stack:
conda create -n astroconda stsci python=2.7 numpy=1.11
- Activate this environment with
source activate astroconda
. (NB: Conda is only compatible with a BASH shell.) - Install the Pandeia engine with this command:
pip install pandeia.engine
. (You should already have the Pysynphot package installed at this point. If you don't, install it withpip install pysypnphot
. You can generate a list of installed packages withconda list
.) - Download and unzip the Pandeia data files and the PySynphot data files (ftp://archive.stsci.edu/pub/hst/pysynphot/). See Installing PySynphot Data Files for more detail on setting up the PySynphot data files.
- Add the following lines to your ~/.bashrc file (and
source
it after modifying):
export pandeia_refdata=/path/to/pandeia/data/directory export PYSYN_CDBS=/path/to/cdbs/directory
- Finally, install the pandeia-coronagraphy package:
pip install git+git://github.com/kvangorkom/pandeia-coronagraphy.git
- (Optional) Install WebbPSF with
conda install webbpsf
. This is required only if you are interested in using higher-fidelity PSFs in your calculations; otherwise, the Pandeia engine relies on interpolations of a bundled library of precomputed PSFs. This functionality is documented here and here.
The entire PySynphot data file collection is quite large, and the PySynphot package expects a particular directory structure. If you're on the STScI network, you can skip this download and point the PYSYN_CDBS
environment variable to the CDBS directory on central store instead (/grp/hst/cdbs
). Otherwise, two (hopefully) helpful tips for installing the reference files locally:
- Rather than download every package, you may be able to get away with downloading only the Pysynphot Phoenix Models (ftp://archive.stsci.edu/pub/hst/pysynphot/synphot5.tar.gz).
- The .tar files will unpack to a directory structure that looks something like
grp/hst/cdbs/etc
. You'll need to consolidate the multiple structures into a single directory structure undercdbs
. When setting up your environment variables in Step 7 (under Installation), you'll want to point to thecdbs
directory directly.
Once installation is complete, take a look at the provided Jupyter notebooks for examples of constructing a scene, setting instrument properties, running the Pandeia engine, and performing some basic post-processing.
You can find a more complete description of the engine inputs here and outputs here.
Example input templates for the Pandeia engine are provided here.