Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Installation no longer requires Astroconda

...

Installing the Pandeia Engine requires a python environment with the dependencies listed above, a set of telescope-specific datafiles, and an optional (but highly recommended) second set of data files for additional spectral manipulation capabilities.

Code

We recommend using the Anaconda python distribution.

  1. Follow its installation instructions to set up a new environment if you do not already have one.
  2. Once installed, from a terminal with access to the conda environment, type "conda config --add channels http://ssb.stsci.edu/astroconda" to install the Astroconda channel.
  3. Create an AstroConda environment with the STScI package installed. For example, to create an environment named "pandeia" working under python 3.7, type
Code Block
languagebash
conda create -n pandeia stsci synphot stsynphot python=3.7

from a terminal with access to the conda environment.

4. Then, install the engine itself:The engine can be installed with

Code Block
languagebash
pip install pandeia.engine==1.5.2

It should also be possible to install the Pandeia Engine and all its dependencies by simply running "pip install pandeia.engine==1.5.2" but this is not recommended and users are likely to run into more issues if it is installed this wayWe recommend installing into a fresh python environment, such as ones provided by the Anaconda Python distribution, to avoid problems.

Then set up the data files.

...

Helper Script

The following script (which can also be added to your .bashrc or .bash_profile file) assumes you are operating in a terminal BASH shell where a conda python installation has been installed in $HOME/anaconda and has been activated, that you've installed the pandeia refdata in ${HOME}/data/pandeia, and the cdbs folder from the additional dataset moved and renamed to ${HOME}/data/synphot

Code Block
languagebash
titleInstallation script
linenumberstrue
conda config --add channels http://ssb.stsci.edu/astroconda
conda create -n pandeia stsci synphot stsynphot python=3.7
mkdir -p ~/anaconda/envs/pandeia/etc/conda/activate.d
cat >>~/anaconda/envs/pandeia/etc/conda/activate.d/env_vars.sh <<EOF
#!/bin/sh
export PYSYN_CDBS=${HOME}/data/synphot
export pandeia_refdata=${HOME}/data/pandeia
EOF
mkdir -p ~/anaconda/envs/pandeia/etc/conda/deactivate.d
cat >>~/anaconda/envs/pandeia/etc/conda/deactivate.d/env_vars.sh <<EOF
#!/bin/sh
unset PYSYN_CDBS
unset pandeia_refdata
EOF
conda activate pandeia
pip install pandeia.engine==1.5.2

This creates a pandeia environment in an already-existing conda installation (line 2) and installs the pandeia.engine (line 16), and sets up two scripts (line 4, line 10) to automatically set and unset the required environment variables every time you activate and deactivate the pandeia environment.

Once in place, "source"ing this file will set up the pandeia environmentOnce this is done, "conda activate pandeia" and "conda deactivate pandeia" should perform all of the setup required.