EMISSION LINES

Clearly a minor variant of the program could be used for fitting components to emission line profiles as well. Here we don't have a Voigt profile model, and indeed there is no obvious one. For lack of anything better we have chosen Gaussians, and the parameters are now the peak height (in whatever units you are using for the flux), the redshift, and Doppler parameter (as defined for the absorption lines). All you have to do to use this option is to make sure that atom.dat has the appropriate lines (or setenv ATOMDIR ematom.dat), and respond 'e' at:

 Column density (n), logN (l) or emission (e), scalefactor

and you will get:
e
  Emission lines used...

etc.

ematom.dat might look like:

??    1000.000 1.000000  1.00000  1.0 Unidentified ion!! MANDATORY
H IA  6564.623 1.000000  1.00000  1.0 For emission
H IB  4862.688 1.000000  1.00000      For emission
H IG  4341.690 1.000000  1.00000      For emission
N IIe 6585.420 1.000000  1.00000  14.0
N IIe 6549.910 0.333333  1.00000
O III 5008.236 1.000000  1.00000  16.0
O III 4960.294 0.333333  1.00000
S IIe 6718.000 1.000000  1.00000  32.066
S IIe 6731.000 1.000000  1.00000
C IVe 1549.100 1.000000  1.00000  12.0
MgIIe 2799.000 1.000000  1.00000  24.0
end   0000.000 0.000000  0.00000   Terminator

Note that the [OIII] lines have fik 3:1 so the strength ratios will come out correctly, at least if you have the flux units on an appropriate scale AND the data are flux calibrated. The peak height is multiplied by fik in the calculation, so for real heights fik=1.0 in the table is appropriate.  Note also that the wavelengths are VACUUM. Note also that the ionization level field HAS to start with I, V or X or the subsequent lines will not be read.  This is merely a convenient internal foible.  For historical reasons DO NOT DROP THE FIRST LINE OR THE TABLE WILL NOT BE READ IN ANY SENSIBLE WAY!!!

Since this option has not been used much, it does not have the cursor-driven guesses at starting values which are available for the absorption line startup. This is not a fundamental limitation, but at the moment it does mean you have to enter in the cursor window
ion, wavelength, line height, velocity width
with a carriage return (without the commas, though you can put them in if you want), and then, unless you actually entered a redshift, the cursor position for the line center is read. It is easy to guess values from looking at the screen, but do note that the fluxes may be rescaled if the error-squared is likely to be too small, so the height may be near unity and not 15 orders of magnitude less.
 

ABSORPTION AND EMISSION:

There is nothing in principle to stop you mixing absorption and emission, but because of the danger of trying to add a gaussian in emission to something you have removed as a near gaussian by absorption, this has not been implemented. However, if you KNOW you have an emission profile then you can add it in, and have it absorbed by only some of the absorption lines if you want to. To do this you generate an emission line profile in IRAF by subtracting the continuum, and fiddling about with the wavelength coefficients, and adding bits and pieces together, to form a template for the feature you want. Just the emission line, no continuum. You can then read this template in and have it added to the fit at an appropriate stage. The procedure is a bit arcane, and involves using a fort.13 file to start (at least in the version which has been tested -- I have no idea what happens if you try interactively). You can see what you need to do by the following example, which was set up to determine the CIV absorption in NGC4151.

First you set up the fort.13 file on the basis of fits to an estimated continuum, and add a line to it so it contains something like:

   *
 n_civ_4   1    1540.95    1558.07 vsig=8.0
  *
   C IV      14.1921   -0.001985     362.10       0.00   0.00E+00  0    !  1
   C IV      12.7095   -0.002360      20.51       0.00   0.00E+00  0    !  2
   C IV      13.6612   -0.001934      17.53       0.00   0.00E+00  0    !  3
   C IV      13.9500   -0.000065      38.39       0.00   0.00E+00  0    !  4
   C IV      13.4629    0.000489      19.06       0.00   0.00E+00  0    !  5
   C IV      14.3859    0.002896      49.65       0.00   0.00E+00  0    !  6
   C IV      14.6354    0.001714     144.38       0.00   0.00E+00  0    !  7
   C IV      15.0848    0.002442      95.47       0.00   0.00E+00  0    !  8
   C IV      15.1917    0.001168     559.15       0.00   0.00E+00  0    !  9
   AD         0.2347    0.000000Y     15.00X      0.00   0.00E+00  1
   C IV      14.0672    0.003298      25.09       0.00   0.00E+00  0    ! 11
   C IV      13.7144    0.003449      20.95       0.00   0.00E+00  0    ! 12

The added line is
   AD         0.2347    0.000000Y     15.00X      0.00   0.00E+00  1
 which tells the program to use the "element" AD at intensity 0.2347, redshift zero (fixed), and Doppler parameter 15 (fixed, and ignored -- so you HAVE to fix it or the derivative is ill-determined). The redshift was zero because the template wavelength coefficients were set up to be for the redshifted CIV emission line, not the rest CIV.

Under normal circumstances the program would not deal with this added line at all, so you have to tell it it is coming. So now running the program:

.......

  options:   <CR> for previous value
  I - interactive setup and fit
  F - run from an input file
  D - display profiles from input file
  ? for help
  option (key) (key)...
> f

  setup: ? help, <CR> defaults, n,z,b,cs,sf,il,w,me,p,d,v to change
>
 

 Column density (n), logN (l) or emission (e), scalefactor
> ladd      <------------ the 'add' tells it to add a template
 Filename for line template? [blank = unity]
> nv0pk1r2  <------------ filename for template (IRAF format)
  Rest wavelength for template [1215.67]?
> 1553.0    <------------ this is just a tickmark wavelength, which should be
                           in the fitted region when redshifted
  logN scalefactor is     1.00000
 Parameter input file, # entries? [fort.13,1]
>
  n_civ_4   1    1540.95    1558.07 vsig=8.0
 Resolution sigma =     8.00000 km/s
 overrides any values from header info.

 filename       : n_civ_4
 echelle order  :  1
  continuum name?
>
  Continuum set to     1.00000  everywhere
  sigma scale (errors scaled) :    1.00000
  Start & end chans:   636  1607
   1 regions fitted
   12 systems

  no. of ions for fitting is   12
 

  ion      N           z           b       bturb   temp

 iteration   :   0 ( 1 )
 chi-squared :        2.127 (1995.5135,  938 )

   C IV      14.2234   -0.001925     376.60       0.00   0.00E+00  0    !  1
   C IV      12.7205   -0.002360      21.25       0.00   0.00E+00  0    !  2
   C IV      13.6605   -0.001934      17.47       0.00   0.00E+00  0    !  3
   C IV      13.9527   -0.000065      38.61       0.00   0.00E+00  0    !  4
   C IV      13.4673    0.000489      19.35       0.00   0.00E+00  0    !  5
   C IV      14.4262    0.002891      51.84       0.00   0.00E+00  0    !  6
   C IV      14.6247    0.001698     139.43       0.00   0.00E+00  0    !  7
   C IV      15.0927    0.002433      95.86       0.00   0.00E+00  0    !  8
   C IV      15.1815    0.001161     548.38       0.00   0.00E+00  0    !  9
   AD         0.2355    0.000000Y     15.00X      0.00   0.00E+00  1    ! 10
   C IV      14.0823    0.003299      25.76       0.00   0.00E+00  0    ! 11
   C IV      13.7121    0.003452      20.91       0.00   0.00E+00  0    ! 12

   etcetcetc....

The result is that lines 1-9 are in absorption against the continuum, 10 is added as an emission line to the result, and then lines 11 & 12 are in absorption against the continuum plus the emission line. So, by assumption, lines 1 - 9 do NOT cover the emission line at all.