Adding Emission Lines

Up to three emission lines can be superimposed on the input spectrum by the ETC. For a pure emission line spectrum, select the “No continuum” option.

In spectroscopic and spectroscopic acquisition modes, any specified emission lines will be broadened, if necessary, to match the minimum instrumental resolution.

Note: Extinction, redshift, and renormalization are applied to the continuum spectrum, but are not applied to emission lines. Attempting to apply extinction or redshift to a spectrum with “no continuum” selected will result in an error.

Using pysynphot to modify emission lines

However, it is possible to use the pysynphot software directly to construct emission lines, apply extinction to them, and save the result as a FITS file which can then be uploaded to the ETC.

You must first obtain pysynphot and its associated data files and install them as described in the installation guide.

Then, after invoking the Python interpreter, you can create a spectrum including one or more emission lines; define the desired extinction; apply it to the spectrum; and save the result.

# Import the pysynphot package
import pysynphot as psyn

# Create an emission line. Specify flux, central wavelength, and FWHM
# - note this is not the same order that appears on the ETC form.
sp = psyn.GaussianSource(1e-15,7000,10,fluxunits='flam')

# Or, you can create several lines and add them to a flat spectrum
contnm = psyn.FlatSpectrum(1,fluxunits='flam')
line1 = psyn.GaussianSource(1e-15,7000,10,fluxunits='flam')
line2 = psyn.GaussianSource(1e-14,5000,15,fluxunits='flam')
line3 = psyn.GaussianSource(1e-13,3000,50,fluxunits='flam')
sp = contnm + line1 + line2 + line3

# See what you have created
print sp
# Will produce output something like this for a single emission line
#Gaussian: mu=7000 angstrom,fwhm=10 angstrom, total flux=1e-15 flam

# See what extinction laws are available
psyn.print_red_laws()

# Will produce output something like this
#name       reference
#--------   --------------------------------------------------------------
#None        Cardelli, Clayton, & Mathis (1989, ApJ, 345, 245) R_V = 3.10.
#gal3        Cardelli, Clayton, & Mathis (1989, ApJ, 345, 245) R_V = 3.10.
#lmc30dor    Gordon et al. (2003, ApJ, 594, 279) R_V = 2.76.
#lmcavg      Gordon et al. (2003, ApJ, 594, 279) R_V = 3.41.
#mwavg       Cardelli, Clayton, & Mathis (1989, ApJ, 345, 245) R_V = 3.10.
#mwdense     Cardelli, Clayton, & Mathis (1989, ApJ, 345, 245) R_V = 5.00.
#smcbar      Gordon et al. (2003, ApJ, 594, 279) R_V=2.74.
#xgalsb      Calzetti et al. (2000. ApJ, 533, 682)


# Define the extinction specifying the preferred extinction law by name,
# and the desired value of the extinction
ext=psyn.Extinction(1.3,'lmcavg')

# Apply the extinction to the emission line
new_sp=ext*sp

# Save the resulting spectrum to a FITS file
new_sp.writefits('emline_plus_extinction.fits')

This FITS file can then be uploaded to the ETC with the “user-supplied spectrum” option. (Note that line broadening cannot be applied to the emission lines in such a spectrum; consult the relevant instrument handbook to determine the minimum line widths you should use.)

Pysynphot can be used to construct quite complex spectral distributions; for more details, see the pysynphot documentation at http://pysynphot.readthedocs.io.

SNR/Time Calculations at emission lines

In spectroscopic and spectroscopic acquisition modes, emission lines that are narrower than the instrumental resolution are broadened by the ETC to be at least one resel (resolution element) wide. This is a flux-conserving operation performed by pysynphot when preparing the input target spectrum.

However, the photometric extraction calculation makes use of a simplifying assumption. Instead of integrating over the wavelength range corresponding to a resel, the target count rate per pixel at the specified wavelength is simply multiplied by the number of pixels per resolution element.