One of the features of the ETC is its ability handle a spectrum supplied by the user. In this version of the ETC 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:
The file will be uploaded when you click the “submit” button at the top or bottom of the form. If the file is large or the computer has a slow internet connection it will take extra time for the browser to send the file to the ETC server.
Prepare your input spectrum file with 2 columns:
Column 1 should be the wavelength in and column 2 should be the flux density (in for point sources, and in for diffuse sources).
The user specified spectrum file should be in one of the following 2 file formats:
Try to use a unique filename for this file, for example by using your last name as part of the filename.
Regardless of the file format used, your input spectrum file must meet the following requirements in order to be successfully uploaded:
Violating any of these requirements will cause the calculation to fail and produce a pysynphot error message.
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.
If the file is an ASCII file, it must contain the following 2 columns:
These are the only units supported for ASCII files. Any comment lines in the file must start with # in order to avoid confusion when it is used in the calculation.
If the user supplied file is a FITS binary table, it should have two columns labeled “WAVELENGTH” and “FLUX”, with the units specified for each column. The header of the FITS table should have pysynphot compliant units in the TUNIT field of the extension 1 of the table. For example:
TTYPE1 = 'WAVELENGTH' /
TBCOL1 = 1 /
TFORM1 = 'E15.7 ' /
TUNIT1 = 'angstroms' /
TDISP1 = 'G15.7 ' / %15.7g
TTYPE2 = 'FLUX ' /
TBCOL2 = 17 /
TFORM2 = 'E15.7 ' /
TUNIT2 = 'flam ' /
TDISP2 = 'G15.7 ' / %15.7g
The valid units for Wavelength and Flux are:
Wavelength | Flux |
---|---|
angstrom, angstroms | flam |
hz | fnu |
nm | photlam |
micron, microns, um | photnu |
inversemicron, inversemicrons | jy |
um | mjy |
mm | abmag |
cm | stmag |
m, meter | obmag |
vegamag | |
count, counts |
Table 1: Accepted Wavelength and Flux Formats
The SDAS table file format is not portable to different machine architectures and so support for it has been discontinued. We recommend using the TTools command “tcopy” to convert all SDAS files to FITS format.
In section 3 of the ETC input form, simply select the radio box next to “Upload Spectrum File”, click the “Choose File” button, and navigate through the local file system to the file containing the spectrum you wish to use.