JWST ETC User Supplied Spectra
The JWST Exposure Time Calculator (ETC) allows users to upload a spectrum for a new source. This capability is especially helpful in cases where the ETC's library of template spectra does not contain the desired spectrum or spectral features.
Video Tutorial: Uploading Spectra to the ETC
One of the features of the JWST ETC is its ability to handle a spectrum supplied by the user. This is accomplished by a direct upload from the machine where the user is running the web browser.
Words in bold are GUI menus/
panels or data software packages;
bold italics are buttons in GUI
tools or package parameters.
- Prepare your spectrum file
- Specify your spectrum file on the Upload Spectra page
Use the Upload Spectra page to upload and manage your spectra for a given workbook. On this page, you will find a list, if any, of previously uploaded spectra, including filename, wavelength range, and an optional note. Spectra can be selected and uploaded in the usual way for your web browser; the controls are located at the bottom of the Upload Spectra page. If the file is large or the computer has a slow Internet connection it will take more time for the browser to send the file to the ETC server.
At this time, there is no capability to delete a spectrum once it has been uploaded. Uploading a file with the same name as an existing file, however, will overwrite the existing file in the ETC.
Prepare your file
The user-specified spectrum file should be in one of the following file formats:
- ASCII table, with the extension .dat or .txt
- FITS table, with an extension .fits
Prepare your ASCII input spectrum file with 2 columns:
- column 1: wavelength (µm)
- column 2: flux density (mJy)
For FITS format files, the format must be PySynphot compatible.
You may use PySynphot locally to validate your file by using the following command:
>>> import pysynphot as psyn
>>> sp = psyn.FileSpectrum('myfile.dat')
(The same command will also work for a FITS file.) If this command succeeds (i.e., no error messages), then your input spectrum file meets the necessary requirements.
Common reasons you have received an upload error:
- Duplicate wavelengths
- Wavelengths not in increasing order
- Exceptionally large flux values
- File size exceeds 10 MiB (10.49 MB)
Please note that if your spectrum has negative flux values, they will be clipped to zero and the calculation will proceed.
The wavelength range covered by the uploaded spectrum should cover the wavelength range of any instrument configurations one intends to use. If there is only partial coverage, the calculation will proceed with a warning, but may return a less accurate result. No spectral overlap with the instrument configuration will result in an error.
Spectrum file format
If the file is an ASCII file, it must contain 2 columns (one for wavelength in µm and one for flux density in mJy) separated by one or more spaces. Any comment lines in the file must start with the # symbol to avoid confusion when it is used in the calculation.
If the file is a FITS binary table, it should have 2 columns labeled “WAVELENGTH” and “FLUX”, with the units specified for each column.
Wavelength and flux units must be compatible with PySynphot. Acceptable units are shown in Table 1.
Table 1. Acceptable units for PySynphot
flam = erg cm-2 s-1 Å-1
fnu = erg cm-2 s-1 Hz-1
photlam = photons cm-2 s-1 Å-1
|micron, microns, μm|
photnu = photon cm-2 s-1 Hz-1
jy = 10-23 erg cm-2 s-1 Hz-1
mjy = 10-26 erg cm-2 s-1 Hz-1
In addition, the header of the FITS table should include lines similar to these describing the content of the file:
Specify your spectrum
On the Upload Spectra page, you may upload files in the usual way for your browser. Notes can be added in the pane next to the uploaded spectrum table after selecting a spectrum.
Apply your spectrum to a source
To use the uploaded spectrum, go to the Scenes and Sources page. You may either add a source with this new spectrum, or edit an existing source to apply this spectrum.
To apply the new spectrum to an existing source, first select the source in the Select a Source pane. Go to the Source Editor pane. Click the Continuum sub-tab and then click the radio button titled Uploaded File and select your spectrum from the pull-down menu. After you click the Save button, all edits made to the source will be automatically applied to all scenes using that source.
To add a new source with this spectrum to a scene, first select the Scene, then begin to define a new source by clicking New below the Select a Source pane. Select the source by clicking on the appropriate row in the Select a Source pane. Provide additional source details, if desired, via the different items in the sub-tabs located in the Source Editor pane. In the Continuum sub-tab, click the Uploaded File radio button, and select the newly uploaded spectrum from the pull-down menu, and click Save. The desired uploaded spectrum is now assigned to the source. The new source can be selected and added to the selected scene by using the Add Source button under the Select a Scene pane.
If you uploaded a spectrum in surface brightness units (e.g., mJy/square arcsecond) instead of flux density units (e.g., mJy), you will need to specify an Extended source under the Shape tab in the Source Editor pane. Then under Normalization choices, click the Surface Brightness radio button and select the correct units from the dropdown menu. For additional information on how to create an Extended source, see JWST ETC Defining an Extended Source.
Pontoppidan, K. M., et al., 2016, Proc. SPIE 9910, Observatory Operations: Strategies, Processes, and Systems VI, 991016
Pandeia: a multi-mission exposure time calculator for JWST and WFIRST