Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated for ETC 3.2

Table of Contents

For Pandeia Engine

...

v3.

...

0/v3.1

...

Table of Contents

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.6, type
Code Block
languagebash
conda create -n pandeia stsci numpy scipy=1.1 astropy=2 photutils pysynphot setuptools python=3.6

from a terminal with access to the conda environment.

/v3.2

Python Requirements:

RequiredRecommended

python 3.8+

3.11.3

numpy 1.17+

1.23.5

scipy

1.10.1

astropy 5+

5.2.2
photutils1.7.0
synphot 1.0+1.2.0
stsynphot 1.0+1.2.0
six1.16.0
setuptools67.7.0

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

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

Code Block
languagebash
pip install pandeia.engine==1.5.1

...

3.2

or for Roman:

Code Block
languagebash
pip install 

...

pandeia.engine==

...

3.1
Warning
We highly recommend installing into a fresh python environment, such as ones provided by the Anaconda Python distribution, to avoid problems. If you experience issues after installing the Pandeia Engine, consider starting again with a fresh python installation and a clean new set of data files.

Then set up the data files.

...

In order to function, the Pandeia Engine requires one * set of reference data (containing instrument definitions):

Download and untar the files to a suitable location.

Environment variable: $pandeia_refdata must point to the location of the top of the data file tree (the directory containing the VERSION_PSF file)

...

Note
titleInstalling both data packages

You CAN untar both sets of files to the same location

...

and run calculations for Webb and Roman. The sole difference between the packages are the jwst/ and roman/ directories (and the VERSION_PSF file, to reflect that Roman PSFs were regenerated with WebbPSF 1.0, instead of WebbPSF 1.1). You can either untar the second telescope on top of the first one and overwrite any files when prompted, or copy just the second telescope's directory into the $pandeia_refdata location.


Recommended

...

Data

Once untarred, the files will produce a directory tree of grp/hstredcat/cdbstrds. The pandeia.engine uses the contents of the cdbs trds directory.

Environment variable: $PYSYN_CDBS must point to the cdbs trds directory (NOT grp)

Verify Installation

...

If properly installed and configured, it should show the refdata version and synphot data directory.

Requirements

...

python 2.7+

...

numpy 1.13.3+

...

scipy >1.4

...

astropy 2--3

...

, like this:

Code Block
Pandeia Engine version:  3.2
Pandeia RefData version:  3.2
Pysynphot Data:  /your/data/directory/synphot

or for Roman:

Code Block
Pandeia Engine version:  3.1
Pandeia RefData version:  3.1
Pysynphot Data:  /your/data/directory/synphot
Warning

pandeia.engine v1.5.1 is not compatible with scipy 1.4+ or astropy 4+

pandeia.engine v1.5.1 is the final version compatible with Python 2.7

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 and 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/pysynphotsynphot

Code Block
languagebash
titleInstallation script
linenumberstrue
conda config --add channels http://ssb.stsci.edu/astroconda
conda create -n pandeia stsci numpy scipy=1.1 astropy=2 python=3.6
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/pysynphotsynphot
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.1

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.