Pandeia for Roman

Pandeia is the core Exposure Time Calculator (ETC) engine for the Roman Space Telescope Wide Field Instrument (WFI). It can generate small but complex astronomical scenes and compute the signal-to-noise for various observing strategies.





Pandeia Description

Pandeia is the backend software used for the ETC system developed for the James Webb Space Telescope (JWST) and the Nancy Grace Roman Space Telescope (Pontoppidan et al. 2016). It is based on a Python engine that calculates three-dimensional data cubes from a library of point spread functions (PSFs) pre-computed with WebbPSF . These cubes are then projected onto a detector plane given an instrument configuration, and a 2D signal-to-noise map is extracted. Pandeia appropriately handles realistic PSFs, multi-accumulation (MA) detector readouts (stored in MA Tables), correlated detector readnoise, dithering, and multiple photometric and spectroscopic extraction strategies. Pandeia also includes support for a variety of observing modes and has a highly modular, data-driven design that allows for easy extensibility to other instruments and telescopes.


Pandeia is designed to guide the user towards the best exposure parameters for a given science case and observing setup. The software can create a simulated scene and compute the signal-to-noise achievable given the observational setup. The user can input both point sources and extended sources where sources can be modeled with the following shapes: point, flat, gaussian2d, sersic, and power law. The Figure of Example Astronomical Scenes from Pandeia provides an example of a simulation aimed at estimating the signal-to-noise achievable in the detection of a supernova given its location in the host galaxy. The astronomical scene contains both a point source and an extended source. 

Note that Pandeia is not designed to create fields of view wider than 25 arcseconds on a side nor multi-detector images. For the simulation of larger field of views or multi-detector images, we refer the readers to our Space Telescope Imaging Product Simulator or Roman I-Sim - The Roman Image Simulator software.

Figure of Example Astronomical Scenes from Pandeia 



An example of an astronomical scene created by Pandeia . In this example, a high-redshift galaxy, modeled using a Sérsic profile, and a superimposed supernova, modeled as a point source, are simulated in each of the eight imaging filters for the Wide Field Instrument (WFI) (from top row from left: F062, F087, F106, F129 and bottom row from left: F146, F158, F184, F213). A description of the optical elements for Roman is given in the WFI Optical Elements article in the WFI Imaging Mode User Guide.



Current Software Version

This documentation is written for  Pandeia version 2024.12 (released on December 11, 2024). 

How to Install Pandeia for Roman

It is recommended to set up a new conda environment for Pandeia to avoid any version conflicts with other packages already installed. To create a new conda environment:

Conda Env for Pandeia
$ conda env create -n your_conda_env_name_for_pandeia
$ conda activate your_conda_env_name_for_pandeia


To run Pandeia, you need to (1) install the Pandeia engine itself and (2) setup the reference data directory for the engine. 

Installing the Pandeia Engine

The Pandeia engine can be installed via the Python Package Index (pip):

Pip Install Pandeia
pip install pandeia.engine==2024.12

Installing the Pandeia Reference Data

To properly setup the  Pandeia directory, you need to download files from the Pandeia Engine Installation article. From this link, ensure the two following files are also downloaded:

  1. Nancy Grace Roman Space Telescope
  2. The base Synphot reference atlas

There are also optional Synphot data that enable users to utilize various classes of template spectra. A detailed explanation on the optional data can be found from the Pandeia Engine Installation article.

After downloading the reference files, you need to set the environment variable for Pandeia ( pandeia_refdata ) and Synphot ( PYSYN_CDBS ) in your bash profile so that the Pandeia engine knows where to look for the necessary data. pandeia_refdata must point to the location of the top of the data file tree where the VERSION_PSF file is located. This would look something like the following:


Bash Setup for Pandeia
export pandeia_refdata="/path/to/pandeia/installation/pandeia/data/pandeia_data-CURRENT_VERSION-roman-engine/"
export PYSYN_CDBS="/path/to/synphot/data/"

Once the engine is installed and the reference directory is setup, you are ready to use Pandeia . General installation instructions for Pandeia can be found in the Pandeia Engine Installation article; similarly, installation instructions for Synphot can be found in the Synphot for Roman article. 

Troubleshooting with Pandeia

Below we provide a simple check to make sure that the installation is done properly:

Pandeia Version Check
import pandeia.engine
pandeia.engine.pandeia_version()


If the installation was successful, the output should look like the following (version may be different):

Pandeia Version Check Output
Pandeia Engine version:  version_you_installed (e.g. 2024.9)
Pandeia RefData version:  same_version_as_the_engine (e.g. 2024.9)
Pysynphot Data:  /your/data/directory/for/synphot/grp/redcat/trds/


Both the Pandeia Engine version and the Pandeia RefData version must be the same.

If you encounter an error with perform_calculation()  that says

ValueError: could not convert string to float: 'imaging-f062-f087-f106-f129-f146-f158'

it is likely that there are hidden files (file names starting with '.') in the /roman/wfi/psfs directory. You need to delete the hidden files and re-run the installation instructions.


Documentation

Pandeia for Roman

 The contents of the user guide for Pandeia are as follows:

Pandeia for JWST Documentation

Pandeia has been thoroughly documented for use with JWST and Roman users may find this documentation useful. The relevant JWST documents can be found here:




For additional questions not answered in this article, please contact the Roman Help Desk at STScI.




References

  1. The JWST Documentation (JDox) website.
  2. "Pandeia: a multi-mission exposure time calculator for JWST and WFIRST", Pontoppidan et al. 2016




Latest Update

 

Updated in Jan 2024 RDox publication.
Publication

 

Initial publication of the article.