1. Overview

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

API Compatibility

The Pandeia Engine API may change at any time. The following information and examples are for Pandeia Engine 2.0.x only, and are not guaranteed to be accurate or functional for previous or future releases. Updates (and information about planned pending API changes) can be found on the Roman - Pandeia Engine News page.


The engine itself can be run with the command

Pandeia Engine Inputs
from pandeia.engine import perform_calculation

result = perform_calculation.perform_calculation(calculation)

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  can be created with function build_default_calc(), which creates a default dictionary, and then edited:

Create a default calculation
from pandeia.engine import calc_utils

calculation = calc_utils.build_default_calc("roman","wfi","imaging")

The command above produces a WFI Imaging calculation similar to the example below.

API Default

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

2. Full API

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

3. 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.

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

Roman WFI Imaging
{
    "background": "minzodi",
    "background_level": "benchmark",
    "calculation": {
        "effects": {
            "saturation": null
        },
        "noise": {
            "crs": null,
            "ffnoise": null,
            "scatter": null
        }
    },
    "configuration": {
        "detector": {
            "nexp": 1,
            "ngroup": 6,
            "nint": 1,
            "readout_pattern": "medium8",
            "subarray": "imaging"
        },
        "instrument": {
            "aperture": "imaging",
            "disperser": null,
            "filter": "f062",
            "instrument": "wfi",
            "mode": "imaging"
        }
    },
    "scene": [
        {
            "position": {
                "orientation": 0.0,
                "x_offset": 0.0,
                "y_offset": 0.0
            },
            "shape": {
                "geometry": "point"
            },
            "spectrum": {
                "extinction": {
                    "bandpass": "j",
                    "law": "mw_rv_31",
                    "unit": "mag",
                    "value": 0.0
                },
                "lines": [],
                "name": "generic source",
                "normalization": {
                    "norm_flux": 0.001,
                    "norm_fluxunit": "mjy",
                    "norm_wave": 2.0,
                    "norm_waveunit": "microns",
                    "type": "at_lambda"
                },
                "redshift": 0.0,
                "sed": {
                    "sed_type": "flat",
                    "unit": "fnu",
                    "z": 0.0
                }
            }
        }
    ],
    "strategy": {
        "aperture_size": 0.2,
        "background_subtraction": true,
        "display_string": "Imaging Aperture Photometry",
        "method": "imagingapphot",
        "sky_annulus": [
            0.4,
            0.6
        ],
        "target_source": "1",
        "target_type": "coords",
        "target_xy": [
            0.0,
            0.0
        ],
        "units": "arcsec"
    }
}
  • No labels