next up previous contents
Next: Final steps Up: FLAIR IRAF Guide Previous: Basic CCD Reduction

Spectral extraction: dofibers

Dispersion corrected (wavelength calibrated), sky-subtracted one-dimensional spectra are extracted from the object images by the IRAF task imred.specred.dofibers. Hydra refers to a NOAO fibre spectrograph that operates in a very similar way to FLAIR. It is useful to note that prompts for interaction whilst dofibers is executing may be answered with ``yes,'' ``no,'' ``YES,'' or ``NO,'' where the the upper case responses apply to all further such queries. See the Guide to the HYDRA Reduction Task DOHYDRA by Francisco Valdes for more detail. The IRAF packages imred and specred need to be loaded.

Dofibers begins by defining the apertures using the aperture reference image specified ( Flat) and identifying them based on the aperture identification file ( apertures.) The resize option is recommended; this sets the aperture sizes to be the width of the profiles at some fixed fraction of the peak height (the default being set at 10% via the parameter ylevel in params.) It is quite likely that dofibers will have some difficulty in finding some of the apertures because each one is only 1-2 pixels in extent and there is also scattered light between the apertures. An interactive review of the apertures is recommended. (Hit return at the prompt and use the keys 'n' to create a new aperture and 'o' to reorder the apertures based upon the aperture identification file.)

Next, dofibers traces the positions of the spectra at a series of points along the dispersion axis. A function is then fitted to these points to define the aperture. A low-order fit is suggested to avoid following spurious points as there is no evidence of any significant distortions of the spectra. The apertures may be edited interactively: this is recommended in order to correct any poor fits: you can either delete obviously dubious points or add in new points consonant with the lay of the original points until a good fit is obtained. This course of action may also need to be taken if the function wanders over more than about 0.75 pixels and/or the RMS of the fit is more than about 0.1 pixels.

The throughput spectra ( Flatt) are extracted and used to calculate and correct for the relative efficiency of the fibre apertures.

Dispersion correction (i.e. wavelength calibration) now takes place. This produces a wavelength-pixel relation. The middle fibre from arc1 is displayed. An example arc spectrum is shown in Figure 1. You must identify at least two lines in the spectra. This is done by placing the cursor over the line in question, pressing ``m'' and entering the wavelength. A fit to the line is made to find its centre in pixels. A preliminary fit to the manually identified lines is then made by typing ``f'' (and then ``q'' to return). Once this is done, typing ``l'' causes dofibers to attempt to identify other lines from its list. Some identifications will probably be spurious, so examine each peak (using ``z'' for zoom and ``n'' for next.) Reject anything which looks like noise with ``d'' before making a new fit. For example with the 250B grating a low-order polynomial (legendre, order 3) should give a good fit with an RMS below about 0.5Å. Dofibers now attempts to reidentify these same lines in the other fibre spectra, displaying RMS information as it goes. Keep an eye on this value. If it gets too large ( i.e., more than about 0.3 above the middle fibre's RMS value) then intervene and delete wayward points or perhaps experiment with different order polynomials or chebyshevs until you get a reasonable RMS, although a low order fit should be adequate. The dispersion parameters are displayed; you have the opportunity of adjusting these if desired. Usually this is not necessary.

Figure 1: Combined Hg-Cd-Ne Arc Spectrum (grating 250B)

The object spectra are now extracted, flat fielded and dispersion corrected. Again, check the RMS values to ensure that they don't get out of hand. Note that we perform the extraction with weights = ``none'' rather than the more common optimal ``variance'' extraction. This is because the spectral profile is undersampled on the FLAIR CCD with each spectrum being typically only two pixels across.

Sky subtraction is performed next. Examine the sky spectra. If any of the individual sky fibres seem contaminated, then they may be deleted. You will be asked for the method of combining the sky spectra. In general, ``avsigclip'' is best.

The option is given of examining the final object spectra with splot. These are saved to file with the same name as the original object image, but with the extension .ms. For example, for the parameters below, the output would be the file

Note the non-standard arc line identification file flair%idhgcdne.dat, included in the package which lists the mercury-cadmium lines in the blue. This example has ``extras=no'' to work around a bug in IRAF 2.10.2. It earlier versions it is also important not to set ``arcs2'' to `` '' (a space) rather than ``'' (a null string) as this can result in ``No reference spectra specified'' errors.

lpar dofibers
      objects = "fornax2"       List of object spectra
       (apref = "Flat")         Aperture reference spectrum
        (flat = "")             Flat field spectrum
  (throughput = "Flatt")        Throughput file or image (optional)
       (arcs1 = "arc1,arc2")    List of arc spectra
       (arcs2 = "")             List of shift arc spectra
  (arcreplace = "")             Special aperture replacements
    (arctable = "")             Arc assignment table (optional)
   (readnoise = "10")           Read out noise sigma (photons)
        (gain = "1")            Photon gain (photons/data number)
    (dispaxis = )_.dispaxis)    Dispersion axis (1=along lines, 2=along columns
      (fibers = 92)             Number of fibers
       (width = 3.)             Width of profiles (pixels)
      (minsep = 2.)             Minimum separation between fibers (pixels)
      (maxsep = 5.)             Maximum separation between fibers (pixels)
   (apidtable = "aplist")    Aperture identifications
      (objaps = "")             Object apertures
      (skyaps = "")             Sky apertures
      (arcaps = "")             Arc apertures
    (objbeams = "0,1")          Object beam numbers
    (skybeams = "0")            Sky beam numbers
    (arcbeams = "")             Arc beam numbers
     (fitflat = no)             Fit and ratio flat field spectrum?
       (clean = yes)            Detect and replace bad pixels?
     (dispcor = yes)            Dispersion correct spectra?
    (savearcs = yes)            Save simultaneous arc apertures?
 (skysubtract = yes)            Subtract sky?
     (skyedit = yes)            Edit the sky spectra?
    (saveskys = yes)            Save sky spectra?
       (splot = yes)            Plot the final spectrum?
        (redo = no)             Redo operations if previously done?
      (update = yes)            Update spectra if cal data changes?
       (batch = no)             Extract objects in batch?
    (listonly = no)             List steps but don't process?
      (params = "")             Algorithm parameters
        (mode = "ql")           

lpar params
        (line = INDEF)          Default dispersion line
        (nsum = 25)             Number of dispersion lines to sum
       (order = "increasing")   Order of apertures
      (extras = no)             Extract sky, sigma, etc.?

                                -- DEFAULT APERTURE LIMITS --
       (lower = -2.)            Lower aperture limit relative to center
       (upper = 2.)             Upper aperture limit relative to center

                                -- AUTOMATIC APERTURE RESIZING PARAMETERS --
      (ylevel = 0.1)            Fraction of peak or intensity for resizing

                                -- TRACE PARAMETERS --
      (t_step = 25)             Tracing step
  (t_function = "spline3")      Trace fitting function
     (t_order = 2)              Trace fitting function order
  (t_niterate = 1)              Trace rejection iterations
       (t_low = 3.)             Trace lower rejection sigma
      (t_high = 3.)             Trace upper rejection sigma

                                -- APERTURE EXTRACTION PARAMETERS --
     (weights = "none")         Extraction weights (none|variance)
        (pfit = "fit1d")        Profile fitting algorithm (fit1d|fit2d)
      (lsigma = 3.)             Lower rejection threshold
      (usigma = 3.)             Upper rejection threshold
     (nsubaps = 1)              Number of subapertures

                                -- FLAT FIELD FUNCTION FITTING PARAMETERS --
(f_interactiv = yes)            Fit flat field interactively?
  (f_function = "spline3")      Fitting function
     (f_order = 10)             Fitting function order

                                -- ARC DISPERSION FUNCTION PARAMETERS --
   (coordlist = "flair$idhgcdne.dat") Line list
       (match = 10.)            Line list matching limit in Angstroms
      (fwidth = 4.)             Arc line widths in pixels
     (cradius = 10.)            Centering radius in pixels
  (i_function = "spline3")      Coordinate function
     (i_order = 3)              Order of dispersion function
  (i_niterate = 2)              Rejection iterations
       (i_low = 3.)             Lower rejection sigma
      (i_high = 3.)             Upper rejection sigma
       (refit = yes)            Refit coordinate function when reidentifying?
 (addfeatures = no)             Add features when reidentifying?

                                -- AUTOMATIC ARC ASSIGNMENT PARAMETERS --
      (select = "interp")       Selection method for reference spectra
        (sort = "jd")           Sort key
       (group = "ljd")          Group key
        (time = no)             Is sort key a time?
    (timewrap = 17.)            Time wrap point for time sorting

                                -- DISPERSION CORRECTION PARAMETERS --
   (linearize = yes)            Linearize (interpolate) spectra?
         (log = no)             Logarithmic wavelength scale?
        (flux = yes)            Conserve flux?
                    -- SKY SUBTRACTION PARAMETERS --
                                -- SKY SUBTRACTION PARAMETERS --
     (combine = "average")      Type of combine operation
      (reject = "none")         Sky rejection option
       (scale = "none")         Sky scaling option
        (mode = "ql")

next up previous contents
Next: Final steps Up: FLAIR IRAF Guide Previous: Basic CCD Reduction

Mon Aug 19 16:47:38 EST 1996