STScI Logo

Synphot FAQ

1. Why doesn't synphot read my table?

A. Note that there needs to be a column named FLUX in order for synphot to recognize a FITS or STSDAS table as a spectrum, and a column named THROUGHPUT for synphot to recognize a FITS or STSDAS table as a bandpass.

Note that, if your table is a throughput table, you must use the thru() function in your SYNPHOT expression, eg, thru(myfile.dat).

2. What should I do when I get this message?

* Synphot data files may not be installed *
* See Appendix C of Installation Manual   *
* for further information on installation *
ERROR: Cannot access graph table: mtab$*_tmg.fits

A. Synphot requires a number of data files in order to run - the graph table is just one of them.

Instructions for installing the data files are in Appendix A of the STSDAS Site Manager's Installation Guide.

For your convenience, we summarize the steps here:

3. What should I do when I get this message?

Warning, you are using an old style graph table.

No thermal background calculations will be supported.

A. In 2002, two more columns were added to the graph table to support thermal background calculations. If you aren't using the thermback task, this is only a warning and will not affect your calculations.

However, there have been several updates to the graph and components tables since 2002, so you may wish to update your installation of synphot data files to obtain the latest versions. (See previous question's answer for instructions.)

4. Sometimes when I run a synphot task, I get a message like this:

     WARNING Input spectrum contains flux values <= 0:  
     mag value set to 100 for 1740 of 3826 bins

What does this mean? What's going on here? Should I worry?

A. All magnitude systems are defined in terms of the logarithm of flux. Negative fluxes are not uncommon as a result of noisy detectors, poor background subtraction, etc, but they are physically meaningless, and cannot be converted to magnitudes since the logarithm of a negative number is undefined.

When synphot encounters this situation, it assigns a magnitude of 100 to any wavelength bin that has a negative flux. If this spectrum is subsequently converted back to fluxes, those bins will (in single precision arithmetic) have a flux value of zero. In other words, you can convert from flux to magnitude, but you cannot get the same spectrum by converting back again if the original spectrum contained negative flux values.

This may result in a net brightening of the source, if a significant number of values which were formerly negative are set to zero. You should consider the fraction of affected bins in order to decide whether your results are likely to be significantly affected.

4b. But I'm not asking for output in magnitudes, so why do I get this message?

A. Even if you haven't asked for magnitudes, synphot may internally convert to magnitude if you have specified a renormalization in magnitudes, or if you have specified one of the non-HST bandpasses that are defined in magnitudes (eg, Johnson V).

5. What's this error about "Wavelength column is not sorted"?

A. Synphot requires that all wavelength tables and spectra be arranged monotonically according to wavelength. The wavelengths can be either increasing or decreasing, but they must be monotonic. In particular, they may not include any duplicate wavelength entries: the distance between adjacent entries in the table must be greater than zero.

5b. But my wavelengths *are* sorted!

A. Because synphot uses single-precision arithmetic, some tables with extremely fine wavelength intervals which are properly sorted can appear to have duplicate entries. The wavelength intervals must be at least 0.00032 in order to avoid the appearance of duplicate entries.

6. Why am I getting errors with synphot plotting tasks?

A. IRAF v2.15 changed the format used internally for WCS graphics information. This causes problems for STSDAS graphics tasks when used with the cl, or when used with PyRAF v1.11. Pyraf v1.12 will handle this correctly; a development version of this release can be obtained by downloading the nightly tarball from the PyRAF download page.