Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Pandeia Engine is a Python module (compatible with Python 3.6 and later) that functions as the computational engine of the JWST ETC and Roman ETC. It can be imported and run as a standalone module.

...

where "calculation" is a hierarchical input dictionary describing a scene of sources, an instrument setup, and an extraction strategy, and "result" is a hierarchical output dictionary.

Such input dictionaries are available in JWST Webapp download files (as a JSON-formatted file named input.json, suitable for reading in with the built-in Python 'json' module), or default versions can  can be created with the function build_default_calc(), which creates a default dictionary, and then edited:

Code Block
languagepy
titleCreate a default calculation
from pandeia.engine import calc_utils

calculation = calc_utils.build_default_calc("jwstroman","nircamwfi","sw_imaging")

The command above produces the NIRCam SW WFI Imaging calculation below.

Warning
titleAPI Default

In the event that there is a typo in the mode name ("sw_imaging", above), the function will substitute the default mode for that instrument.

...

The full API documentation, with all possible options and combinations for any instrument, can be found in this file.

Examples

The following calculation defines a JWST NIRCam observation in SW Imaging mode using the full subarray and rapid readout pattern and f070w filter, for a flat-spectrum (in fnu) point source normalized to 0.001 mJy, intended to be observed with a 0.2" aperture. Note that it specifies a background precomputed for a specific date and celestial location; actual user-configured backgrounds are available in the JWST web ETC (and can be downloaded from there)

(click here to download as a JSON file: sw_f070w_rapid_full.jeng)

...

languagejs
titleJWST NIRCam SW Imaging
collapsetrue

...

Example

The following dictionary defines a Roman WFI Imaging observation with the F062 filter, imaging subarray (for a 3.04s read time), medium8 readout pattern, and 6 groups; for a 0.001 mJy flat-spectrum point source (in fnu) intended to be observed with a 0.2" aperture.

...