Pandeia Tutorials
This article presents a simple example demonstrating how to use Pandeia for Roman to compute signal-to-noise ratios. A more extensive collection of tutorials and examples, provided as Python Jupyter notebooks, is available through the Roman Research Nexus (RRN). Additional documentation, tutorials, and example workflows can also be found on the project’s Github page, as well as in the Pandeia for JWST documentation on JDox, which includes detailed descriptions of all supported keywords and pre-configured options.
This documentation is written for Pandeia version R2026.1 (released on January 21, 2026).
Prior to trying the example below, users should consult the Overview of Pandeia article for information on how to install Pandeia and the necessary supporting data files, as well as for configuration information for Pandeia simulations. All calculations in this article were performed using Pandeia and reference data. This documentation is written for Pandeia version R2026.1 (released on January 21, 2026).
Below is a single example of computing the Signal-to-Noise Ratio. This is one of the many Pandeia examples that are in the the Roman Research Nexus (RRN). In the dedicated Pandeia notebook, users will find a list of the following topics:
- Calculating Magnitude and Optimizing Exposures for Roman WFI Simulations: calculate the expected SNR for a point source with a flat spectral distribution (default target) normalized to 25 AB magnitudes.
- Modifying the Spectral Energy Distribution: calculate the SNR for an A0V star (Phoenix model) of magnitude 25 AB, observed in the F129 band, with 3 exposures of the default MA table ("im_135_8").
- Observing NGC2506-G31 with Roman WFI: see if Roman can observe NGC2506-G31, a G1V standard star that is used as a cross-mission calibration standard for both JWST and HST observations, and with what setup.
- Modifying the Background: show how to set up the imaging observation and change the pre-computed background and level to
hltdsandmedium
Example: Computing the Signal-to-Noise Ratio
Running the code below will generate output in the form of a dictionary that contains all of the information from the Pandeia Engine Report. This is largely the standard way of running Pandeia where the properties of the instrumental set up and astronomical scene are specified.
Description of Code Snippet
The configuration below uses the default point source normalized to an AB magnitude of 25, the WFI multi-accumulation (MA) table "im_135_8" with no truncation (135 seconds of science exposure time), and the F129 imaging filter. The WFI MultiAccum (MA) Tables article in the Observing with the WFI section provides and overview of MA tables in Roman at this time. See the article Overview of Pandeia for more information.
Python Implementation
from pandeia.engine.perform_calculation import perform_calculation
from pandeia.engine.calc_utils import build_default_calc
# Get Default Parameters
calc = build_default_calc('roman', 'wfi', 'imaging')
# Set the global variable for the filter name (change to any valid filter)
FILTER = 'f129'
# Set the MA table to im_135_8
calc['configuration']['detector']['ma_table_name'] = 'im_135_8'
# Modify defaults to simulate a 25th AB magnitude source
MAG = 25
calc['scene'][0]['spectrum']['normalization']['norm_flux'] = MAG
calc['scene'][0]['spectrum']['normalization']['norm_fluxunit'] = 'abmag'
# Set number of exposures and filter
NEXP = 3
calc['configuration']['detector']['nexp'] = NEXP
calc['configuration']['instrument']['filter'] = FILTER
# Run calculation and return signal-to-noise ratio
report = perform_calculation(calc)
snr = report['scalar']['sn']
print(f'Estimated S/N: {snr:.2f}')
Potential Warning Messages from Running the Code Block
This step may generate a WARNING from synphot that the spectrum is extrapolated, which can be ignored.
Running
Pandeia
for Roman will likely return a warning such as: if np.log(abs(val)) < -1*precision and val != 0.0. This is related to a JWST-specific test for float precision, and can be ignored in this case.
Result from the Example
This calculation should output an estimated signal-to-noise of 11.66 .
References
- "Pandeia: a multi-mission exposure time calculator for JWST and WFIRST" Pontoppidan et al. 2016, SPIE, 9910, 16
- Roman Research Nexus: https://roman.science.stsci.edu/hub/
- Pandeia tutorials on Github: https://github.com/spacetelescope/pandeia-tutorials
- The JWST Documentation (JDox) website.
- Pandeia tutorials on JDox: https://jwst-docs.stsci.edu/jwst-exposure-time-calculator-overview/jwst-etc-pandeia-engine-tutorial
For additional questions not answered in this article, please contact the Roman Help Desk.
