Pandeia Configuration Dictionaries

Descriptions of keywords in the JWST Pandeia configuration dictionary, valid keyword values (when applicable), and examples of adjusting Pandeia configuration dictionaries to produce particular outputs, are provided in this article.

On this page

Pandeia configuration dictionaries are Python dictionaries, and may be created or edited as such. While it is possible to create a Pandeia configuration dictionary from scratch, it is generally preferable to modify an existing dictionary.



Creating Pandeia configuration dictionaries

Pandeia configuration dictionaries may be created entirely from scratch, imported from JSON files, or created by using Pandeia's build_default_calc function. Instructions on importing pandeia configuration information from JSON files can be found in the Pandeia Quickstart article.



Configuration dictionary structure

The Pandeia configuration dictionary has the following structure:

  • calculation: optional dictionary, contains flags to turn on and off the various calculation parameters. If set to True, the effect is on; if set to False, the effect is off; if set to None, the effect is set to the default.

    • noise: dictionary, contains flags to turn on and off the available noise parameters

      • crs: boolean/None, flag to turn on and off the cosmic ray contribution to the noise value.

      • ffnoise: boolean/None, flag to turn on and off the flat field contribution to the noise

    • effects: dictionary, contains flags to turn on and off detector and sky effects

      • saturation: boolean/None, flag to turn on and off checks for saturation, and the effects of saturation and signal to noise

  • configuration: dictionary, contains parameters related to the scene being observed and the instrument configuration.

    • scene_size: floating point value, the default size of the scene in arcseconds (the scene will always be a square, with size values referring to the length of a single side)

    • max_scene_size: floating point value, the maximum size to which the scene can grow in order to include all sources.

    • dynamic_scene: boolean, whether the scene should dynamically grow to include all sources (up to a maximum of max_scene_size)

    • instrument: dictionary, contains the instrument configuration parameters

      • aperture: string, the aperture to be used.

      • disperser: string, the disperser to be used (if any)

      • filter: string, the filter to be used (if any)

      • instrument: string, the instrument to be used (if using build_default_calc, the value provided for the instrument will be set here)

      • mode: string, the mode to be used (if using build_default_calc, the value provided for mode will be set here)

    • detector: dictionary, contains the detector configuration

      • ngroup: integer, the number of groups in each ramp

      • nint: integer, the number of ramps in each exposure

      • nexp: integer, the number of exposures

      • subarray: string, which subset of the detector to use (or 'full' to use the entire detector)

      • readout_pattern: string, which readout pattern to use

  • strategy: dictionary, what observing strategy to use. The exact contents vary by strategy, but a typical strategy contains:

    • aperture_size: floating point, the size of the exposure aperture

    • sky_annulus: list of 2 floating point values. The inner and outer radius of the annulus in which the sky count rate will be measured

    • units: string, the units of the aperture size and sky annulus

    • background_subtraction: boolean, flag to turn realistic background subtraction on and off. If on, the sky background is measured through the sky annulus or similar special region. If off, the sky background is set to the estimated value through the aperture.

    • target_type: string, optional: the type of target being observed.

    • target_source: integer, which source to include in the observation. Only checked if target_type is 'source'.

    • display_string: string, for information, the name of the observing method being used.

    • method: string, the internal function name of the observing method being used.

    • target_xy: list of 2 floating point values: the pixel location of the target.

  • background: the background value. Either a string with value none, minzodi, or ecliptic, or a list of 2 arrays containing the wavelength (μm) and background flux (MJy/sr).

  • background_level: the background level. A string with the value low, medium, or high; if background is minzodi, the value benchmark is also allowed.

  • scene: list of dictionaries, one for each source in the scene. Each source dictionary includes:

    • position: dictionary, containing information about the source position. By default, all parameters should always be present in the position dictionary, but Pandeia will interpret any missing parameter as having the value 0.

      • position_parameters: list of strings, one for each parameter present. Possible parameters are:

        • x_offset: float, the offset of the source in the x direction from the center of the scene, in arcseconds

        • y_offset: float, the offset of the source in the y direction from the center of the scene, in arcseconds

        • orientation: float, the angle of the source with respect to the positive scene x axis, in degrees

      • Each parameter named in the position parameters list must be present in the position dictionary as a separate key of the defined type.

    • shape: dictionary, containing information about the source shape

      • geometry: string, one of point, flat, gaussian2d, sersic, sersic_scale, or power. Different shapes require different shape parameters, as follows:

        • point: Does not require any other parameters. Parameters present will be ignored.

        • flat: Requires the parameters major and minor to be present.

        • gaussian2d: Requires the parameters major and minor to be present.

        • sersic: Requires the parameters major, minor, and sersic_index to be present.

        • sersic_scale: Requires the parameters major, minor, and sersic_index to be present.
        • power: Requires the parameters r_core and power_index to be present.
      • shape_parameters: list of strings, one for each parameter present. Possible parameters are:

        • major: float, length of the major axis, in arcseconds.

        • minor: float, length of the minor axis, in arcseconds.

        • sersic_index: float, index of the sersic profile. An index of 1.0 yields an exponential profile, 0.5 a gaussian profile, and 4.0 a de Vaucouleurs profile.

        • power_index: float, index of the power law spatial profile.
      • norm_method: string, defines where the profile is to be normalized. Possible values are integ_infinity, surf_center, and surf_scale. (For flat profiles, "surf_scale" is not valid; for power law profiles, neither "surf_scale" nor "integ_infinity" are valid.)
      • surf_area_units: string, defines the area unit of the surface brightness normalization. Possible values are null (for integ_infinity only), arcsec^2, or sr.
      • Each parameter named in the shape parameters list must be present in the shape dictionary as a separate key of the defined type.

    • spectrum: dictionary, containing information about the source SED.

      • name: string, name of the source. Provided for information, not referenced by the engine during the calculation.

      • spectrum_parameters: list of strings, one for each parameter present. Possible parameters are:

        • redshift: float, redshift of the source. Redshift is applied after the spectrum has been created, but before extinction has been added, before continuum normalization, and before any emission lines have been added.

        • lines: list of dictionaries, giving information on each line to be added to the SED. NOTE that redshift, extinction, and normalization will not be applied to any lines specified here. Each line dictionary has the following parameters:

          • id: string or integer. Identifier given to the line. Not used internally.

          • name: string. Name of the line. Not used internally.

          • emission_or_absorption: string, line type. Currently, all lines are treated as emission lines.

          • center: float, central wavelength of the line, in microns.

          • width: float, FWHM of the line in km/s.

          • strength: float, line strength, definition depends on line type:

            • Emission Lines: line strength in erg/cm^2/s

            • Absorption Lines: central optical depth

          • profile: string, line profile, currently the only supported value is gaussian

        • sed: dictionary, provides the parameters of the source continuum SED. Contains the following keys:

          • sed_type: string, defines the type of SED. Possible values are no_continuum, flat, powerlaw, blackbody, phoenix, hst_calspec, brown2014, brown2019, comp_qso, cool_dwarfs, pne, novae, stellar_pop, sun_planets, swire, and input. Depending on the SED type chosen, other parameters may be needed.

            • no_continuum: takes no parameters

            • flat: takes 'unit'

            • powerlaw: takes 'unit' and 'index'

            • blackbody: takes 'temp'

            • phoenix: takes 'key' (if perform_calculation is run with webapp=True) or takes 'teff', 'log_g', and 'metallicity' (if perform_calculation is run with webapp=False)

            • brown2014, brown2019, comp_qso, cool_dwarfs, hst_calspec, pne, novae, stellar_pop, sun_planets, swire: takes 'key', which loads a specific spectrum.

            • input: takes spectrum, a list of wavelength and flux arrays.

          • unit: string, either fnu or flam. Used by flat and power law spectra.

          • index: float, exponent of the power law. Used by power law spectra.

          • temp: float, temperature of the blackbody. Used by blackbody spectra.

          • key: string, the type of source to model. Used by phoenix, hst_calspec, and galaxies spectra. Valid values are shown below in the appendix.

          • t_eff: float, effective temperature of the phoenix model star, in K. Allowed range is 2000 to 70,000.

          • log_g: float, logarithm of the surface gravity of the phoenix model star, in cgs units. Allowed range is 0.0 to 5.5.

          • metallicity: float, logarithm of the metallicity of the phoenix model star, relative to solar metallicity. Allowed range is -4.0 to 0.5.

          • spectrum: list of 2 arrays, or ndarray. The wavelength (μm) and flux (mJy) arrays of the SED to use. In an ndarray, wavelength is the 0th index, and flux the 1st index.

        • normalization: dictionary defining the source brightness. Contains the following keys:

          • type: string, defines the type of normalization. Possible values are at_lambda, hst, jwst, photsys, and none. Depending on the normalization type chosen, other parameters may be needed.

            • none takes no parameters.

            • hst takes bandpass, norm_flux, and norm_fluxunit

            • jwst takes bandpass, norm_flux, and norm_fluxunit

            • photsys takes bandpass, norm_flux, and norm_fluxunit

            • at_lambda takes norm_wave, norm_waveunit, norm_flux, and norm_fluxunit

          • norm_wave: float, reference wavelength in units of norm_waveunit, used by at_lambda.

          • norm_waveunit: string, specifies the wavelength units used for normalization, used by at_lambda. Available values are m, nm, um (micron), mm, micron, microns, angstrom

          • norm_flux: float, reference flux value in units of norm_fluxunit, used by all normalization methods other than none.

          • norm_fluxunit: string, specifies the flux units used for normalization. Used by all methods other than none. Available values are flam, fnu, vegamag, abmag, mjy, ujy (micro-Jansky), njy, jy

          • bandpass: string, specifies the bandpass for hst, jwst, and photsys normalizations. Possible values are shown in the appendix

        • extinction: dictionary defining the wavelength-dependent extinction between the source and the observer. Contains the following keys:

          • law: string, the extinction law being used. Values include 7 models from Weingartner & Draine (2001) (3 generic Milky Way models: mw_rv_31, mw_rv_40, mw_rv_55; 2 LMC models: lmc_avg and lmc_2; one SMC model: smc_bar, and the hd210121 model), and one Chapman (2009) model: chapman09.

          • value: float, the extinction value, in units of unit

          • unit: string, the units of the extinction value, either nh for hydrogen column density or mag for magnitudes.

          • bandpass: the bandpass in which the extinction is measured, only used if the unit is mag.



Sample code creating a background spectrum using the JWST Background Tool (JBT)

jbt_background
# The following section is only needed if the PYSYN_CDBS environment variable is not already set.
# The PYSYN_CDBS environment variable should point to the path of the CDBS data files
import os
location_of_cdbs = "/path/to/cdbs/files"
os.environ['PYSYN_CDBS'] = location_of_cdbs
# End section

# The following section is only needed if the pandeia_refdata environment variable is not already set
# The pandeia_refdata environment variable should point to the path of the pandeia reference data
import os
location_of_pandeia_refdata = "/path/to/pandeia/refdata"
os.environ['pandeia_refdata'] = location_of_pandeia_refdata
# End section

from pandeia.engine.calc_utils import build_default_calc
from jwst_backgrounds import jbt

# The following are parameters which can easily be changed
ra = 27.5
dec = -12.7
background_primary_wavelength = 4.0 # in microns, doesn't actually matter as we want the full spectrum.
day_of_interest = 0 # the first day of visibility for the target sky co-ordinates in the current cycle
telescope = 'jwst'
instrument = 'nircam'
mode = 'sw_imaging'
configuration = build_default_calc(telescope, instrument, mode)

bg = jbt.background(ra, dec, background_primary_wavelength)
wave_array = bg.bkg_data['wave_array']
flux_array = bg.bkg_data['total_bg'][day_of_interest]
configuration['background'] = []
configuration['background'].append(wave_array)
configuration['background'].append(flux_array)

print(configuration)

Note that, in order to use the JWST Backgrounds Tool (JBT), it must be installed in your Conda environment (i.e., by typing "pip install jwst-backgrounds" at the command line). For more information on the JBT, see JWST Backgrounds Tool article.

Creating a scene with a custom galaxy spectrum and a foreground star

custom_background_scene
# The following section is only needed if the PYSYN_CDBS environment variable is not already set.
# The PYSYN_CDBS environment variable should point to the path of the CDBS data files
import os
location_of_cdbs = "/path/to/cdbs/files"
os.environ['PYSYN_CDBS'] = location_of_cdbs
# End section

# The following section is only needed if the pandeia_refdata environment variable is not already set
# The pandeia_refdata environment variable should point to the path of the pandeia reference data
import os
location_of_pandeia_refdata = "/path/to/pandeia/refdata"
os.environ['pandeia_refdata'] = location_of_pandeia_refdata
# End section

from copy import deepcopy
import synphot
from astropy import units as u
from matplotlib import pyplot as plt
from pandeia.engine.calc_utils import build_default_calc
from pandeia.engine.perform_calculation import perform_calculation

# The following are parameters which can easily be changed
telescope = 'jwst'
instrument = 'nircam'
mode = 'sw_imaging'
configuration = build_default_calc(telescope, instrument, mode)

# The following are values that can be set to anything desired.
custom_galaxy_name = 'My Background Galaxy'
custom_galaxy_spectrum_file = '/path/to/galaxy/spectrum/gal_spec.fits'
custom_galaxy_orientation = 27.1 #degrees
custom_galaxy_major_axis = 18.0
custom_galaxy_minor_axis = 2.5
custom_galaxy_sersic_index = 1.5
custom_galaxy_norm_method = 'surf_scale'
custom_galaxy_surf_area_units = 'arcsec^2'
custom_galaxy_redshift = 0.1
custom_galaxy_extinction = 0.6 # magnitudes
custom_galaxy_brightness = 19.9
custom_galaxy_bandpass = 'johnson,v'
custom_galaxy_fluxunit = 'abmag'

spec = synphot.SourceSpectrum.from_file(custom_galaxy_spectrum_file)
spec_wave = spec.waveset.to_value(u.micron)
spec_flux = spec(spec_wave, flux_unit=u.mJy)

source_gal = deepcopy(configuration['scene'][0])
source_gal['position']['orientation'] = custom_galaxy_orientation
source_gal['shape']['geometry'] = 'sersic'
source_gal['shape']['shape_parameters'] = ['major', 'minor', 'sersic_index', 'norm_method', 'surf_area_units']
source_gal['shape']['major'] = custom_galaxy_major_axis
source_gal['shape']['minor'] = custom_galaxy_minor_axis
source_gal['shape']['sersic_index'] = custom_galaxy_sersic_index
source_gal['shape']['norm_method'] = custom_galaxy_norm_method
source_gal['shape']['surf_area_units'] = custom_galaxy_surf_area_units
source_gal['spectrum']['name'] = custom_galaxy_name
source_gal['spectrum']['redshift'] = custom_galaxy_redshift
source_gal['spectrum']['extinction']['value'] = custom_galaxy_extinction
source_gal['spectrum']['sed'] = {'sed_type': 'input', 'spectrum': [spec_wave, spec_flux]}
source_gal['spectrum']['normalization'] = {}
source_gal['spectrum']['normalization']['type'] = 'photsys'
source_gal['spectrum']['normalization']['bandpass'] = custom_galaxy_bandpass
source_gal['spectrum']['normalization']['norm_flux'] = custom_galaxy_brightness
source_gal['spectrum']['normalization']['norm_fluxunit'] = custom_galaxy_fluxunit

# The following are values that can be set to anything desired
star_type = 'g2v'
star_position_x = 0.35 # arcseconds
star_position_y = -0.14 # arcseconds
star_norm_bandpass = 'johnson,v'
star_norm_flux = 22.2
star_norm_fluxunit = 'abmag'
source_star = deepcopy(configuration['scene'][0])
source_star['position']['x_offset'] = star_position_x
source_star['position']['y_offset'] = star_position_y
source_star['shape'] = {'geometry': 'point', 'shape_parameters': []}
source_star['spectrum']['name'] = 'G2V Star'
source_star['spectrum']['redshift'] = 0.
source_star['spectrum']['extinction']['value'] = 0.
source_star['spectrum']['normalization'] = {}
source_star['spectrum']['normalization']['type'] = 'photsys'
source_star['spectrum']['normalization']['bandpass'] = star_norm_bandpass
source_star['spectrum']['normalization']['norm_flux'] = star_norm_flux
source_star['spectrum']['normalization']['norm_fluxunit'] = star_norm_fluxunit
source_star['spectrum']['sed'] = {'sed_type': 'phoenix', 'key': star_type}

configuration['scene'] = [source_gal, source_star]

result = perform_calculation(configuration)

plt.imshow(result['2d']['snr'])
plt.title("SNR")
plt.colorbar()
plt.show()

If the scene above is run through Pandeia, the resulting output image will be generated, as shown in Figure 1.

Figure 1. Output image from running the code shown above through Pandeia

Creating a sample slitless spectrograph observation of a superimposed star and galaxy

sample_slitless_spectrograph
# The following section is only needed if the PYSYN_CDBS environment variable is not already set.
# The PYSYN_CDBS environment variable should point to the path of the CDBS data files
import os
location_of_cdbs = "/path/to/cdbs/files"
os.environ['PYSYN_CDBS'] = location_of_cdbs
# End section
# The following section is only needed if the pandeia_refdata environment variable is not already set
# The pandeia_refdata environment variable should point to the path of the pandeia reference data
import os
location_of_pandeia_refdata = "/path/to/pandeia/refdata"
os.environ['pandeia_refdata'] = location_of_pandeia_refdata
# End section

from copy import deepcopy
from matplotlib import pyplot as plt
from pandeia.engine.calc_utils import build_default_calc
from pandeia.engine.perform_calculation import perform_calculation

# The following are parameters which can easily be changed
telescope = 'jwst'
instrument = 'miri'
mode = 'lrsslitless'
configuration = build_default_calc(telescope, instrument, mode)

# The following are values that can be set to anything desired.
galaxy_name = 'NGC 3521-type Galaxy'
galaxy_orientation = 77.3 #degrees
galaxy_y_offset = -0.13 # arcseconds
galaxy_major_axis = 22.0 #arcseconds
galaxy_minor_axis = 4.5 #arcseconds
galaxy_sersic_index = 3.7
galaxy_norm_method = 'integ_infinity'
galaxy_surf_area_unit = None
galaxy_redshift = 0.1
galaxy_extinction = 0.3
# magnitudes
galaxy_sed = 'ngc_3521'
galaxy_brightness = -2.0
galaxy_bandpass = 'miri,imaging,f560w'
galaxy_fluxunit = 'abmag'
source_gal = deepcopy(configuration['scene'][0])
source_gal['position']['orientation'] = galaxy_orientation
source_gal['position']['y_offset'] = galaxy_y_offset
source_gal['shape']['geometry'] = 'sersic_scale'
source_gal['shape']['shape_parameters'] = ['major', 'minor', 'sersic_index', 'norm_method', 'surf_area_unit']
source_gal['shape']['major'] = galaxy_major_axis
source_gal['shape']['minor'] = galaxy_minor_axis
source_gal['shape']['sersic_index'] = galaxy_sersic_index
source_gal['shape']['norm_method'] = galaxy_norm_method
source_gal['shape']['surf_area_units'] = galaxy_surf_area_unit
source_gal['spectrum']['name'] = galaxy_name
source_gal['spectrum']['redshift'] = galaxy_redshift
source_gal['spectrum']['extinction']['value'] = galaxy_extinction
source_gal['spectrum']['sed'] = {'sed_type': 'brown2014', 'key': galaxy_sed}
source_gal['spectrum']['normalization'] = {}
source_gal['spectrum']['normalization']['type'] = 'jwst'
source_gal['spectrum']['normalization']['bandpass'] = galaxy_bandpass
source_gal['spectrum']['normalization']['norm_flux'] = galaxy_brightness
source_gal['spectrum']['normalization']['norm_fluxunit'] = galaxy_fluxunit

# The following are values that can be set to anything desired
star_type = 'f5v'
star_position_y = 0.25 # arcseconds
star_norm_bandpass = 'miri,imaging,f560w'
star_norm_flux = 18.0
star_norm_fluxunit = 'abmag'
emission_line_center = 11. #microns
emission_line_width = 1500. #km/s
emission_line_strength = 1.e-15
source_star = deepcopy(configuration['scene'][0])
source_star['position']['y_offset'] = star_position_y
source_star['shape'] = {'geometry': 'point', 'shape_parameters': []}
source_star['spectrum']['name'] = 'F5V Star'
source_star['spectrum']['redshift'] = 0.
source_star['spectrum']['extinction']['value'] = 0.
source_star['spectrum']['normalization'] = {}
source_star['spectrum']['normalization']['type'] = 'jwst'
source_star['spectrum']['normalization']['bandpass'] = star_norm_bandpass
source_star['spectrum']['normalization']['norm_flux'] = star_norm_flux
source_star['spectrum']['normalization']['norm_fluxunit'] = star_norm_fluxunit
emission_line = {}
emission_line['id'] = 0
emission_line['name'] = 'Sample Emission Line'
emission_line['emission_or_absorption'] = 'emission'
emission_line['center'] = emission_line_center
emission_line['width'] = emission_line_width
emission_line['strength'] = emission_line_strength
emission_line['profile'] = 'gaussian'
source_star['spectrum']['lines'] = [emission_line]
source_star['spectrum']['sed'] = {'sed_type': 'phoenix', 'key': star_type}

# Just the galaxy
configuration['scene'] = [source_gal]

result1 = perform_calculation(configuration)
print(result1['1d'])
plt.plot(result1['1d']['extracted_flux_plus_bg'][0],result1['1d']['extracted_flux_plus_bg'][1], label='Observation with Galaxy')

# Just the star
configuration['scene'] = [source_star]

result2 = perform_calculation(configuration)
plt.plot(result2['1d']['extracted_flux_plus_bg'][0],result2['1d']['extracted_flux_plus_bg'][1], label='Observation with Star')

# Both pieces
configuration['scene'] = [source_gal, source_star]

result3 = perform_calculation(configuration)
plt.plot(result3['1d']['extracted_flux_plus_bg'][0],result3['1d']['extracted_flux_plus_bg'][1], label='Observation with Both')

plt.legend()
plt.title("Extracted Flux plus BG")
plt.show()

Figure 2 shows a set of 3 slitless spectra created with the MIRI P750L slitless spectrograph, one of each scene source individually, and a final observation of the combined scene. Note that the 3 separate spectra result from 3 separate Pandeia observations with the same instrument and detector settings, but different source lists.

Figure 2. Three slitless spectra created with the MIRI P750L slitless spectrograph



Sample code

Creating a source galaxy with a redshifted emission line
galaxy_redshifted_emission
# The following section is only needed if the PYSYN_CDBS environment variable is not already set.
# The PYSYN_CDBS environment variable should point to the path of the CDBS data files
import os
location_of_cdbs = "/path/to/cdbs/files"
os.environ['PYSYN_CDBS'] = location_of_cdbs
# End section

# The following section is only needed if the pandeia_refdata environment variable is not already set
# The pandeia_refdata environment variable should point to the path of the pandeia reference data
import os
location_of_pandeia_refdata = "/path/to/pandeia/refdata"
os.environ['pandeia_refdata'] = location_of_pandeia_refdata
# End section
from copy import deepcopy
from pandeia.engine.calc_utils import build_default_calc
from pandeia.engine.perform_calculation import perform_calculation
from matplotlib import pyplot as plt

# The following are parameters which can easily be changed
telescope = 'jwst'
instrument = 'miri'
mode = 'imaging'

configuration = build_default_calc(telescope, instrument, mode)

# The following are values that can be set to anything desired.
galaxy_name = 'NGC 3521-type Galaxy'
galaxy_major_axis = 12.5 #arcseconds
galaxy_minor_axis = 4.0 #arcseconds
galaxy_sersic_index = 1.0
galaxy_norm_method = 'integ_infinity'
galaxy_surf_area_unit = None
galaxy_redshift = 1.5
galaxy_extinction = 0.3 # magnitudes
galaxy_sed = 'ngc_3521'
galaxy_brightness = 9.0
galaxy_bandpass = 'miri,imaging,f560w'
galaxy_fluxunit = 'abmag'
emission_line_center = 0.65628 #H alpha, microns
emission_line_width = 150. #km/s
emission_line_strength = 1.e-15

source_gal = deepcopy(configuration['scene'][0])
source_gal['shape']['geometry'] = 'sersic_scale'
source_gal['shape']['shape_parameters'] = ['major', 'minor', 'sersic_index', 'norm_method', 'surf_area_unit']
source_gal['shape']['major'] = galaxy_major_axis
source_gal['shape']['minor'] = galaxy_minor_axis
source_gal['shape']['sersic_index'] = galaxy_sersic_index
source_gal['shape']['norm_method'] = galaxy_norm_method
source_gal['shape']['surf_area_units'] = galaxy_surf_area_unit
source_gal['spectrum']['name'] = galaxy_name
source_gal['spectrum']['redshift'] = galaxy_redshift
source_gal['spectrum']['extinction']['value'] = galaxy_extinction
source_gal['spectrum']['sed'] = {'sed_type': 'brown2014', 'key': galaxy_sed}
source_gal['spectrum']['normalization'] = {}
source_gal['spectrum']['normalization']['type'] = 'jwst'
source_gal['spectrum']['normalization']['bandpass'] = galaxy_bandpass
source_gal['spectrum']['normalization']['norm_flux'] = galaxy_brightness
source_gal['spectrum']['normalization']['norm_fluxunit'] = galaxy_fluxunit
emission_line = {}
emission_line['id'] = 0
emission_line['name'] = 'Redshifted H-alpha emission'
emission_line['emission_or_absorption'] = 'emission'
emission_line['center'] = emission_line_center * (1 + galaxy_redshift)
emission_line['width'] = emission_line_width * (1 + galaxy_redshift)
emission_line['strength'] = emission_line_strength
emission_line['profile'] = 'gaussian'
source_gal['spectrum']['lines'] = [emission_line]

configuration['scene'] = [source_gal]

result = perform_calculation(configuration)

plt.imshow(result['2d']['snr'])
plt.title('SNR')
plt.colorbar()
plt.show()

Figure 3. Output plot from the code shown above



Appendices valid values for configuration dictionary

The following are valid values for configuration dictionaries:

config['spectrum']['sed']

  • sed_type = phoenix

    • key may have the following values:

      • o3v

      • o5v

      • o6i

      • o7v

      • o8i

      • o9v

      • b0v

      • b0iii

      • b0i

      • b1v

      • b3v

      • b5iii

      • b5v

      • b5i

      • b8v

      • a0i

      • a0v

      • a1v

      • a5i

      • a3v

      • a5v

      • f0i

      • f0v

      • f5i

      • f2v

      • f5v

      • f8v

      • g0v

      • g0iii

      • g2v

      • g5v

      • g0i

      • g8v

      • g5iii

      • g5i

      • k0v

      • k0iii

      • k2v

      • k0i

      • k5v

      • k5iii

      • k7v

      • k5i

      • m0i

      • m0iii

      • m0v

      • m2i

      • m2v

      • m5v

  • sed_type = k93model
    • key may have the following values:

      • o5v
      • o7v
      • o9v
      • b0v
      • b1v
      • b3v
      • b5v
      • b8v
      • a1v
      • a3v
      • a5v
      • f0v
      • f2v
      • f5v
      • f8v
      • g2v
      • g5v
      • g8v
      • k0v
      • k4v
      • k7v
      • m2v
      • f0i
      • g5i
  • sed_type = hst_calspec

    • key may have the following values:

      • agk81d266
      • bd+17d4708
      • bd+28d4211
      • bd+75d325
      • feige34
      • feige110
      • gd50
      • gd71

      • gd108
      • gd153

      • grw+70d5824
      • g191b2b

      • hz21
      • hz43

      • hz44
      • lb227
      • lds749b
      • ngc7293
      • p330e

      • solar
      • sirius

      • vb8
      • vega

      • wd1657+343
      • wd0308-565

      • wd0947+857
      • wd1057+719

  • sed_type = brown2014

    • key may have the following values:

      • Values present in the web UI

        • ngc_3690

        • ngc_6240

        • ngc_5953

        • ic_4553

        • ngc_5256

        • ngc_3521

        • ngc_4125

        • ngc_4552

        • cgcg_049-057

        • ngc_0337

        • ngc_4138

        • ii_zw_096

        • ngc_0695

        • ngc_4725

        • ugca_219

        • ngc_3079

        • ngc_6090

        • mrk_33

      • Values that will work, but are not present in the web UI

        • ngc_4579

        • ngc_4670

        • ugc_05101

        • ngc_4860

        • ugc_04881

        • cgcg_436-030

        • ngc_0520

        • ngc_1144

        • ngc_7673

        • ngc_7674

        • ngc_7679

        • ngc_7771

        • ngc_3627

        • mrk_0475

        • ngc_0584

        • ic_5298

        • ngc_0628

        • ngc_4385

        • ngc_5653

        • ngc_4387

        • ngc_4660

        • iras_08572+3915

        • ngc_2388

        • ic_0691

        • ngc_4473

        • ngc_4889

        • mrk_0930

        • ngc_5257

        • ugc_12150

        • ngc_3938

        • ngc_0750

        • ngc_4551

        • ngc_4550

        • ngc_4559

        • ngc_4926

        • arp_118

        • ngc_1614

        • ngc_7591

        • ngc_7592

        • ngc_5258

        • ugc_08335_nw

        • arp_256_s

        • iii_zw_035

        • arp_256_n

        • ngc_4486

        • iras_17208-0014

        • ugca_166

        • ugc_09618_n

        • ngc_2537

        • ngc_6052

        • ngc_2623

        • mrk_1490

        • ngc_1275

        • ngc_0855

        • ngc_3265

        • ngc_4254

        • ngc_5992

        • ngc_4536

        • ngc_4826

        • ngc_4631

        • ngc_2798

        • ugc_06850

        • ugc_06665

        • ngc_4321

        • ugc_09618_s

        • ngc_5033

        • ngc_7585

        • ngc_1068

        • ic_0860

        • ngc_3379

        • ngc_5055

        • ngc_0660

        • ngc_5194

        • ngc_5195

        • ngc_4621

        • ngc_3310

        • ngc_4625

        • ngc_5713

        • ugca_410

        • haro_06

        • ngc_4088

        • ngc_7331

        • ngc_0474

        • ngc_5866

        • mrk_0331

        • cgcg_453-062

        • ngc_4168

        • ic_0883

        • ngc_3870

        • ngc_4676_a

        • mrk_1450

        • ugc_08696

        • ic_4051

        • ngc_5104

        • ngc_4194

        • ngc_7714

        • ngc_2403

        • ugc_08335_se

        • ngc_4365

        • ngc_3190

        • um_461

        • ugca_208

        • ngc_3198

        • ngc_3351

        • ngc_4569

        • ugc_09618

        • ngc_3049

        • ngc_4594

        • ngc_4458

        • ngc_4450

        • ngc_3773

  • type = brown2019
    • key may have the following values:
      • 3c273
      • ark_120
      • mrk_231
      • ngc_5728
      • ngc_7469
      • pg_0052+251
  • type = comp_qso
    • key may have the following values:
      • qso
  • type = cool_dwarfs
    • key may have the following values:
      • 2000
      • 1900
      • 1800
      • 1700
      • 1600
      • 1500
      • 1400
      • 1300
      • 1200
      • 1100
      • 1000
      • 900
      • 800
      • 700
      • 600
      • 550
      • 500
      • 450
      • 400
      • 350
      • 300
      • 250
      • 200
  • type = novae
    • key may have the following values:
      • kilonova

      • sne91bg

      • sneia
      • sneiax

      • sneib
      • sneii_fast
      • sneii_slow
  • type = pne
    • key may have the following values:
      • pne_100k

      • pne_30k

      • pne_50k

      • pne_53k

      • pne_70k

  • type = stellar_pop
    • key may have the following values:
      • ssp_a6.00_zm0.50

      • ssp_a6.00_zm1.00

      • ssp_a6.00_zm1.50

      • ssp_a6.00_zm2.00

      • ssp_a6.00_zm2.50

      • ssp_a6.00_zp0.00

      • ssp_a6.00_zp0.25

      • ssp_a6.25_zm0.50

      • ssp_a6.25_zm1.00

      • ssp_a6.25_zm1.50

      • ssp_a6.25_zm2.00

      • ssp_a6.25_zm2.50

      • ssp_a6.25_zp0.00

      • ssp_a6.25_zp0.25

      • ssp_a6.50_zm0.50

      • ssp_a6.50_zm1.00

      • ssp_a6.50_zm1.50

      • ssp_a6.50_zm2.00

      • ssp_a6.50_zm2.50

      • ssp_a6.50_zp0.00

      • ssp_a6.50_zp0.25

      • ssp_a6.75_zm0.50

      • ssp_a6.75_zm1.00

      • ssp_a6.75_zm1.50

      • ssp_a6.75_zm2.00

      • ssp_a6.75_zm2.50

      • ssp_a6.75_zp0.00

      • ssp_a6.75_zp0.25

      • ssp_a7.00_zm0.50

      • ssp_a7.00_zm1.00

      • ssp_a7.00_zm1.50

      • ssp_a7.00_zm2.00

      • ssp_a7.00_zm2.50

      • ssp_a7.00_zp0.00

      • ssp_a7.00_zp0.25

      • ssp_a7.25_zm0.50

      • ssp_a7.25_zm1.00

      • ssp_a7.25_zm1.50

      • ssp_a7.25_zm2.00

      • ssp_a7.25_zm2.50

      • ssp_a7.25_zp0.00

      • ssp_a7.25_zp0.25

      • ssp_a7.50_zm0.50

      • ssp_a7.50_zm1.00

      • ssp_a7.50_zm1.50

      • ssp_a7.50_zm2.00

      • ssp_a7.50_zm2.50

      • ssp_a7.50_zp0.00

      • ssp_a7.50_zp0.25

      • ssp_a7.75_zm0.50

      • ssp_a7.75_zm1.00

      • ssp_a7.75_zm1.50

      • ssp_a7.75_zm2.00

      • ssp_a7.75_zm2.50

      • ssp_a7.75_zp0.00

      • ssp_a7.75_zp0.25

      • ssp_a8.00_zm0.50

      • ssp_a8.00_zm1.00

      • ssp_a8.00_zm1.50

      • ssp_a8.00_zm2.00

      • ssp_a8.00_zm2.50

      • ssp_a8.00_zp0.00

      • ssp_a8.00_zp0.25

      • ssp_a8.25_zm0.50

      • ssp_a8.25_zm1.00

      • ssp_a8.25_zm1.50

      • ssp_a8.25_zm2.00

      • ssp_a8.25_zm2.50

      • ssp_a8.25_zp0.00

      • ssp_a8.25_zp0.25

      • ssp_a8.50_zm0.50

      • ssp_a8.50_zm1.00

      • ssp_a8.50_zm1.50

      • ssp_a8.50_zm2.00

      • ssp_a8.50_zm2.50

      • ssp_a8.50_zp0.00

      • ssp_a8.50_zp0.25

      • ssp_a8.75_zm0.50

      • ssp_a8.75_zm1.00

      • ssp_a8.75_zm1.50

      • ssp_a8.75_zm2.00

      • ssp_a8.75_zm2.50

      • ssp_a8.75_zp0.00

      • ssp_a8.75_zp0.25

      • ssp_a9.00_zm0.50

      • ssp_a9.00_zm1.00

      • ssp_a9.00_zm1.50

      • ssp_a9.00_zm2.00

      • ssp_a9.00_zm2.50

      • ssp_a9.00_zp0.00

      • ssp_a9.00_zp0.25

      • ssp_a9.25_zm0.50

      • ssp_a9.25_zm1.00

      • ssp_a9.25_zm1.50

      • ssp_a9.25_zm2.00

      • ssp_a9.25_zm2.50

      • ssp_a9.25_zp0.00

      • ssp_a9.25_zp0.25

      • ssp_a9.50_zm0.50

      • ssp_a9.50_zm1.00

      • ssp_a9.50_zm1.50

      • ssp_a9.50_zm2.00

      • ssp_a9.50_zm2.50

      • ssp_a9.50_zp0.00

      • ssp_a9.50_zp0.25

      • ssp_a9.75_zm0.50

      • ssp_a9.75_zm1.00

      • ssp_a9.75_zm1.50

      • ssp_a9.75_zm2.00

      • ssp_a9.75_zm2.50

      • ssp_a9.75_zp0.00

      • ssp_a9.75_zp0.25

      • ssp_a10.00_zm0.50

      • ssp_a10.00_zm1.00

      • ssp_a10.00_zm1.50

      • ssp_a10.00_zm2.00

      • ssp_a10.00_zm2.50

      • ssp_a10.00_zp0.00

      • ssp_a10.00_zp0.25

      • ssp_a10.10_zm0.50

      • ssp_a10.10_zm1.00

      • ssp_a10.10_zm1.50

      • ssp_a10.10_zm2.00

      • ssp_a10.10_zm2.50

      • ssp_a10.10_zp0.00

      • ssp_a10.10_zp0.25

  • type = sun_planets
    • key may have the following values:
      • sun
      • jupiter
      • saturn
      • uranus
      • neptune
  • type = swire
    • key may have the following values:
      • elliptical_2gyr
      • elliptical_5gyr

      • elliptical_13gyr
      • spiral_s0

      • spiral_sa

      • spiral_sb

      • spiral_sc

      • spiral_spi4
      • spiral_sd

      • spiral_sdm

config['spectrum']['normalization']

  • type = hst

    • bandpass may have the following values:

      • wfc3,uvis1,f336w

      • wfc3,uvis1,f438w
      • wfc3,uvis1,f475w
      • wfc3,uvis1,f555w
      • wfc3,uvis1,f606w
      • wfc3,uvis1,f625w
      • wfc3,uvis1,f775w
      • wfc3,uvis1,f814w
      • wfc3,uvis1,f850lp
      • wfc3,ir,f098m

      • wfc3,ir,f105w

      • wfc3,ir,f110w

      • wfc3,ir,f125w

      • wfc3,ir,f140w

      • wfc3,ir,f160w

      • acs,wfc1,f435w
      • acs,wfc1,f475w
      • acs,wfc1,f555w
      • acs,wfc1,f606w
      • acs,wfc1,f625w
      • acs,wfc1,f775w
      • acs,wfc1,f814w
      • acs,wfc1,f850lp
      • nicmos,2,f110w
      • nicmos,2,f160w
  • type = jwst

    • bandpass may have the following values:

      • nircam,sw_imaging,f070w

      • nircam,sw_imaging,f090w

      • nircam,sw_imaging,f115w

      • nircam,sw_imaging,f150w

      • nircam,sw_imaging,f200w

      • nircam,sw_imaging,f212n

      • nircam,lw_imaging,f277w

      • nircam,lw_imaging,f356w

      • nircam,lw_imaging,f444w

      • niriss,imaging,f090w
      • niriss,imaging,f115w
      • niriss,imaging,f140m
      • niriss,imaging,f150w
      • niriss,imaging,f277w
      • niriss,imaging,f480m
      • miri,imaging,f560w

      • miri,imaging,f770w

      • miri,imaging,f1000w

      • miri,imaging,f1280w

      • miri,imaging,f1500w

      • miri,imaging,f1800w

      • miri,imaging,f2100w

      • miri,imaging,f2550w

      • miri,imaging,fnd
  • type = photsys

    • bandpass may have the following values:

      • 2mass,j
      • 2mass,h
      • 2mass,ks
      • bessell,j

      • bessell,h

      • bessell,k

      • cousins,i

      • cousins,r
      • gaia,g
      • johnson,v

      • johnson,r
      • johnson,i

      • johnson,j

      • johnson,k

      • msx,a
      • msx,b1
      • msx,b2
      • msx,c
      • msx,d
      • msx,e
      • sdss,u

      • sdss,g

      • sdss,r

      • sdss,i

      • sdss,z

      • spitzer,irac3.6

      • spitzer,irac4.5

      • spitzer,irac5.8

      • spitzer,irac8.0

      • spitzer,mips24

      • wise,w1
      • wise,w2
      • wise,w3
      • wise,w4




Latest updates
  •  
    Updated examples, lists, and figures for ETC 3.0.

  •  
    Updated for ETC 2.0.

  •  
    Updated examples and list for ETC 1.7.

  •  
    Updated examples and list for ETC 1.6.

  •  
    Updated examples for ETC 1.5.1.

  •  
    Updated for ETC 1.5.


  • Updated for ETC 1.3.
Originally published