the JWST user documentation is under development; current versions are preliminary and subject to revision.

Page tree

Versions Compared


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

Content Layer
Content Column
Content Block

The JWST Exposure Time Calculator (ETC)  allows users to upload a spectrum for a new source in cases where the ETC's library of template spectra does not contain the desired spectrum or spectral features.

Content Block


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.

To use this option, you will need to:

  • Prepare your spectrum file
  • Specify your spectrum file on the JWST ETC "Upload Spectra" input page

Use the Upload Spectra tab 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. Near the bottom of the page is a widget that allows you to upload a new spectrum. 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. 


Prepare your file 

The user-specified spectrum file should be in one of the following two file formats:

  • ASCII table, with the extension .dat or .txt
  • FITS table, with an extension .fits

Try to use a unique filename for this file, for example, by using your last name as part of the filename.

Prepare your ASCII input spectrum file with two columns:

  • column 1: wavelength
  • column 2: flux density

Column 1 should be the wavelength in µm and column 2 should be the flux density in mJy.  

For FITS format files, the format must be pysynphot compatible.

The wavelengths in the first column must be in increasing order, and there may not be duplicate wavelengths. 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.

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, then your input spectrum file meets the necessary requirements.


Spectrum file format 


If the file is an ASCII file, it must contain two columns (one for wavelength in µm and one for flux density in mJy) separated by spaces. Any comment lines in the file must start with # in order to avoid confusion when it is used in the calculation. 


If the file is a FITS binary table, it should have two 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

Wavelengths Flux
angstrom, angstroms flam = erg cm-2 s-1 Å-1
hzfnu = erg cm-2 s-1 Hz-1
nmphotlam = photons cm-2 s-1 Å-1
micron, microns, μmphotnu = photon cm-2 s-1 Hz-1
inversemicron, inversemicronsjy = 10-23 erg cm-2 s-1 Hz-1
μmmjy = 10-26 erg cm-2 s-1 Hz-1
m, meterobmag
 count, counts


In addition, the header of the FITS table should include lines similar to these describing the content of the file:

PCOUNT = 0 /
GCOUNT = 1 / Only one group
TFIELDS = 2 / Number of fields per row
EXTNAME = ’’ / Name of extension
TBCOL1 = 1 /
TFORM1 = ’E15.7 ’ /
TUNIT1 = ’angstroms’ /
TDISP1 = ’G15.7 ’ /
TTYPE2 = ’FLUX ’ /
TBCOL2 = 17 /
TFORM2 = ’E15.7 ’ /
TUNIT2 = ’flam ’ /
TDISP2 = ’G15.7 ’ /


Specify your spectrum 

In the Uploaded Spectra tab of the JWST ETC GUI, you may either select Upload and type the path of the file in the input box, or use the browse button next to the box to navigate through the local file system to the file. 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 in the JWST ETC GUI. 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 "Source Table". 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 Source Table. Select the source by clicking on the appropriate row in the Source Table. 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 spectra is now assigned to the source. The new source can be selected and be added to the selected scene by using the "Add Source" button under the "Select a Scene" table.



Content Block
nameRelated links

Related links

JWST User Documentation Home
JWST Exposure Time Calculator, ETC
JWST Exposure Time Calculator Overview
JWST ETC Scenes and Sources Page Overview
JWST ETC Calculations Page Overview
JWST ETC Defining a New Source
JWST ETC Creating a New Calculation

Content Block


JWST Exposure Time Calculator Tool

Pontoppidan, K. M., Pickering, T. E.,  Laidler, V. G.  et al., 2016, Proc. SPIE 9910 
Pandeia: a multi-mission exposure time calculator for JWST and WFIRST

JWST technical documents

Content Column
Content Block

Multiexcerpt include
MultiExcerptNameETC icon and name
PageWithExcerptMR:ETC icon and name

Content Block

Last updated

Published December 30, 2016


The format for 'Last updated' is shown below. Enter updates above this internal"Comment" box. Only enter major updates (not typos or formatting changes).

Updated April 05, 2017

  • Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam fermentum vestibulum est. Cras rhoncus. 
  • Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed quis tortor. 

Published March 02, 2017

Restrict Content

Tables are only visible to JDox content providers

"Updated" refers to the updated or publish dates for the public pages.

Page properties
UpdatedDecember 30, 2016
Open commentsNo
Page properties
UpdatedDecember 30, 2016
Fix pageNo