Versions Compared

Key

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

...

  • "scalar": 0-dimensional extracted values from the extraction aperture, at the wavelength of interest (if a spectroscopic calculation)
  • "1d": 1-dimensional spectral outputs (single-valued, if the calculation is an imaging calculation)
  • "2d": 2-dimensional detector images
  • "3d": 3-dimensional flux cubes of the input scene, created from the scene definition. For IFU modes only, also 3-dimensional reconstructed data cube of the output fluxes.
  • "input": A complete copy of the input dictionary
  • "information": The configured exposure properties of the calculation
  • "warnings": all warnings produced by the Engine
  • "transform": WCS information about the 2D output products.
  • "debugarrays": (optional)

In addition, if the code pandeia.engine.perform_calculation() is run with the "as_fits" keyword set to True, the 1d, 2d, and 3d output dictionaries will be formatted as FITS HDULists.

The scalar outputs are a superset of the values the Webapp produces in the Results tab.

The following code block will (given an result dictionary named 'result') print out results.

Code Block
languagepy
titleExample script to pretty-print the scalar results and warnings
# print the scalar products with the correct units.
print("------------------\n     RESULTS    \n------------------")
for x in sorted(result["scalar"]):
    if isinstance(result["scalar"][x],float):
        basename = "{:20}: {:>10.3f}"
    else:
        basename = "{:20}: {}"

    if "time" in x:
        basename += " sec"
    elif "size" in x or "offset" in x:
        basename += " arcsec"
    elif "area" in x:  # checking this before background means the
                       # background_area will be given the correct units.
        basename += " pixel^2"
    elif "wavelength" in x:
        basename += " microns"
    elif ((("extracted" in x) or ("sky" in x)) or ("total" in x) or ("brightest" in x)) and ("integrations") not in x:
        basename += " e-/sec"
    elif "background" in x:
        basename += " MJy/sr"
    elif "cr_ramp_rate" in x:
        basename += " events/integration/pixel"
    else:
        pass
    print(basename.format(x,result["scalar"][x]))

if len(result['warnings']) > 0:
    print("----------------\n  WARNINGS  \n----------------")
    for x in result['warnings']:
        print("{:20}: {}".format(x,result['warnings'][x]))
print("------------------")


Full API

Complete API documentation can be found in this file:

...