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 toTrue, the effect is on; if set toFalse, the effect is off; if set toNone, the effect is set to the default.noise: dictionary, contains flags to turn on and off the available noise parameterscrs: 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 effectssaturation: 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 ofmax_scene_size)instrument: dictionary, contains the instrument configuration parametersaperture: 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 usingbuild_default_calc, the value provided for the instrument will be set here)mode: string, the mode to be used (if usingbuild_default_calc, the value provided for mode will be set here)
detector: dictionary, contains the detector configurationngroup: integer, the number of groups in each rampnint: integer, the number of ramps in each exposurenexp: integer, the number of exposuressubarray: 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 aperturesky_annulus: list of 2 floating point values. The inner and outer radius of the annulus in which the sky count rate will be measuredunits: string, the units of the aperture size and sky annulusbackground_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 iftarget_typeis '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 valuenone,minzodi, orecliptic, or a list of 2 arrays containing the wavelength (μm) and background flux (MJy/sr).background_level: the background level. A string with the valuelow,medium, orhigh; if background isminzodi, the valuebenchmarkis 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 arcsecondsy_offset: float, the offset of the source in the y direction from the center of the scene, in arcsecondsorientation: 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 shapegeometry: string, one ofpoint,flat,gaussian2d,sersic,sersic_scale, orpower. Different shapes require different shape parameters, as follows:point: Does not require any other parameters. Parameters present will be ignored.flat: Requires the parametersmajorandminorto be present.gaussian2d: Requires the parametersmajorandminorto be present.sersic: Requires the parametersmajor,minor, andsersic_indexto be present.sersic_scale: Requires the parametersmajor,minor, andsersic_indexto be present.power: Requires the parametersr_coreandpower_indexto 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 areinteg_infinity,surf_center, andsurf_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 arenull(for integ_infinity only),arcsec^2, orsr.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 isgaussian
sed: dictionary, provides the parameters of the source continuum SED. Contains the following keys:sed_type: string, defines the type of SED. Possible values areno_continuum,flat,powerlaw,blackbody,phoenix,hst_calspec,brown2014,brown2019,comp_qso,cool_dwarfs,pne,novae,stellar_pop,sun_planets,swire, andinput. Depending on the SED type chosen, other parameters may be needed.no_continuum: takes no parametersflat: takes 'unit'powerlaw: takes 'unit' and 'index'blackbody: takes 'temp'phoenix: takes 'key' (ifperform_calculationis run with webapp=True) or takes 'teff', 'log_g', and 'metallicity' (ifperform_calculationis 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: takesspectrum, a list of wavelength and flux arrays.
unit: string, eitherfnuorflam. 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 areat_lambda,hst,jwst,photsys, andnone. Depending on the normalization type chosen, other parameters may be needed.nonetakes no parameters.hsttakesbandpass,norm_flux, andnorm_fluxunitjwsttakesbandpass,norm_flux, andnorm_fluxunitphotsystakesbandpass,norm_flux, andnorm_fluxunitat_lambdatakesnorm_wave,norm_waveunit,norm_flux, andnorm_fluxunit
norm_wave: float, reference wavelength in units ofnorm_waveunit, used byat_lambda.norm_waveunit: string, specifies the wavelength units used for normalization, used byat_lambda. Available values arem,nm,um(micron),mm,micron,microns,angstromnorm_flux: float, reference flux value in units ofnorm_fluxunit, used by all normalization methods other thannone.norm_fluxunit: string, specifies the flux units used for normalization. Used by all methods other thannone. Available values areflam,fnu,vegamag,abmag,mjy,ujy(micro-Jansky),njy,jybandpass: string, specifies the bandpass forhst,jwst, andphotsysnormalizations. 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_avgandlmc_2; one SMC model:smc_bar, and thehd210121model), and one Chapman (2009) model:chapman09.value: float, the extinction value, in units ofunitunit: string, the units of the extinction value, eithernhfor hydrogen column density ormagfor magnitudes.bandpass: the bandpass in which the extinction is measured, only used if the unit ismag.
Sample code creating a background spectrum using the JWST Background Tool (JBT)
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
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
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 lineFigure 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=phoenixkey may have the following values:
o3vo5vo6io7vo8io9vb0vb0iiib0ib1vb3vb5iiib5vb5ib8va0ia0va1va5ia3va5vf0if0vf5if2vf5vf8vg0vg0iiig2vg5vg0ig8vg5iiig5ik0vk0iiik2vk0ik5vk5iiik7vk5im0im0iiim0vm2im2vm5v
sed_type = k93modelkey may have the following values:
o5vo7vo9vb0vb1vb3vb5vb8va1va3va5vf0vf2vf5vf8vg2vg5vg8vk0vk4vk7vm2vf0ig5i
sed_type=hst_calspeckey may have the following values:
agk81d266bd+17d4708bd+28d4211bd+75d325feige34feige110gd50gd71gd108gd153grw+70d5824g191b2bhz21hz43hz44lb227lds749bngc7293p330esolarsiriusvb8vegawd1657+343wd0308-565wd0947+857wd1057+719
sed_type=brown2014key may have the following values:
Values present in the web UI
ngc_3690ngc_6240ngc_5953ic_4553ngc_5256ngc_3521ngc_4125ngc_4552cgcg_049-057ngc_0337ngc_4138ii_zw_096ngc_0695ngc_4725ugca_219ngc_3079ngc_6090mrk_33
Values that will work, but are not present in the web UI
ngc_4579ngc_4670ugc_05101ngc_4860ugc_04881cgcg_436-030ngc_0520ngc_1144ngc_7673ngc_7674ngc_7679ngc_7771ngc_3627mrk_0475ngc_0584ic_5298ngc_0628ngc_4385ngc_5653ngc_4387ngc_4660iras_08572+3915ngc_2388ic_0691ngc_4473ngc_4889mrk_0930ngc_5257ugc_12150ngc_3938ngc_0750ngc_4551ngc_4550ngc_4559ngc_4926arp_118ngc_1614ngc_7591ngc_7592ngc_5258ugc_08335_nwarp_256_siii_zw_035arp_256_nngc_4486iras_17208-0014ugca_166ugc_09618_nngc_2537ngc_6052ngc_2623mrk_1490ngc_1275ngc_0855ngc_3265ngc_4254ngc_5992ngc_4536ngc_4826ngc_4631ngc_2798ugc_06850ugc_06665ngc_4321ugc_09618_sngc_5033ngc_7585ngc_1068ic_0860ngc_3379ngc_5055ngc_0660ngc_5194ngc_5195ngc_4621ngc_3310ngc_4625ngc_5713ugca_410haro_06ngc_4088ngc_7331ngc_0474ngc_5866mrk_0331cgcg_453-062ngc_4168ic_0883ngc_3870ngc_4676_amrk_1450ugc_08696ic_4051ngc_5104ngc_4194ngc_7714ngc_2403ugc_08335_sengc_4365ngc_3190um_461ugca_208ngc_3198ngc_3351ngc_4569ugc_09618ngc_3049ngc_4594ngc_4458ngc_4450ngc_3773
- type =
brown2019- key may have the following values:
3c273ark_120mrk_231ngc_5728ngc_7469pg_0052+251
- key may have the following values:
- type =
comp_qso- key may have the following values:
qso
- key may have the following values:
- type =
cool_dwarfs- key may have the following values:
20001900180017001600150014001300120011001000900800700600550500450400350300250200
- key may have the following values:
- type =
novae- key may have the following values:
kilonovasne91bgsneiasneiaxsneibsneii_fastsneii_slow
- key may have the following values:
- type =
pne- key may have the following values:
pne_100kpne_30kpne_50kpne_53kpne_70k
- key may have the following values:
- type =
stellar_pop- key may have the following values:
ssp_a6.00_zm0.50ssp_a6.00_zm1.00ssp_a6.00_zm1.50ssp_a6.00_zm2.00ssp_a6.00_zm2.50ssp_a6.00_zp0.00ssp_a6.00_zp0.25ssp_a6.25_zm0.50ssp_a6.25_zm1.00ssp_a6.25_zm1.50ssp_a6.25_zm2.00ssp_a6.25_zm2.50ssp_a6.25_zp0.00ssp_a6.25_zp0.25ssp_a6.50_zm0.50ssp_a6.50_zm1.00ssp_a6.50_zm1.50ssp_a6.50_zm2.00ssp_a6.50_zm2.50ssp_a6.50_zp0.00ssp_a6.50_zp0.25ssp_a6.75_zm0.50ssp_a6.75_zm1.00ssp_a6.75_zm1.50ssp_a6.75_zm2.00ssp_a6.75_zm2.50ssp_a6.75_zp0.00ssp_a6.75_zp0.25ssp_a7.00_zm0.50ssp_a7.00_zm1.00ssp_a7.00_zm1.50ssp_a7.00_zm2.00ssp_a7.00_zm2.50ssp_a7.00_zp0.00ssp_a7.00_zp0.25ssp_a7.25_zm0.50ssp_a7.25_zm1.00ssp_a7.25_zm1.50ssp_a7.25_zm2.00ssp_a7.25_zm2.50ssp_a7.25_zp0.00ssp_a7.25_zp0.25ssp_a7.50_zm0.50ssp_a7.50_zm1.00ssp_a7.50_zm1.50ssp_a7.50_zm2.00ssp_a7.50_zm2.50ssp_a7.50_zp0.00ssp_a7.50_zp0.25ssp_a7.75_zm0.50ssp_a7.75_zm1.00ssp_a7.75_zm1.50ssp_a7.75_zm2.00ssp_a7.75_zm2.50ssp_a7.75_zp0.00ssp_a7.75_zp0.25ssp_a8.00_zm0.50ssp_a8.00_zm1.00ssp_a8.00_zm1.50ssp_a8.00_zm2.00ssp_a8.00_zm2.50ssp_a8.00_zp0.00ssp_a8.00_zp0.25ssp_a8.25_zm0.50ssp_a8.25_zm1.00ssp_a8.25_zm1.50ssp_a8.25_zm2.00ssp_a8.25_zm2.50ssp_a8.25_zp0.00ssp_a8.25_zp0.25ssp_a8.50_zm0.50ssp_a8.50_zm1.00ssp_a8.50_zm1.50ssp_a8.50_zm2.00ssp_a8.50_zm2.50ssp_a8.50_zp0.00ssp_a8.50_zp0.25ssp_a8.75_zm0.50ssp_a8.75_zm1.00ssp_a8.75_zm1.50ssp_a8.75_zm2.00ssp_a8.75_zm2.50ssp_a8.75_zp0.00ssp_a8.75_zp0.25ssp_a9.00_zm0.50ssp_a9.00_zm1.00ssp_a9.00_zm1.50ssp_a9.00_zm2.00ssp_a9.00_zm2.50ssp_a9.00_zp0.00ssp_a9.00_zp0.25ssp_a9.25_zm0.50ssp_a9.25_zm1.00ssp_a9.25_zm1.50ssp_a9.25_zm2.00ssp_a9.25_zm2.50ssp_a9.25_zp0.00ssp_a9.25_zp0.25ssp_a9.50_zm0.50ssp_a9.50_zm1.00ssp_a9.50_zm1.50ssp_a9.50_zm2.00ssp_a9.50_zm2.50ssp_a9.50_zp0.00ssp_a9.50_zp0.25ssp_a9.75_zm0.50ssp_a9.75_zm1.00ssp_a9.75_zm1.50ssp_a9.75_zm2.00ssp_a9.75_zm2.50ssp_a9.75_zp0.00ssp_a9.75_zp0.25ssp_a10.00_zm0.50ssp_a10.00_zm1.00ssp_a10.00_zm1.50ssp_a10.00_zm2.00ssp_a10.00_zm2.50ssp_a10.00_zp0.00ssp_a10.00_zp0.25ssp_a10.10_zm0.50ssp_a10.10_zm1.00ssp_a10.10_zm1.50ssp_a10.10_zm2.00ssp_a10.10_zm2.50ssp_a10.10_zp0.00ssp_a10.10_zp0.25
- key may have the following values:
- type =
sun_planets- key may have the following values:
sunjupitersaturnuranusneptune
- key may have the following values:
- type =
swire- key may have the following values:
elliptical_2gyrelliptical_5gyrelliptical_13gyrspiral_s0spiral_saspiral_sbspiral_scspiral_spi4spiral_sdspiral_sdm
- key may have the following values:
config['spectrum']['normalization']
type =
hstbandpass may have the following values:
wfc3,uvis1,f336wwfc3,uvis1,f438wwfc3,uvis1,f475wwfc3,uvis1,f555wwfc3,uvis1,f606wwfc3,uvis1,f625wwfc3,uvis1,f775wwfc3,uvis1,f814wwfc3,uvis1,f850lpwfc3,ir,f098mwfc3,ir,f105wwfc3,ir,f110wwfc3,ir,f125wwfc3,ir,f140wwfc3,ir,f160wacs,wfc1,f435wacs,wfc1,f475wacs,wfc1,f555wacs,wfc1,f606wacs,wfc1,f625wacs,wfc1,f775wacs,wfc1,f814wacs,wfc1,f850lpnicmos,2,f110wnicmos,2,f160w
type =
jwstbandpass may have the following values:
nircam,sw_imaging,f070wnircam,sw_imaging,f090wnircam,sw_imaging,f115wnircam,sw_imaging,f150wnircam,sw_imaging,f200wnircam,sw_imaging,f212nnircam,lw_imaging,f277wnircam,lw_imaging,f356wnircam,lw_imaging,f444wniriss,imaging,f090wniriss,imaging,f115wniriss,imaging,f140mniriss,imaging,f150wniriss,imaging,f277wniriss,imaging,f480mmiri,imaging,f560wmiri,imaging,f770wmiri,imaging,f1000wmiri,imaging,f1280wmiri,imaging,f1500wmiri,imaging,f1800wmiri,imaging,f2100wmiri,imaging,f2550wmiri,imaging,fnd
type =
photsysbandpass may have the following values:
2mass,j2mass,h2mass,ksbessell,jbessell,hbessell,kcousins,icousins,rgaia,gjohnson,vjohnson,rjohnson,ijohnson,jjohnson,kmsx,amsx,b1msx,b2msx,cmsx,dmsx,esdss,usdss,gsdss,rsdss,isdss,zspitzer,irac3.6spitzer,irac4.5spitzer,irac5.8spitzer,irac8.0spitzer,mips24wise,w1wise,w2wise,w3wise,w4


